How to Install and Run Yolo on the Nvidia Jetson Nano (with GPU)

How to Install and Run Yolo on the Nvidia Jetson Nano (with GPU)

Learn how to install and run Yolo on the Nvidia Jetson Nano using its 128 cuda cores gpu.

We’re going to learn in this tutorial how to install and run Yolo on the Nvidia Jetson Nano using its 128 cuda cores gpu.

All the steps described in this blog posts are available on the Video Tutorial, so you can easily watch the video where I show and explain everythin step by step.

Yolo is a really popular DNN (Deep Neural Network) object detection algorythm, which is really fast and works also on not so powerfull devices.

I explained in this post, how to run Yolo on the CPU (so the computer processor) using opencv, and I’m going to explain today how to run Yolo on the GPU (the graphic processor), to get more speed.

How to install YOLO V3?

Before showing the steps to the installation, I want to clarify what is Yolo and what is a Deep Neural Network.

YOLO is an Object Detection algorythm, and it’s the acronym of (You Only Look Once). An object detection algorythm need a DNN (Deep Neural Network) framework to run.

DARKNET is the DNN that was developed to run Yolo. And we’re going to see today how to install Darknet.

Let’s start with the installation.

Update the libraries

sudo apt-get update

Export Cuda path

export PATH=/usr/local/cuda-10.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

Download Darknet and Yolo

git clone https://github.com/AlexeyAB/darknet
cd darknet
wget https://pjreddie.com/media/files/yolov3.weights
wget https://pjreddie.com/media/files/yolov3-tiny.weights

Enable the GPU

We need to Edit the Makefile to enable the GPU, Cuda and Opencv. Let’s edit the Makefile by typing.

sudo vi Makefile

Set the values:

GPU=1

CUDNN=1

OPENCV=1

and the rest leave it as it is.

Compile the Darknet

make

The installation is now completed.

How to run YOLO V3?

You can run Yolo from the Linux terminal.

Once you open the terminal you need first to access the Darknet folder. So just type:

cd darknet

Then you can choose one of the following line, depending of the detection you want to perform.

Image detection:

Edit “dog.jpg” with the path of your image.

./darknet detector test cfg/coco.data yolov3.cfg yolov3.weights -ext_output dog.jpg

Detection from Webcam:

The 0 at the end of the line is the index of the Webcam. So if you have more webcams, you can change the index (with 1, 2, and so on) to use a different webcam.

./darknet detector demo cfg/coco.data cfg/yolov3.cfg yolov3.weights -c 0

Detection from a Videofile:

Edit “test.mp4” with the path of your videofile.

./darknet detector demo cfg/coco.data cfg/yolov3.cfg yolov3.weights -ext_output test.mp4

For more and detailed info, you can check the darknet github page.

machine-learning developer

What is Geek Coin

What is GeekCash, Geek Token

Best Visual Studio Code Themes of 2021

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Hire Machine Learning Developers in India

We supply you with world class machine learning experts / ML Developers with years of domain experience who can add more value to your business.

Hire Machine Learning Engineer | Offshore Machine Learning Experts

We are a Machine Learning Services provider offering custom AI solutions, Machine Learning as a service & deep learning solutions. Hire Machine Learning experts & build AI Chatbots, Neural networks, etc. 16+ yrs & 2500+ clients.

Hire Machine Learning Developer | Hire ML Experts in India

We supply you with world class machine learning experts / ML Developers with years of domain experience who can add more value to your business.

Applications of machine learning in different industry domains

We supply you with world class machine learning experts / ML Developers with years of domain experience who can add more value to your business.

Top Machine Learning Company in India | Best ML App Development

One of the best machine learning companies in India, we provide customized machine learning services. 15+Yrs Exp, 500+ Staff, 13800+ Projects, 6800+ Clients.