Skip to content

Commit 0ac517b

Browse files
authored
Merge pull request #3 from uug-ai/fix/framerate-is-0
if frame_skip_factor == 0: skip
2 parents ba2e106 + ed4976a commit 0ac517b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

object_classification_yolov8.py

+2
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@
130130
# frame_skip_factor is the factor by which the input video frames are skipped.
131131
frame_number, predicted_frames = 0, 0
132132
frame_skip_factor = int(cap.get(cv2.CAP_PROP_FPS) / var.CLASSIFICATION_FPS)
133+
if frame_skip_factor == 0:
134+
continue
133135

134136
# Loop over the video frames, and perform object classification.
135137
# The classification process is done until the counter reaches the MAX_NUMBER_OF_PREDICTIONS or the last frame is reached.

0 commit comments

Comments
 (0)