From 5046ec9e4e410d6c9b962fd9600a5dd0e20e8d72 Mon Sep 17 00:00:00 2001 From: tsampazk <27914645+tsampazk@users.noreply.github.com> Date: Mon, 25 Sep 2023 12:12:00 +0300 Subject: [PATCH] Importing torch on yolov5 webcam demo to fix cuDNN error --- .../python/perception/object_detection_2d/yolov5/webcam_demo.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/projects/python/perception/object_detection_2d/yolov5/webcam_demo.py b/projects/python/perception/object_detection_2d/yolov5/webcam_demo.py index 280e3c25d1..79b8fa37e9 100644 --- a/projects/python/perception/object_detection_2d/yolov5/webcam_demo.py +++ b/projects/python/perception/object_detection_2d/yolov5/webcam_demo.py @@ -16,6 +16,8 @@ import cv2 import time +# Importing torch to avoid "RuntimeError: cuDNN error: CUDNN_STATUS_NOT_INITIALIZED" error +import torch # NOQA from opendr.engine.data import Image from opendr.perception.object_detection_2d import YOLOv5DetectorLearner