CSI camera cannot initialize in the Getting Started with AI thumbs classification notebook

I am running the example notebook as part of the course and find that I am having issues with getting the camera to work properly.
The weird thing is that the first time I tried it, the video stream was active and I was able to save images for my dataset using the widgets. However, I got an issue saying “camera could not initialize” when I tried to train my dataset.
Since then I’ve tried to restart the kernel and ensure the IMX219 camer I’m using is not active in any other kernel. I have tried using the camera in the hello_camera notebook and it works fine and displays a live videofeed, however, in this course it fails to do so.

Sometimes the error pops up right in the second cell in the image below and sometimes the camera initializes just fine, but fails to initialize later on when it is being used for the livestream.

Additionally, it seems the notebook is failing to find the CSI and my USB cameras in the first cell.
This line of code: !ls -ltrh /dev/video*
gives the output: ls: cannot access ‘/dev/video*’: No such file or directory
Could this be causing the entire problem? If so should I change ltrh to l4trh or is there some other change I should make?
Please do let me know what I can change here and thank you in advance.

Have a check with v4l2-ctl --list-devices to check if any camera driver be loaded correctly.

Hello , I downloaded v4l-utils and then ran the command you mentioned:
It appears to detect my imx219 camera:
OUTPUT: vi-output, imx219 6-0010 (platform:54080000.vi:0):

Hi @siftikh1,

Are you using Nano 2GB or Nano 4GB? You may want to try some suggestions from this thread:


Alternatively, you may want to use USB camera like Logitech C270 or C920 with the DLI course.

BTW, to effectively restart the CSI camera, you would want to shutdown the container (i.e. by pressing Ctrl+D from your SSH terminal). Then run sudo systemctl restart nvargus-daemon (outside of container). Then start your container again.

Hello dusty,
I’m using the 2GB and had configured the swap down to 4GB from the initial 5GB.
After following the link you sent me I was able to resolve a number of issues and the camera was able to be detected and show a live stream in the widget.
Sadly, after training is complete, it freezes and I can no longer perform inference.

Is this issue common just for this AI fundamentals container, or are CSI camera issues something that come up frequently with the jetson nano? I can go out and buy the logitech c270, but I do wanna know if I can simply continue relying on the CSI camera for other containers I will be using like the l4t-ml or the Hello AI world containers

It seems specific to the Nano DLI container with interactive training notebook + CSI camera running at the same time on Nano 2GB. CSI camera works fine on jetson-inference container under Nano 2GB - jetson-inference doesn’t use camera during training.

Ah I see, can I ask you about an issue I had using imagenet on jetson-inference here, or should I open up a new topic?
Thanks a lot for the help so far by the way

Hi @siftikh1, go ahead an open up a new topic about it, or you could open an issue on the jetson-inference GitHub. Thanks!

1 Like