Yolov4-Detector-and-Distance-Estimator icon indicating copy to clipboard operation
Yolov4-Detector-and-Distance-Estimator copied to clipboard

[ WARN:[email protected]] global /io/opencv/modules/dnn/src/dnn.cpp (1483) setUpNet DNN module was not built with CUDA backend; switching to CPU

Open BraholliKristi opened this issue 2 years ago • 7 comments

[ WARN:[email protected]] global /io/opencv/modules/dnn/src/dnn.cpp (1483) setUpNet DNN module was not built with CUDA backend; switching to CPU Traceback (most recent call last): File "/home/braholli/Documents/Yolov4-Detector-and-Distance-Estimator-master/DistanceEstimation.py", line 72, in mobile_data = object_detector(ref_mobile) File "/home/braholli/Documents/Yolov4-Detector-and-Distance-Estimator-master/DistanceEstimation.py", line 42, in object_detector label = "%s : %f" % (class_names[classid[0]], score) IndexError: invalid index to scalar variable.

BraholliKristi avatar May 18 '22 13:05 BraholliKristi

I have Successfully installed opencv-contrib-python-4.5.5.64

BraholliKristi avatar May 18 '22 13:05 BraholliKristi

Make sure to choose the correct environment, while running the code.

Asadullah-Dal17 avatar May 18 '22 14:05 Asadullah-Dal17

what do you mean by choosing the correct environment? What should i do to solve this issue? I'm using pycharm to run your code.

hfatima08 avatar Nov 07 '22 21:11 hfatima08

a python Virtual Envnieorment in which you have installed required version of opencv

Asadullah-Dal17 avatar Nov 08 '22 14:11 Asadullah-Dal17

but the version you have mentioned is not being installed in the environment

hfatima08 avatar Nov 10 '22 20:11 hfatima08

have you got any specific error message while installation process?

Asadullah-Dal17 avatar Nov 13 '22 03:11 Asadullah-Dal17

Hi, I've got the same error. I've applied an answer from https://stackoverflow.com/questions/32978575/how-to-fix-indexerror-invalid-index-to-scalar-variable in three places. But I think without CUDA it is too slow for my RPi4. And I got another error: [h264 @ 0x10ad7e20] error while decoding MB 45 2, bytestream -13 Traceback (most recent call last): File "/home/swim/Yolov4-Detector-and-Distance-Estimator/DistanceEstimation.py", line 92, in data = object_detector(frame) ^^^^^^^^^^^^^^^^^^^^^^ File "/home/swim/Yolov4-Detector-and-Distance-Estimator/DistanceEstimation.py", line 35, in object_detector classes, scores, boxes = model.detect(image, CONFIDENCE_THRESHOLD, NMS_THRESHOLD) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cv2.error: OpenCV(4.6.0) ./modules/imgproc/src/resize.cpp:4052: error: (-215:Assertion failed) !ssize.empty() in function 'resize'

vlasov01 avatar Nov 25 '23 14:11 vlasov01