CSI Camera freezes during 'Thumbs' Interactive Classification Project

SOLUTION (for me!)

  1. Reflash using SDKManager.
  2. Disable LightDM (as per @dusty_nv link below).
  3. Close Remote-SSH on my VSC and just use standard terminal to login.
  4. Have one swapfile of 8GB.
  5. Append “–memory=500M --memory-swap=8G” to dockerrun file in home folder (as per @juliefaurelacroix post).

Continuing the discussion from Camera freezes in Image Classification:

As experienced by others, i wonder what else I can do to get this project to complete without reflasing an image.

Setup -

  • Nano 2GB.
  • 128GB SanDisk Extreme Pro A2 Class SD Card
  • CSI RPi Camera 2.1 (tried 2 of them with 10cm camera cable)
  • Latest JetPack 4.4.1 (Installed headless via SDKManager along with the Linux image.)
  • Camera works in ‘Hello Camera’ and all the way to pressing ‘Train’ in the ipywidget.
  • Free -h returns (during training when the system slows down) >
    total used free shared buff/cache available
    Mem: 1.9G 1.8G 39M 48K 136M 40M
    Swap: 9.9G 2.2G 7.7G

Description -

  • Camera always slows / stops after pressing ‘Train’. After creating 30 images for up and down. Also my Remote-SSH login via VSC is terminated. I have to then SSH in via the local linux terminal.

  • I uses the Jim’s JetsonHacks script to create the swapfile.

  • I gave the full 2GB over to Zram (was at 1GB). See below -
    /dev/zram3 lzo 495M 465.9M 189.9M 201M 4 [SWAP]
    /dev/zram2 lzo 495M 465.7M 189.8M 201M 4 [SWAP]
    /dev/zram1 lzo 495M 465.9M 189.6M 200.8M 4 [SWAP]
    /dev/zram0 lzo 495M 465.6M 189.3M 200.4M 4 [SWAP]

  • Added --memory=500M --memory-swap=9.9G to the docker run script.
    -Jupyter Labs hourglass appears on its browser-tab and then sometimes the Lab ‘instance’ disconnects…

  • During training, TOP command returns -

I think i found the culprit!!

What I expected -
To finish the training as per the AI Fundamentals Course and then check with thumbs ‘up’ or ‘down’ to see accuracy of model. I can confirm that 30 images of thumbs up and down were created in the relevant folder.

So i should remove LightDM, complete Desktop etc? Any safeway to do this without creating dependency issues?

Cheers, Michael.

Hi @mail2mick, I wouldn’t remove it, but you should be able to run one of these commands to disable the service from starting after a reboot:

1 Like

Thanks @dusty_nv, did that.

After that, new error that appeared while training as seen in Jupyter Lab log entry is as follows >

Error described above happens about 5 mins into training. Remote-SSH via VSC is closed. Terminal SSH remained open, but blue bar does not progress >

A bit stumped at the moment as to what to do next…

Ta, Michael.

That is a warning (not an error), although I haven’t seen that before testing this notebook, so that is strange.

I just noticed you mentioned that you gave ZRAM the full 2GB - I would try disabling ZRAM, because it consumes physical memory. You can run this command (outside of container) and reboot:

$ sudo systemctl disable nvzramconfig

Alternatively, you can try and see if you can get this other training example to run (it works for me on Nano 2GB):

It has a container as well, available through the second link.

1 Like