Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
BraholliKristi opened this issue May 18, 2022 · 7 comments

Comments

@BraholliKristi
Copy link

[ 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
Copy link
Author

I have Successfully installed opencv-contrib-python-4.5.5.64

@Asadullah-Dal17
Copy link
Owner

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

@hfatima08
Copy link

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.

@Asadullah-Dal17
Copy link
Owner

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

@hfatima08
Copy link

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

@Asadullah-Dal17
Copy link
Owner

have you got any specific error message while installation process?

@vlasov01
Copy link

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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants