Fix duplicate points in polygons at upload CVAT for video (#3187)

* changed copy to deepcopy, modified the test

* fixed number of points in polygon
main
Anastasia Yasakova 5 years ago committed by GitHub
parent 0028a415ed
commit 4f0652fc11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -754,7 +754,7 @@ class TrackManager(ObjectManager):
break
if not prev_shape["outside"]:
shape = copy(prev_shape)
shape = deepcopy(prev_shape)
shape["frame"] = end_frame
shapes.extend(interpolate(prev_shape, shape))

@ -824,7 +824,7 @@ class TaskAnnotationsImportTest(_DbTestBase):
{
"frame": 0,
"attributes": [],
"points": [1.0, 2.1, 100, 300.222],
"points": [1.0, 2.1, 10.6, 53.22, 100, 300.222],
"type": "polygon",
"occluded": False,
"outside": False

@ -4044,7 +4044,7 @@ class TaskAnnotationAPITestCase(JobAnnotationAPITestCase):
"points": [1.0, 2.1, 51, 36.6, 8.0, 11.0],
"type": "polygon",
"occluded": False,
"outside": False
"outside": True
},
{
"frame": 2,
@ -4052,7 +4052,7 @@ class TaskAnnotationAPITestCase(JobAnnotationAPITestCase):
"points": [1.0, 2.1, 51, 36.6, 14.0, 15.0],
"type": "polygon",
"occluded": False,
"outside": True,
"outside": False,
}
]
}]

Loading…
Cancel
Save