CSI Camera freezes every time I try image classification

I am trying to go through Nvidia’s “Getting Started with AI on Jetson Nano” course. I have the 2GB model and a CSI Raspberry Pi Camera V2.1 attached. Without fail, every time I try running any sort of training in the image classification section of the course, the camera freezes up, and I have to reboot the system. I thought it might be an issue with insufficient memory, so I continued to increase the swap file size while trying. I currently have 16GB of swap memory, and it still crashes every time. Has anyone had this problem before? All I want to do is take the AI course, but I can’t get through a single lesson without a crash. Thanks.

Hi,

Please noted that swap won’t increase GPU memory but only CPU-accessible memory.
A 2GB model might be too complicated to deploy on the Nano.

To clarify this, would you mind monitoring your system with tegrastats first.
If the memory does reach its limit, please try a smaller model instead.

Thanks.

Hi @jdwwhetten2, can you try the suggestions from this post:

https://forums.developer.nvidia.com/t/camera-freezes-in-image-classification/158686/9

Namely, since you already have lots of SWAP mounted, try adding --memory=500M --memory-swap=8G to your docker run script.

Also, try disabling the X-server from starting and also disable ZRAM which can save memory. Use these commands and reboot:

$ sudo systemctl set-default multi-user.target
$ sudo systemctl disable nvzramconfig

Here are the commands to disable/re-enable it: xorg - How to disable GUI on boot in 18.04 (Bionic Beaver)? - Ask Ubuntu

Baring that, if you still can’t get it working, you may try a USB camera like Logitech C270 or C920, as these use less memory than MIPI CSI camera.

1 Like

This worked! Thank you!