Skip to content

Commit

Permalink
Fix outside in mot
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiltsov-max committed Jun 25, 2020
1 parent 7b4dc59 commit 7862c40
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cvat/apps/dataset_manager/formats/mot.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ def _import(src_file, task_data):
track.shapes.sort(key=lambda t: t.frame)
# Append a shape with outside=True to finish the track
last_shape = track.shapes[-1]
if last_shape.frame < int(task_data.meta['task']['stop_frame']):
if last_shape.frame + task_data.frame_step <= \
int(task_data.meta['task']['stop_frame']):
track.shapes.append(last_shape._replace(outside=True,
frame=last_shape.frame + task_data.frame_step)
)
Expand Down

0 comments on commit 7862c40

Please sign in to comment.