Jetson Nano Setup

Prior to anything, the Jetson nano needs to be setup. 

For that instructions can be found here. 

https://developer.nvidia.com/embedded/learn/get-started-jetson-nano-2gb-devkit

Jetpack Installation

It is necessary that CUDA and many other required libraries are running on the Jetson. Ideally, all the packages are installed here and the darknet will run. 

https://docs.nvidia.com/jetson/jetpack/install-jetpack/index.html

Additional Required Files

Despite the above installations, the darknet might not run and you may find errors that may arise due to version incompatibilities, which I did as well. I found the following resource helpful , in case the darknet did not run. 

https://jkjung-avt.github.io/jetpack-4.4/

This install contains additional files that might be helpful. Make sure that the TensorFlow and OpenCV are perfectly operational before proceeding. 

Note: The protobuf library might take a while to install

Getting the darknet

Update the libraries and export CUDA path

Then navigate to the directory where you want to store your project and clone the repository.

Get the weights for COCO dataset. This is for testing the algorithm. Both are not required. 

Inside the darknet folder, open the Makefile. Since the YOLO is going to be run on the Jetson GPU, set GPU=1, and since CUDA is active CUDNN =1, (if using higher end Jetson, also set CUDNN_HALF =1) and OPENCV =1. 

These settings increase the speed on the device

These are all the active files in the environment

Post modifying the Makefile, run make and the darknet should compile. 

Passing an Image

To execute it on an existing image, run 

After running, the output is the time taken for execution, the objects detected and the %match. 

Real time Camera Feed

To run COCO on live camera feed, the ‘test’ is replaced by ‘demo’ and input changes to camera. 

The number in the end indicates the camera number.’0′ is the default.  

Due to low memory, any application besides the program cannot run at the same time.