Fix cvat format (#2071)

main
Maxim Zhiltsov 6 years ago committed by GitHub
parent 0982ea3f57
commit 8cbe3956a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -398,8 +398,9 @@ def dump_as_cvat_interpolation(file_object, annotations):
z_order=shape.z_order,
frame=shape.frame,
attributes=shape.attributes,
),
annotations.TrackedShape(
)] +
( # add a finishing frame if it does not hop over the last frame
[annotations.TrackedShape(
type=shape.type,
points=shape.points,
occluded=shape.occluded,
@ -408,8 +409,10 @@ def dump_as_cvat_interpolation(file_object, annotations):
z_order=shape.z_order,
frame=shape.frame + annotations.frame_step,
attributes=shape.attributes,
)] if shape.frame + annotations.frame_step < \
int(annotations.meta['task']['stop_frame']) \
else []
),
],
))
counter += 1

Loading…
Cancel
Save