Parcourir la source

debug rtdetr_nano

yjh0410 il y a 2 ans
Parent
commit
62bd94e43a
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  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