In this post, we will explain how to run Yolo real-time object detection with Docker on NVIDIA Jetson Xavier NX. The process is the same with NVIDIA Jetson Nano and AGX Xavier. Firstly, we have to pull a Docker image which is based on NVIDIA L4T PyTorch. The image pull command can be seen below.
We can run the Docker container by using the below command.
We need to update "apt" package to avoid possible problems.
We install "nano" text editor. You can install a different text editor you would like to use.
"opencv-python", "torch" and "torchvision" should be changed as comment lines because there is the possibility of version incompatibility for those packages. We will install them manually later.
After making arrangements, we install the required packages by using the below command.
We need to install missing packages manually.
We have used "scp" command for getting image examples for yolov5. For using this command, you should install "openssh-server" package.
On our host machine, we need to give the access permission to everyone for avoiding display problems.
Now, we are ready to test yolov5 on our test image.
Here is the our test image.
For displaying image files inside the Docker container, we need to use gnome image viewer like "eog". We install it by typing below command.
apt-get install eog
After running this command, we can see the result image path from terminal.
For displaying the result image, please use below commands.
cd runs/detect/exp24eog example.jpg
We can use another kind of sources like video or rtsp stream.
Thanks for reading!