Add docstrings and improve comments (#11229)

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Glenn Jocher 2024-05-03 22:51:26 +02:00 committed by GitHub
parent ccfc1cf925
commit d5458f27cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 34 additions and 17 deletions

View file

@ -268,6 +268,7 @@ from ultralytics import YOLO
def run_tracker_in_thread(filename, model):
"""Starts multi-thread tracking on video from `filename` using `model` and displays results frame by frame."""
video = cv2.VideoCapture(filename)
frames = int(video.get(cv2.CAP_PROP_FRAME_COUNT))
for _ in range(frames):