Merge pull request #730 from opencv/bs/fixed_parsing

Don't load shapes with keyframe==False
main
Nikita Manovich 6 years ago committed by GitHub
commit 6cb05c8a8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -398,6 +398,7 @@ def load(file_object, annotations):
shape['points'].extend(map(float, pair.split(','))) shape['points'].extend(map(float, pair.split(',')))
if track is not None: if track is not None:
if shape["keyframe"]:
track.shapes.append(annotations.TrackedShape(**shape)) track.shapes.append(annotations.TrackedShape(**shape))
else: else:
annotations.add_shape(annotations.LabeledShape(**shape)) annotations.add_shape(annotations.LabeledShape(**shape))

Loading…
Cancel
Save