Hi I’m trying to run the DLI Getting Started with AI Course using my IMX477 Rasp pi HQ camera. I’m using the ribbon cable if that is relevant. I have removed the R8 resistor from the camera board, got the IMX477 driver and tested that the camera can connect and stream using
nvgstcapture-1.0
I have had a good search and while I find people getting the same error I’m not sure the solutions are appropriate in my case.
This is my script that I run, the container tag is checked against the Jetpack version (4.4.1):
echo “sudo docker run --runtime nvidia -it --rm --network host
–volume ~/nvdli-data:/nvdli-nano/data
–volume /tmp/argus_socket:/tmp/argus_socket
–device /dev/video0
nvcr.io/nvidia/dli/dli-nano-ai:v2.0.1-r32.4.4” > docker_dli_run.sh
I feel there is something else I need to do to make it work. When I run the first cell in the Hello Camera notebook to check the camera is available I don’t get an error:
crw-rw---- 1 root video 81, 0 Aug 18 08:43 /dev/video0
But I get an error when I run the second cell in the notebook. The error I get is:
RuntimeError Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/jetcam-0.0.0-py3.6.egg/jetcam/csi_camera.py in init(self, *args, **kwargs)
23 if not re:
—> 24 raise RuntimeError(‘Could not read image from camera.’)
25 except:RuntimeError: Could not read image from camera.
During handling of the above exception, another exception occurred:
RuntimeError Traceback (most recent call last)
in
1 from jetcam.csi_camera import CSICamera
2
----> 3 camera = CSICamera(width=224, height=224, capture_device=0) # confirm the capture_device number/usr/local/lib/python3.6/dist-packages/jetcam-0.0.0-py3.6.egg/jetcam/csi_camera.py in init(self, *args, **kwargs)
25 except:
26 raise RuntimeError(
—> 27 ‘Could not initialize camera. Please see error trace.’)
28
29 atexit.register(self.cap.release)RuntimeError: Could not initialize camera. Please see error trace.
Can anyone advice how I make this notebook work with the HQ camera, I’d like to go through it properly with this camera. Please spoon feed me the information if possible, I’m not very experienced.
Thanks very much
EDIT:
I don’t know if this is relevant but when I check opencv like this:
$ python
Python 2.7.17 (default, Jul 1 2022, 15:56:32)
[GCC 7.5.0] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.import cv2
print cv2.version
4.1.1
I have the correct version for Jetpack 4.4.1 but when I do this:
$ ls /etc/nvidia-container-runtime/host-files-for-container.d/
cuda.csv cudnn.csv l4t.csv tensorrt.csv visionworks.csv
I see that I don’t have an opencv.csv.
EDIT 2:
I also see that at the top of my error it says:
/usr/local/lib/python3.6/dist-packages/jetcam-0.0.0-py3.6.egg/jetcam/csi_camera.py
I have nothing inside my /usr/local/lib/python3.6/dist-packages/