tinyvision / DAMO-YOLO

DAMO-YOLO: a fast and accurate object detection method with some new techs, including NAS backbones, efficient RepGFPN, ZeroHead, AlignedOTA, and distillation enhancement.
Apache License 2.0
3.75k stars 470 forks source link

[Bug]: #127

Open ategen3rt opened 11 months ago

ategen3rt commented 11 months ago

Before Reporting

Search before reporting

OS

Ubuntu

Device

Nvidia T4

CUDA version

12.2

TensorRT version

8.6.1.6

Python version

3.10

PyTorch version

2.0.1+cu117

torchvision version

2.0.1+cu117

Describe the bug

tensorRT model for tensorRT 8 outputs incorrect bounding boxes. Technically, since it's incorrectly interpreting the input tensor, it could be wrong out the rest of the output too.

python tools/converter.py -f configs/damoyolo_tinynasL45_L.py -c model.pth --batch_size 1 --img_size 1024 --trt --end2end

This was discussed in #102

It is fixed in PR #113 which changes box_coding from 1 (BoxCenterSize) to 0 (BoxCorner). See https://github.com/NVIDIA/TensorRT/tree/release/8.6/plugin/efficientNMSPlugin for more information on the parameters.

To Reproduce

Run python tools/converter.py -f configs/damoyolo_tinynasL45_L.py -c best.pth --batch_size 1 --img_size 1024 --trt --end2end --trt_eval

The evaluation is 0%.
I also use demo command to predict some images. The output show that the bounding box seem randomly.

Hyper-parameters/Configs

No response

Logs

No response

Screenshots

No response

Additional

No response