From d641d28c77e551f748019f81ee4574b2a63a6366 Mon Sep 17 00:00:00 2001 From: Noietch Date: Wed, 30 Aug 2023 12:26:40 +0800 Subject: [PATCH] feat: support segm metric --- .vscode/settings.json | 1 + README.md | 14 +++++++++++--- oadp/dp/test.py | 3 ++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index a1a07f8..263acc9 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,6 +5,7 @@ "Netdisk", "oadp", "oake", + "segm", "soco", "vild" ] diff --git a/README.md b/README.md index 979faad..375629d 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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 diff --git a/oadp/dp/test.py b/oadp/dp/test.py index a0bd4cb..88b3f6f 100644 --- a/oadp/dp/test.py +++ b/oadp/dp/test.py @@ -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 @@ -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))