Skip to content

Commit

Permalink
feat: support segm metric
Browse files Browse the repository at this point in the history
  • Loading branch information
Noietch authored and LutingWang committed Sep 6, 2023
1 parent bf93f67 commit d641d28
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"Netdisk",
"oadp",
"oake",
"segm",
"soco",
"vild"
]
Expand Down
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,13 @@ To test a specific checkpoint

```bash
[DRY_RUN=True] (python|torchrun --nproc_per_node=${GPUS}) -m oadp.dp.test configs/dp/oadp_ov_coco.py work_dirs/oadp_ov_coco/iter_32000.pth
[DRY_RUN=True] (python|torchrun --nproc_per_node=${GPUS}) -m oadp.dp.test configs/dp/oadp_ov_lvis.py work_dirs/oadp_ov_lvis/epoch_24.pth
```

For the instance segmentation performance on LVIS, use the `metrics` argument

```bash
[DRY_RUN=True] (python|torchrun --nproc_per_node=${GPUS}) -m oadp.dp.test configs/dp/oadp_ov_lvis.py work_dirs/oadp_ov_lvis/epoch_24.pth --metrics bbox segm
```

NNI is supported but unnecessary.
Expand All @@ -314,9 +321,10 @@ The checkpoints for OADP are available on [Baidu Netdisk][].

### OV LVIS

| APr | Config | Checkpoint |
| :-: | :-: | :-: |
| $20.7$ | [oadp_ov_lvis.py](configs/dp/oadp_ov_lvis.py) | work_dirs/oadp_ov_lvis/epoch_24.pth |
| OD APr | IS APr | Config | Checkpoint |
| :-: | :-: | :-: | :-: |
| $20.6$ | $19.9$ | [oadp_ov_lvis.py](configs/dp/oadp_ov_lvis.py) | work_dirs/oadp_ov_lvis/epoch_24.pth |
| | | [oadp_ov_lvis_lsj.py](configs/dp/oadp_ov_lvis_lsj.py) | Coming soon |

[Baidu Netdisk]: https://pan.baidu.com/s/1HXWYSN9Vk6yDhjRI19JrfQ?pwd=OADP
[DetPro]: https://github.com/dyabel/detpro
3 changes: 2 additions & 1 deletion oadp/dp/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def parse_args() -> argparse.Namespace:
parser.add_argument('config', type=todd.Config.load)
parser.add_argument('checkpoint', help='checkpoint file')
parser.add_argument('--override', action=todd.DictAction)
parser.add_argument('--metrics', nargs='+', default=['bbox'])
args = parser.parse_args()
return args

Expand Down Expand Up @@ -80,7 +81,7 @@ def main() -> None:
raise NotImplementedError

if todd.get_rank() == 0:
metric = dataset.evaluate(outputs)
metric = dataset.evaluate(outputs, args.metrics)
todd.logger.info('\n' + pprint.pformat(metric))


Expand Down

0 comments on commit d641d28

Please sign in to comment.