Hi, I switched to Python3.8 and have compiled OpenCV 4.6.0 again based on the script you provided. Compilation and installation of OpenCV was successful, see test below:
jetson@nano:~$ python
Python 3.8.0 (default, Dec 9 2021, 17:53:27)
[GCC 8.4.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.
import cv2
cv2.version
‘4.6.0’
count = cv2.cuda.getCudaEnabledDeviceCount()
print(count)
1
But the original error from the beginning remains unchanged:
08/31/23 23:09:50 zmesdetect_m1[9928] ERR detect_sequence.py:713 [Error running model: OpenCV(4.6.0) /home/jetson/workspace/opencv-4.6.0/modules/dnn/src/cuda4dnn/csl/memory.hpp:54: error: (-217:Gpu API call) no CUDA-capable device is detected in function ‘ManagedPtr’]
08/31/23 23:09:50 zmesdetect_m1[9928] DBG2 detect_sequence.py:714 [Traceback (most recent call last):
File “/usr/local/lib/python3.8/dist-packages/pyzm/ml/detect_sequence.py”, line 710, in detect_stream
_b,_l,_c,_m = m.detect(image=frame)
File “/usr/local/lib/python3.8/dist-packages/pyzm/ml/object.py”, line 71, in detect
b,l,c,_model_names = self.model.detect(image)
File “/usr/local/lib/python3.8/dist-packages/pyzm/ml/yolo.py”, line 189, in detect
outs = self.net.forward(ln)
cv2.error: OpenCV(4.6.0) /home/jetson/workspace/opencv-4.6.0/modules/dnn/src/cuda4dnn/csl/memory.hpp:54: error: (-217:Gpu API call) no CUDA-capable device is detected in function ‘ManagedPtr’]
08/31/23 23:09:50 zmesdetect_m1[9928] DBG2 detect_sequence.py:770 [We did not find any object matches in frame: alarm]
08/31/23 23:09:50 zmesdetect_m1[9928] DBG2 yolo.py:82 [pyzm_uid33_gpu_lock portalock already released]
08/31/23 23:09:50 zmesdetect_m1[9928] DBG1 detect_sequence.py:830 [perf: TOTAL detection sequence (with image loads) took: 477.96 ms to process 550]
08/31/23 23:09:50 zmesdetect_m1[9928] DBG1 zm_detect.py:556 [Closing logs]
What else can I do to solve it? I’m totally desperate and happy to provide additional information, in case that would help to fix it. Please let me know.