FastMOT icon indicating copy to clipboard operation
FastMOT copied to clipboard

Custom Detector (YoloX, YoloR, CentreDet) Integration

Open edmuthiah opened this issue 4 years ago • 3 comments

Hey again @GeekAlexis

Great work on the repo so far. I would like to contribute by adding a few custom models like centrenet, yolor, yolox.

I know that these models need to be converted to ONNX or TensorRT first, perhaps using torch2trt. Could you please provide some general steps as to how to achieve this? From my understanding we need to do the following:

  • Convert to TensorRT engine by adding to /fastmot/models/
  • Add custom model params to /fastmot/cfg/mot.json
  • Create detector in /fastmot/detector.py

Thanks! I'll probably start with YoloX which already has TensorRT support

edmuthiah avatar Aug 25 '21 15:08 edmuthiah

The general workflow is correct. Also it is recommended to use the same ONNX -> TensorRT conversion.

You also want to create yolox.py or yolor.py for ONNX to TRT conversion. If extra TRT plugins are required, they need to be accounted for as well.

What is YOLOX’s advantages over Scaled-YOLOv4?

GeekAlexis avatar Aug 26 '21 05:08 GeekAlexis

The usual claims of being better, faster, stronger haha

https://towardsdatascience.com/how-to-train-yolox-on-a-custom-dataset-bb2f94cdb038

Screenshot_20210826-154643_Drive.jpg

I'm just curious to try out and compare several different detectors.

edmuthiah avatar Aug 26 '21 06:08 edmuthiah

Performance looks similar to yolov4-csp-swish but it might be worth a try. You can try using torch2trt in yolox.py if it doesn’t add too many dependencies.

GeekAlexis avatar Aug 26 '21 16:08 GeekAlexis