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

Commit

Permalink
fix: Github-40: Fix ZeroDivisionError in extracting key frames
Browse files Browse the repository at this point in the history
  • Loading branch information
KonstantinKorotaev committed Feb 14, 2023
1 parent 11305ad commit b81f23d
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 b81f23d

Please sign in to comment.