Skip to content

Commit

Permalink
make detector not stop when failing on a single video
Browse files Browse the repository at this point in the history
  • Loading branch information
breunigs committed Jan 27, 2024
1 parent 3d27748 commit cd1dafe
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tools/detection/detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,12 @@ def process(item, model, outer_bar):
target=lambda: detections.update(load_json_gzip(wip)))
gzip_loader.start()

frames, frame_count = load_video(name)
try:
frames, frame_count = load_video(name)
except:
print(f"\nfailed to load video \"{name}\", skipping")
return gzip_loader

gzip_loader.join()

bytes_per_frame = math.floor(size / float(frame_count))
Expand Down

0 comments on commit cd1dafe

Please sign in to comment.