Scholar Zhang Chu takes you to experience the Hello AI World of Jetson AGX Orin

In In link:

Provides a link to an Nvidia AI example HelloAI World:

It provides more than 50 application cases of image processing, Image Recognition, Object Detection, Semantic Segmentation, Pose Estimation, and depth estimation

Let's see if we can jetson-inference Let's play.

According to

Let's see if we can run it with docker.

git clone --recursiveĀ

I'm afraid you can't execute this command. For one thing, github is not easy to connect. It also needs to connect the sub modules in the project circularly. I'm afraid the result is:

Then we have to rely on gitee transition:

At this time, it's better not to choose the gitee warehouse of others, because we still need to reprocess the project...

Open the Jetson information project on the cloned gitee:

If you directly use git clone, of course:

However, don't forget that you need to add -- recursive, and the result plus the parameter is still wrong.

Because the -- recursive parameter will look The address of the sub module in gitmodules, and then complete the code clone circularly:

The addresses inside are github, which is still difficult to connect.

Then, as before, we will move the corresponding warehouses to our gitee:

And will Change the gitmodules file to its own gitee address:

[submodule "utils"]
	path = utils
	url =
	branch = master
[submodule "tools/camera-capture"]
	path = tools/camera-capture
	url =
	branch = master
[submodule "python/training/classification"]
	path = python/training/classification
	url =
	branch = master
[submodule "python/training/detection"]
	path = python/training/detection
	url =
	branch = master
[submodule "python/training/segmentation"]
	path = python/training/segmentation
	url =
	branch = master
[submodule "plugins/pose"]
	path = plugins/pose
	url =

After submitting the code, let's go back to git clone

It should be noted here that sub modules are sub modules If gitmodules also involves github, you need to make corresponding modifications.

In order to prevent insufficient storage, it is specially transferred to the 1T hard disk of / home1 to do the following:

cd /home1/zhanghui

git clone --recursiveĀ

(in fact, one of the addresses is still github. I forgot to change it. Fortunately, the project may be relatively small and can be downloaded.)

Well, the code download is finally completed. It's really hard.

Here's how to play docker according to the instructions:

cd jetson-inference


After a while, the system will switch to the interface of Model Downloader:

If you choose to download at this time:

Download will start in a few minutes:

However, the following errors occur:

Take a closer look at the script download - models sh

It went to a place that the Chinese couldn't find to download things.

So although this time is wrong, you can only watch it continue.

Then the script will continue to download pytorch SSD base model:

Check the script, it is still unable to download:

We download it manually:

The system waited for a long time and couldn't download it, so it had to start downloading the image:

Continue downloading the docker image:

After unremitting Download:

Finally, the download is complete:

But without these models, the reasoning task of AI cannot be completed.

Therefore, you have to find a way to open the browser and download these model files one by one:

Until the 4.5G Model file was finally downloaded:

Here is the one sorted by Zhang Xiaobai:

Then if you want to use it, just transfer it to Orin.

Well, there are more ways than difficulties, right?

However, Zhang Xiaobai still doesn't know how to play this docker...

Alas, let's try the source code compilation first:

According to

Try it one by one, but git clone has already done it.

sudo apt-get update

sudo apt-get install git cmake libpython3-dev python3-numpy

cd /home1/zhanghui/jetson-inference

mkdir build

cd build

cmake ../

Eh, switch to the Model Downloader page again:

Still choose nothing this time:

Enter the page of whether to install pytoch:

Install this:

You can see that the installer is downloading torch and orchvision

Finally wait until cmake is over:

Then make -j12 (nproc is 12)

While Zhang Xiaobai was happily waiting for the compilation to finish, he suddenly made an error:

Du Niang:

Because the gcc version is not enough. Of course, when Zhang Xiaobai compiled mindspire earlier, he downgraded gcc to version 7.3.0.

Then you have to change the gcc version back:

You need to put / usr/bin/gcc in front of / usr/local/bin/gcc:

Clean up and recompile:

make clean

make -j12


sudo make install

sudo ldconfig

All the operations are finished.

Let's solve the problem of the model. Take a closer look at the previous link Description:

models can also be downloaded on github:

However, this image is on github, which is the same as it is not. One way is to download it somewhere else on the public network. But don't forget, Zhang Xiaobai downloaded it earlier.

Transfer it to / home1 / Zhanghui / Jetson models Directory:

Download from_ models. Sh it can be seen that these files need to be copied or unzipped to / home / zhanghui1 / Jetson information / data / network directory:

For the six files of AlexNet and GoogleNet, use download_ The file method looks like copying it directly.

For other gz files, use down_archive files are actually downloaded files and extracted to OUTPUT_DIR="../data/networks" this directory, and then delete the original gz file.

Then we'll make an extract by ourselves SH, unzip these gz files:

tar -zxvf Deep-Homography-COCO.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf DetectNet-COCO-Airplane.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf DetectNet-COCO-Bottle.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf DetectNet-COCO-Chair.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf DetectNet-COCO-Dog.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf facenet-120.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf FCN-Alexnet-Aerial-FPV-720p.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf FCN-Alexnet-Cityscapes-HD.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf FCN-Alexnet-Cityscapes-SD.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf FCN-Alexnet-Pascal-VOC.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf FCN-Alexnet-SYNTHIA-CVPR16.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf FCN-Alexnet-SYNTHIA-Summer-HD.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf FCN-Alexnet-SYNTHIA-Summer-SD.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf FCN-ResNet18-Cityscapes-1024x512.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf FCN-ResNet18-Cityscapes-2048x1024.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf FCN-ResNet18-Cityscapes-512x256.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf FCN-ResNet18-DeepScene-576x320.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf FCN-ResNet18-DeepScene-864x480.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf FCN-ResNet18-MHP-512x320.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf FCN-ResNet18-MHP-640x360.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf FCN-ResNet18-Pascal-VOC-320x320.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf FCN-ResNet18-Pascal-VOC-512x320.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf FCN-ResNet18-SUN-RGBD-512x400.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf FCN-ResNet18-SUN-RGBD-640x512.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf GoogleNet-ILSVRC12-subset.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf Inception-v4.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf MonoDepth-FCN-Mobilenet.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf MonoDepth-FCN-ResNet18.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf MonoDepth-FCN-ResNet50.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf multiped-500.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf ped-100.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf Pose-DenseNet121-Body.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf Pose-ResNet18-Body.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf Pose-ResNet18-Hand.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf ResNet-101.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf ResNet-152.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf ResNet-18.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf ResNet-50.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf SSD-Inception-v2.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf SSD-Mobilenet-v1.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf SSD-Mobilenet-v2.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf Super-Resolution-BSD500.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf VGG-16.tar.gz -C /home1/zhanghui/jetson-inference/data/networks
tar -zxvf VGG-19.tar.gz -C /home1/zhanghui/jetson-inference/data/networks

The six files can be copied directly:

Then open

Execute the following command:

Clear / home / Zhanghui / Jetson information / data / images / test first/

rm -f /home/zhanghui/jetson-inference/data/images/test/*

cd /home1/zhanghui/jetson-inference/build/aarch64/bin

Parse orange:

./imagenet /home/zhanghui/jetson-inference/data/images/orange_0.jpg /home/zhanghui/jetson-inference/data/images/test/output_0.jpg

Wait patiently for the code to finish executing (the time seems a little long.)

Looking at the log, it seems that some error s have been reported, but looking at the file, it seems that the file has been generated.

cd /home/zhanghui/jetson-inference/data/images/test/

cd /home1/zhanghui/jetson-inference/build/aarch64/bin

Analyze the stawberry:

./imagenet /home/zhanghui/jetson-inference/data/images/strawberry_0.jpg /home/zhanghui/jetson-inference/data/images/test/output_1.jpg


cd /home/zhanghui/jetson-inference/data/images/test/

Look at the results:

Download these two files locally:

Open it:

It seems that Orin is not sure about oranges, but he is very sure about strawberries.

Maybe it's because oranges have relatives called oranges, navel oranges, mandarin oranges, ugly....

Well, this time we just compiled the Jetson information from the source code and ran a simple imagenet code. There are more than 50 networks to Hello. Zhang Xiaobai seems unable to come. And the docker in front didn't seem to run successfully. This problem can only be solved later.

Labor day, it's time to rest.

(to be continued)

Tags: Deep Learning

Posted by iankent on Thu, 05 May 2022 12:36:48 +0300