Difference between revisions of "Deploying Deep Learning"

From ESS-WIKI
Jump to: navigation, search
m
m
 
(5 intermediate revisions by the same user not shown)
Line 6: Line 6:
  
 
Reference : https://github.com/dusty-nv/jetson-inference/blob/L4T-R32.5.0/docs/building-repo-2.md
 
Reference : https://github.com/dusty-nv/jetson-inference/blob/L4T-R32.5.0/docs/building-repo-2.md
 +
 +
''' Build Jetson Inference '''
 +
 +
Here's a condensed form of the commands to build/install the project directly on your Jetson.
  
 
<pre>$ sudo apt-get update
 
<pre>$ sudo apt-get update
Line 22: Line 26:
  
 
Reference : https://github.com/dusty-nv/jetson-inference/blob/L4T-R32.5.0/docs/imagenet-console-2.md
 
Reference : https://github.com/dusty-nv/jetson-inference/blob/L4T-R32.5.0/docs/imagenet-console-2.md
<br/>
+
 
 
''' Using the ImageNet Program on Jetson '''
 
''' Using the ImageNet Program on Jetson '''
  
Line 30: Line 34:
 
</pre>
 
</pre>
  
Next, let's classify an example image with the imagenet program, using Python variants.These images will then be easily viewable from your host device in the jetson-inference/data/images/test directory.
+
Next, let's classify an example image with the imagenet program, using Python.These images will then be easily viewable from your host device in the jetson-inference/data/images/test directory.
  
<pre>$ ./imagenet.py images/strawberry_0.jpg images/test/output_1.jpg
+
<pre>$ ./imagenet.py images/strawberry_0.jpg images/test/strawberry.jpg
 
</pre>
 
</pre>
  
 
[[File:Identify strawberry.jpg|thumb|left|strawberry]]
 
[[File:Identify strawberry.jpg|thumb|left|strawberry]]
  
 +
<br/>
 
<br/>
 
<br/>
 
<br/>
 
<br/>
Line 52: Line 57:
 
''' Detecting Objects from Images '''
 
''' Detecting Objects from Images '''
  
make sure your terminal is located in the aarch64/bin directory.
+
Make sure your terminal is located in the aarch64/bin directory.
  
 
<pre>$ cd jetson-inference/build/aarch64/bin
 
<pre>$ cd jetson-inference/build/aarch64/bin
Line 59: Line 64:
 
Here are some examples of detecting pedestrians in images with the default SSD-Mobilenet-v2 model.
 
Here are some examples of detecting pedestrians in images with the default SSD-Mobilenet-v2 model.
  
<pre>$ ./detectnet.py --network=ssd-mobilenet-v2 images/peds_0.jpg images/test/output.jpg
+
<pre>$ ./detectnet.py --network=ssd-mobilenet-v2 images/peds_0.jpg images/test/person.jpg
 
</pre>
 
</pre>
  
Line 76: Line 81:
 
''' Processing Video Files '''
 
''' Processing Video Files '''
  
You can also process videos from disk. There are some test videos found on your Jetson under /usr/share/visionworks/sources/data
+
You can also process videos from disk. There are some test videos found on your Jetson under /usr/share/visionworks/sources/data .
  
<pre>./detectnet.py /usr/share/visionworks/sources/data/pedestrians.mp4 images/test/pedestrians_ssd.mp4
+
<pre>$ ./detectnet.py /usr/share/visionworks/sources/data/pedestrians.mp4 images/test/pedestrians_identify.mp4
 
</pre>
 
</pre>
  
 
[[File:Pedestrians.png|thumb|left|pedestrians]]
 
[[File:Pedestrians.png|thumb|left|pedestrians]]

Latest revision as of 08:28, 14 October 2022

Linux Version

Ubuntu 18.04
L4T-R32.5.0

Build Deep Learning on Jeston

Reference : https://github.com/dusty-nv/jetson-inference/blob/L4T-R32.5.0/docs/building-repo-2.md

Build Jetson Inference

Here's a condensed form of the commands to build/install the project directly on your Jetson.

$ sudo apt-get update
$ sudo apt-get install git cmake libpython3-dev python3-numpy
$ git clone --recursive https://github.com/dusty-nv/jetson-inference
$ cd jetson-inference
$ mkdir build
$ cd build
$ cmake ../
$ make -j$(nproc)
$ sudo make install
$ sudo ldconfig

Classifying Images with ImageNet

Reference : https://github.com/dusty-nv/jetson-inference/blob/L4T-R32.5.0/docs/imagenet-console-2.md

Using the ImageNet Program on Jetson

After building the project, make sure your terminal is located in the aarch64/bin directory.

$ cd jetson-inference/build/aarch64/bin

Next, let's classify an example image with the imagenet program, using Python.These images will then be easily viewable from your host device in the jetson-inference/data/images/test directory.

$ ./imagenet.py images/strawberry_0.jpg images/test/strawberry.jpg
strawberry










Locating Objects with DetectNet

Reference : https://github.com/dusty-nv/jetson-inference/blob/L4T-R32.5.0/docs/detectnet-console-2.md

Detecting Objects from Images

Make sure your terminal is located in the aarch64/bin directory.

$ cd jetson-inference/build/aarch64/bin

Here are some examples of detecting pedestrians in images with the default SSD-Mobilenet-v2 model.

$ ./detectnet.py --network=ssd-mobilenet-v2 images/peds_0.jpg images/test/person.jpg
person










Processing Video Files

You can also process videos from disk. There are some test videos found on your Jetson under /usr/share/visionworks/sources/data .

$ ./detectnet.py /usr/share/visionworks/sources/data/pedestrians.mp4 images/test/pedestrians_identify.mp4
pedestrians