Skip to content

mAy-I/deepstream_centernet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deploying CenterNet model using NVIDIA DeepStream

This repository contains contains the the code and configuration files required to deploy CenterNet models video analytics using DeepStream SDK 6.0.

Installation

Please refer to Install.md for installation.

Getting Started

Install rich and opencv-python

pip install -r requirements.txt

  • Rich is great progress bar tool

To run Deepsteam, change the ONNX to TensorRT

cd apps/centernet
python onnx2trt.py \
  --load_model models/multi_pose_dla34_coco_3x.onnx \
  --save_model models/multi_pose_dla34_coco_3x_b4_512_fp16.plan \
  --batch_size 4 \
  --fp16

Custom Parser

cd apps/centernet/lib && make

Run

To Run deepstream centernet:

python apps/centernet/deepstream_centernet.py \
  --video_file file:///test1.mp4\ file:///test2.mp4 \
  --batch_size 4 \
  --save_folder result

result format(json):

detection_result = {
  "stream_0": {
    "frame_index": [
      {"bbox": [x1, y1, x2, y2], "score": 0.xx},
      ...
      ]
  }
}
Visualize We are mAy-I !!

Reference