Skip to content

lightNet (Object Detection and Semantic Segmentation) for ONNX and TensorRT

License

Notifications You must be signed in to change notification settings

fateshelled/lightNet-ONNX

Repository files navigation

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

About

lightNet (Object Detection and Semantic Segmentation) for ONNX and TensorRT

Topics

Resources

License

Stars

Watchers

Forks