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

Nanos models onnx exportation inconsistent with previous model #99

Closed lucasjinreal closed 1 year ago

lucasjinreal commented 1 year ago

Search before asking

Description

Previous model have outputs concatenated, but new one separated a lot.

This is not a problem, but caused very serious inconsistency for deploy code which could be same without even change a line to deploy all DAMO series models

Old:

image

New:

image

Can we just merge them all exactly same as previous and same like yolov5/yolov7/yolov8 so that deploy code can compatible at maximum?

Use case

No response

Additional

No response

Are you willing to submit a PR?

lucasjinreal commented 1 year ago

Also, I even doubt the new nanos models are wrong, since I can not really figure out where is box....

XianzheXu commented 1 year ago

Hi, the new model's in model zoo is exported with --benchmark, which means the post-processing is ignored. You can export onnx model without --benchmark to keep consistency with your deploy codes.

In the onnx output, tensor shaped as [1, 32, 52, 52], [1, 32, 26, 26], [1, 32, 13, 13] is the box before post-process. This is for the benchmark consistency with picodet.

XianzheXu commented 1 year ago

In order to provide convenience for developers and maintain consistency with our previous code, we have updated the ONNX download link. You can now download the ONNX model that includes post-processing.

lucasjinreal commented 1 year ago

@XianzheXu thank u so much!

lucasjinreal commented 1 year ago

@XianzheXu hi, I downloaded damoyolo_nano_small.onnx, it still same.

XianzheXu commented 1 year ago

@XianzheXu hi, I downloaded damoyolo_nano_small.onnx, it still same.

Please retry it, the download link is updated now.