Jetson Nano Example Project
Jetson Nano Experience
- I want to debrief my experience with the Jetson Nano card as a part of the Nvidia certification program
- It follows the Getting Started with AI on Jetson Nano course by Nvidia.
Configuration
- Configuration of a card is non-trivial if you want something beyond basic configuration or a standard Docker container.
- Some things require timely compilation from scratch. I found myself too used to everything pre-compiled in the Windows environment.
- I have unsuccessfully tried configuring a Linux host for Jetson on my Windows machine by WSL2. The particular challenge was the USB configuration for communication with Jetson.
- Creating custom Docker containers is an important skill. The building scripts for all important containers are provided. I have started a nice free MOOC course DevOps with Docker. However, my current responsibilities prevented me from delving deeply into the subject.
Dependency hell
- There are too many ways to install the same package (I have also tried Miniconda installation for Jetson), not including the option for multiple environments:
pip install matplotlib sudo pip install matplotlib sudo apt install python3-matplotlib conda install matplotlib
I have tried to be consistent with
sudo pip install
. While this option is considered insecure, there is no security in Jetson anyway. - Sometimes
pip
option--ignore-installed
may help with some errors. - Sometimes
pip
option--no-dependencies
may help to prevent overwriting the pre-installed OpenCV. - Symbolic links may be required.
- Edit path in
~/.bashrc
may be required.
Camera
- There are at least two primary interfaces for the camera: GStreamer and OpenCV. I have used OpenCV for its simpler interface. Nevertheless, the usage of real-time video requires a GStreamer.
Tensorflow
I prefer Tensorflow for its simplicity. Some points to note are:
- Theoretically, up to version 2.7.0 is supported - I have succeeded only 2.6.2, which is also nice.
- Some sub-packages were too challenging to install, e.g.,
addons, tesnorflow_io.
- Succeed with
tensorflow-hub
with some tweaks - it is probably the most useful part for out-of-the-box applications. - Speed-up by TensorRT is required. I have even taken a free project on Coursera (certificate, my dedicated review) and somewhat inspected a similar course by Nvidia (that was free for me as an academic ambassador).
Copy files from the Windows host
To copy files by SSH from Windows host (ref):
-
scp
command:scp Filepathinwindows username@ubuntuserverip:linuxserverpath
Example:
scp .\test.txt nano@192.168.55.1:~/
IDE
- The card does not support serious IDE due to memory and CPU limitations.
- Jupyter Notebook and Jupyter Lab worked fine with some essential modern extensions, such as variable inspection. However, I have encountered some problems with images inside Jupyter.
- Remote SSL is fantastic. While not so convenient for image presentation, it has all the advantages of a modern IDE.
LEDs
Nice and convenient. I still need clarification on whether a current-limiting resistor of \(220 \Omega\) is obligatory since LED light is almost invisible.
Repository
Overall, the repository provides an overview of my experiments using the Jetson Nano for various tasks, including camera integration, face detection, and person-presence detection.
Takeaways (beyond Jetson)
- Learned some Linux (Ubuntu)
- Learned working with remote Python (ssh, Jupyter) in IDE
- Introduction to Docker
- Introduction to TensorRT
Enjoy Reading This Article?
Here are some more articles you might like to read next: