Skip to content

TensorRT Examples on Jetson Nano in Python for SSD

Notifications You must be signed in to change notification settings

taka-wang/trt_example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TensorRT Examples on Jetson

I merged the following two repos to this one for my Jetson Nano.

  1. AastaNV/TRT_object_detection
  2. NVIDIA/object-detection-tensorrt-example

Background

Jetpack 4.2 with 1.12.2 self-build tensorflow installed on my Jetson Nano.

Install

Run all steps on your target platform, ex. Jetson Nano.

  1. Install tensorflow-gpu with tensorRT enabled on your Jetson platform
  2. Install pycuda (ref this for Jetson Nano)
  3. Patch your graphsurgeon converter, please refer to the next section.
  4. Put your frozen_inference_graph.pb to the repo root.
  5. Modify config/model_ssd_mobilenet_v2_coco_2018_03_29.py with your own numClasses.
  6. Modify utils/coco.py to your classes
  7. Run convery.py with one picture, ex. python3 convert.py 1.jpg
    • this step will generate uff and bin files on the repo root
  8. Run camera.py, ex. python3 camera, enjoy!

Update graphsurgeon converter

Edit /usr/lib/python3.6/dist-packages/graphsurgeon/node_manipulation.py

diff --git a/node_manipulation.py b/node_manipulation.py
index d2d012a..1ef30a0 100644
--- a/node_manipulation.py
+++ b/node_manipulation.py
@@ -30,6 +30,7 @@ def create_node(name, op=None, _do_suffix=False, **kwargs):
     node = NodeDef()
     node.name = name
     node.op = op if op else name
+    node.attr["dtype"].type = 1
     for key, val in kwargs.items():
         if key == "dtype":
             node.attr["dtype"].type = val.as_datatype_enum

About

TensorRT Examples on Jetson Nano in Python for SSD

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages