diff --git a/projects/PETR/README.md b/projects/PETR/README.md index 08e1e10fef..dcf7182ed2 100644 --- a/projects/PETR/README.md +++ b/projects/PETR/README.md @@ -16,7 +16,7 @@ This is an implementation of *PETR*. In MMDet3D's root directory, run the following command to train the model: ```bash -python tools/train.py projects/PETR/config/petr/petr_vovnet_gridmask_p4_800x320.py +python tools/train.py projects/PETR/configs/petr_vovnet_gridmask_p4_800x320.py ``` ### Testing commands @@ -24,7 +24,7 @@ python tools/train.py projects/PETR/config/petr/petr_vovnet_gridmask_p4_800x320. In MMDet3D's root directory, run the following command to test the model: ```bash -python tools/test.py projects/PETR/config/petr/petr_vovnet_gridmask_p4_800x320.py ${CHECKPOINT_PATH} +python tools/test.py projects/PETR/configs/petr_vovnet_gridmask_p4_800x320.py ${CHECKPOINT_PATH} ``` ## Results diff --git a/projects/PETR/petr/petr_head.py b/projects/PETR/petr/petr_head.py index 2b6e088e57..acebd627f4 100644 --- a/projects/PETR/petr/petr_head.py +++ b/projects/PETR/petr/petr_head.py @@ -446,7 +446,7 @@ def forward(self, mlvl_feats, img_metas): masks = x.new_ones((batch_size, num_cams, input_img_h, input_img_w)) for img_id in range(batch_size): for cam_id in range(num_cams): - img_h, img_w, _ = img_metas[img_id]['img_shape'][cam_id] + img_h, img_w = img_metas[img_id]['img_shape'][cam_id] masks[img_id, cam_id, :img_h, :img_w] = 0 x = self.input_proj(x.flatten(0, 1)) x = x.view(batch_size, num_cams, *x.shape[-3:])