diff --git a/OTVision/detect/yolo.py b/OTVision/detect/yolo.py index 2dd41ad2..1be70e04 100644 --- a/OTVision/detect/yolo.py +++ b/OTVision/detect/yolo.py @@ -147,6 +147,7 @@ def _load_model(self) -> YOLOv8: def _predict(self, video: Path) -> Generator[Results, None, None]: with av.open(str(video.absolute())) as container: + container.streams.video[0].thread_type = "AUTO" for frame in container.decode(video=0): results = self.model.predict( source=frame.to_ndarray(format="rgb24"),