Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #42 from heartexlabs/fb-github-40
Browse files Browse the repository at this point in the history
fix: Github-40: Fix ZeroDivisionError in extracting key frames
  • Loading branch information
makseq authored Feb 15, 2023
2 parents 11305ad + b81f23d commit f168857
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion label_studio_tools/postprocessing/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def _construct_result_from_frames(
start_i = 1 if exclude_first else 0
for i in range(start_i, frame_count):
frame_number = i + frame1['frame']
delta = i / (frame_count - 1)
delta = i / max(1, (frame_count - 1))
deltas = {}
for v in ["x", "y", "rotation", "width", "height", "time"]:
deltas[v] = (
Expand Down

0 comments on commit f168857

Please sign in to comment.