"torchvision/vscode:/vscode.git/clone" did not exist on "6af6bf45cc36455e119cbb600503c7d0c8700ff4"
Unverified Commit 395b86d7 authored by Zephyr's avatar Zephyr Committed by GitHub
Browse files

Dev 1.x Adapt PETR to mmcv v2 version dataset (#2800)

parent 5c0613be
......@@ -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
......
......@@ -446,7 +446,7 @@ class PETRHead(AnchorFreeHead):
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:])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment