Classification_interactive.ipyn crashes

Hi,

I am trying to follow the tutorial on the DLI course. I am working through the Classification_interactive.ipyn.

Whenever I try to run the 6th cell in the notebook(see attached) more often than not it just hangs up and never finishes executing.

Some other issues I have had with this notebook:

The live camera display gradually becomes slower and slower or is not live at all.

I get an error when I try to run the camera at the beginning of the notebook.

The one time through when everything had worked the best I was able to start collecting images, but after about the 11th image the notebook crashed

I have had a lot of problems with this notebook any suggestions?

It is a Jetson nano 2GB.

Problem_Cell.txt (1.4 KB)

In the training video - Dana creates a 4 GB swap for the 2GB unit - did you do that? After running for a few days I have seen out of memory messages in terminal running ‘dmesg’ - so I went and did the 4GB swap.

I also found more memory by not running the gui - since its really all done via the Jupyter notebook:

To disable GUI on boot, run:
sudo systemctl set-default multi-user.target

To enable GUI again issue the command:
sudo systemctl set-default graphical.target

I have found heat messages when running ‘dmesg’ in the terminal - - reaching 186f - I just added a fan recently. Do you have a fan?

I tried to increase the swap by using the commands shown in the course, however when I try to append the fstab file I get a permission denied error. I don’t know how to get around that.

I don’t have a fan. I have tried it with the GUI disabled with the same result.

File “/usr/local/lib/python3.6/dist-packages/keras_preprocessing/image/iterator.py”, line 230, in _get_batches_of_transformed_samples
interpolation=self.interpolation)
File “/home/vpraveen/.cache/dazel/_dazel_vpraveen/216c8b41e526c3295d3b802489ac2034/execroot/ai_infra/bazel-out/k8-fastbuild/bin/magnet/packages/iva/build_wheel.runfiles/ai_infra/iva/makenet/utils/preprocess_crop.py”, line 68, in load_and_crop_img
File “/usr/local/lib/python3.6/dist-packages/keras_preprocessing/image/utils.py”, line 114, in load_img
img = pil_image.open(io.BytesIO(f.read()))
File “/usr/local/lib/python3.6/dist-packages/PIL/Image.py”, line 2818, in open
raise IOError(“cannot identify image file %r” % (filename if filename else fp))
OSError: cannot identify image file <_io.BytesIO object at 0x7fd118243fc0>
Traceback (most recent call last):
File “/usr/local/bin/classification”, line 8, in
sys.exit(main())

please help me

@huchchareddi121 , are you doing the same example in the DLI Tutorial - as being discussed in this thread?
Can you share full details of your environment and the command you ran which caused these error

Hi,

I just bought a second Jetson Nano. This one is a 4GB one. I thought that I was having memory issues, but I am having basically the same issue as before with the 2GB.

I am not trying to do anything that is different from what is in the tutorial.

I have been working on this for months on and off when I have time, but I have not been able to get the basic tutorial going!!

Is there someone out there that can take the time to work with me? I have been reading a lot about AI, and it really looks interesting, but I don’t know how I am going to make any progress if I can’t get the basic examples to work.

Moving this topic to the Jetson Nano forum.

You need to edit /etc/fstab with sudo - i.e. sudo nano /etc/fstab or sudo vi /etc/fstab

Also remember to disable ZRAM as shown here:
https://github.com/dusty-nv/jetson-inference/blob/master/docs/pytorch-transfer-learning.md#mounting-swap

Does the camera notebook work for you, or is your issue only with the classification notebook? If you are using MIPI CSI camera, I recommend to try a USB camera like Logitech C920 or C270.

You may also try this tutorial which doesn’t rely on Jupyter: https://github.com/dusty-nv/jetson-inference

Camera issue:

The camera works just fine with the “hello camera” notebook.

Memory issue:
Here are the commands I am running this is a direct copy and paste off of the Introduction and setup from the “Getting started with AI on Jetson nano”

Does the course have commands that are incorrect then?

# Disable ZRAM:
sudo systemctl disable nvzramconfig

# Create 4GB swap file
sudo fallocate -l 4G /mnt/4GB.swap
sudo chmod 600 /mnt/4GB.swap
sudo mkswap /mnt/4GB.swap

# Append the following line to /etc/fstab
sudo echo "/mnt/4GB.swap swap swap defaults 0 0" >> /etc/fstab

This should work - are you sure you ran it with sudo? If still not working, try editing /etc/fstab directly with sudo nano /etc/fstab or sudo vi /etc/fstab and add that line to the end.

I have tried same thing didn’t work for me