CSI Camera is stuck after trainning model

I follow the DLI course with Jetson Nano 2GB AI KIt. Run the classification_interactive.ipynb, everything works successfully until I go to the Train Model part. The camera is tuck after training, I cannot even release the camera. Can anyone help?

Is this still an issue to support?
What’s the camera you’re using?

Yes, I still wait for the solution.
I test Waveshare IMX219-160 Camera as well as the Raspberry Pi Camera V2. Both the cameras have the issue.

Hi,

Could you monitor the device at the same time to check if Nano is running out of memory?
Thanks.

This is the memory status when the camera is stuck and dead.

Hi @Zera , please try the suggestions from this post:

https://forums.developer.nvidia.com/t/csi-camera-freezes-every-time-i-try-image-classification/167485/4

Baring that, you may want to try USB camera, as CSI camera consumes more memory during runtime.

I see you’re using ipykernel… I’ve had issues with memory deallocation using notebooks before with tensorflow and see that as a possible problem based on what you just posted. Can you try running moving the code over the regular script so you don’t have to use ipykernel?

Yes, if I change to the USB camera, it works without any problem.

I have the same problem, and I follow this topic to solve it :https://forums.developer.nvidia.com/t/csi-camera-freezes-every-time-i-try-image-classification/167485/4 .

This is the test result:

  1. If I do not connect HDMI display,use “–memory=500M --memory-swap=4G” in docker script and “$ sudo systemctl disable nvzramconfig” to disable ZRAM, the camera can work well while training.
  2. If I connect HDIM diplay, I must add “$ sudo systemctl set-default multi-user.target” command to disable x-server,then the camera can work without stuck.

Btw, “–memory=500M --memory-swap=4G” can not limited RAM to 500M, it seems doesn’t work,but, it can prevent camera from stucking.

I tryed different value of --memeory and --memory-swap, different swap spaces, different docker image, none of this had an impact. I haven’t found a good solution so far.