Skip to content

Latest commit

 

History

History
56 lines (46 loc) · 1.48 KB

README.md

File metadata and controls

56 lines (46 loc) · 1.48 KB

lightNet-ONNX

ONNX and TensorRT demo for lightNet-TRT

demo

demo video is MOT16-14

Requirements

Convert to ONNX model

  • Pytorch
  • NumPy
  • ONNX
  • onnxsim

ONNX demo

  • ONNXRuntime
  • OpenCV
  • NumPy

TensorRT demo

  • TensorRT
  • PyCUDA
  • OpenCV
  • NumPy

Usage

Convert weights to ONNX model

  • Download cfg file and weights file from lightNet-TRT
  • convert weights to onnx model by following script.
python convert2onnx.py lightNet-BDD100K-det-semaseg-1280x960.cfg \
                       lightNet-BDD100K-det-semaseg-1280x960.weights \
                       lightNet-BDD100K-det-semaseg-1280x960.onnx 

Convert ONNX model to TensorRT engine

source convert2trt.bash lightNet-BDD100K-det-semaseg-1280x960.onnx \
                        lightNet-BDD100K-det-semaseg-1280x960.engine

Run ONNX Demo

python demo_onnx.py --onnx_model_path lightNet-BDD100K-det-semaseg-1280x960.onnx \
                    --video_path {video or webcam path}

Run TensorRT Demo

python demo_trt.py --engine_path lightNet-BDD100K-det-semaseg-1280x960.engine \
                    --video_path {video or webcam path}

Reference