浏览代码

debug rtdetr_nano

yjh0410 2 年之前
父节点
当前提交
62bd94e43a
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      models/detectors/rtdetr/rtdetr.py

+ 2 - 2
models/detectors/rtdetr/rtdetr.py

@@ -78,8 +78,8 @@ class RTDETR(nn.Module):
 
         # denormalize bbox
         img_h, img_w = x.shape[-2:]
-        box_pred[..., 0::2] *= img_w
-        box_pred[..., 1::2] *= img_h
+        topk_bboxes[..., 0::2] *= img_w
+        topk_bboxes[..., 1::2] *= img_h
 
         if self.deploy:
             return topk_bboxes, topk_scores, topk_labels