GeekAlexis / FastMOT

High-performance multiple object tracking based on YOLO, Deep SORT, and KLT 🚀
MIT License
1.15k stars 253 forks source link

Nothing is detected after replacing onnx #227

Closed tingriley closed 2 years ago

tingriley commented 2 years ago

Current Behavior

looks like nothing has been deteced when using a different onnx file

How to Reproduce

  1. download yolov4 pre-trained weights from https://github.com/kiyoshiiriemon/yolov4_darknet
  2. convert weights to onnx using ./scripts/yolo2onnx.py --config yolov4.cfg --weights yolov4.weights
  3. run detection python3 ./app.py -i ~/benchmark/MOT20-01-raw.mp4 --mot -o test.mp4 [code in yolo.py] ENGINE_PATH = Path(file).parent / 'yolov4.trt' MODEL_PATH = Path(file).parent / 'yolov4.onnx' NUM_CLASSES = 80 INPUT_SHAPE = (3, 608, 608) LAYER_FACTORS = [8, 16, 32] SCALES = [1.2, 1.1, 1.05] ANCHORS = [[12, 16, 19, 36, 40, 28],[36, 75, 76, 55, 72, 146],[142, 110, 192, 243, 459, 401]]

Describe what you want to do

  1. What input videos you will provide, if any: https://motchallenge.net/vis/MOT20-01
  2. What outputs you are expecting: detect at least one class of objects
  3. Ask your questions here, if any: the program runs perfectly when using yolov4_crowdhuman.onnx, however, it fails to detect anything when using custom cfg and weights. Is there anything I did wrong? Any feedback would be appreciated.

Your Environment

tingriley commented 2 years ago

I solved it by adding class_ids to mot_cfg.json