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

pred_score的shape是[b,8400,nc+1]还是[b,8400,nc]? #75

Closed fppccc closed 1 year ago

fppccc commented 1 year ago

Before Asking

Search before asking

Question

您好,我在调试代码的时候发现,最后的pred_score的shape是[b,8400,nc+1],请问正常情况下是不是应该为[b,8400,nc]?这是否意味着我的数据集类别映射错误? 同时,我也发现我的数据集COCO格式的json标注中,类别从1开始,是不是从0开始就能解决这个问题?

Additional

No response

cwhgn commented 1 year ago

感谢关注!nc+1中多出来的+1维是为了兼容之前版本不同的index映射,不影响正常训练的。COCO数据index从0开始是没问题的,我们在处理COCO数据时会把他重新映射的,如下代码: https://github.com/tinyvision/DAMO-YOLO/blob/9dc625e54edf3c07474630efdbbd397dd857e168/damo/dataset/datasets/coco.py#L21-L28