Skip to content

Commit ed4976a

Browse files
committed
if frame_skip_factor == 0: skip
1 parent ba2e106 commit ed4976a

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)