-
Notifications
You must be signed in to change notification settings - Fork 9.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issue with list of metrics in CustomDataset.evaluate #2128
Conversation
Changes to be committed: modified: mmdet/datasets/custom.py
mmdet/datasets/custom.py
Outdated
@@ -178,12 +178,14 @@ def evaluate(self, | |||
scale_ranges (list[tuple] | None): Scale ranges for evaluating mAP. | |||
Default: None. | |||
""" | |||
metrics = metric if isinstance(metric, list) else [metric] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix! Since "mAP" and "recall" cannot be evaluated at the same time, we may simply cast metric to a str like in voc dataset.
if not isinstance(metric, str):
assert len(metric) == 1
metric = metric[0]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I did not immediately realized that recall and mAP accept different parameters. I will make changes and resubmit.
Changes to be committed: modified: mmdet/datasets/custom.py
* jon/dev/fix_fpn2: (33 commits) Fix FPN upscale fix analyze log (open-mmlab#2150) Fix a documentation error in GETTING_STARTED.md (open-mmlab#2149) add optimizer registry (open-mmlab#2139) Update version to 1.1 (open-mmlab#2144) Fix IOU assigners when ignore_of_thr > 0 and no pred boxes (open-mmlab#2135) reset worker_seed (open-mmlab#2111) Fix issue with list of metrics in CustomDataset.evaluate (open-mmlab#2128) Code Release: CARAFE: Content-Aware ReAssembly of FEatures (ICCV 2019) (open-mmlab#1583) fixed test package (open-mmlab#2127) add an argument format-only to handle the json formating (open-mmlab#2114) fix (get_cls_results): use np.empty for empty bbox rather than np.arrary (open-mmlab#2116) fix (dpool): directly return empty if rois's length is 0 (open-mmlab#2099) fix workflow problem (open-mmlab#2103) Uint8 fix (open-mmlab#2105) Fix device bug (open-mmlab#2098) fix test ddp initialize (open-mmlab#2100) set FORCE_CUDA (open-mmlab#2097) Speed up sampler (open-mmlab#2094) Use official DDP to implement MMDDP (open-mmlab#2090) ...
* tag 'v1.1.0': (29 commits) Update version to 1.1 (open-mmlab#2144) Fix IOU assigners when ignore_of_thr > 0 and no pred boxes (open-mmlab#2135) reset worker_seed (open-mmlab#2111) Fix issue with list of metrics in CustomDataset.evaluate (open-mmlab#2128) Code Release: CARAFE: Content-Aware ReAssembly of FEatures (ICCV 2019) (open-mmlab#1583) fixed test package (open-mmlab#2127) add an argument format-only to handle the json formating (open-mmlab#2114) fix (get_cls_results): use np.empty for empty bbox rather than np.arrary (open-mmlab#2116) fix (dpool): directly return empty if rois's length is 0 (open-mmlab#2099) fix workflow problem (open-mmlab#2103) Uint8 fix (open-mmlab#2105) Fix device bug (open-mmlab#2098) fix test ddp initialize (open-mmlab#2100) set FORCE_CUDA (open-mmlab#2097) Speed up sampler (open-mmlab#2094) Use official DDP to implement MMDDP (open-mmlab#2090) log meta (open-mmlab#2086) fix pad_val not used in class Pad when pad to a fixed size (open-mmlab#2093) remove cython docs (open-mmlab#2091) remove new_tensor (open-mmlab#2092) ...
…2128) * Fix issue with list of metrics in CustomDataset.evaluate Changes to be committed: modified: mmdet/datasets/custom.py * Updated to evaluate only one of mAP or recall Changes to be committed: modified: mmdet/datasets/custom.py
…2128) * Fix issue with list of metrics in CustomDataset.evaluate Changes to be committed: modified: mmdet/datasets/custom.py * Updated to evaluate only one of mAP or recall Changes to be committed: modified: mmdet/datasets/custom.py
…2128) * Fix issue with list of metrics in CustomDataset.evaluate Changes to be committed: modified: mmdet/datasets/custom.py * Updated to evaluate only one of mAP or recall Changes to be committed: modified: mmdet/datasets/custom.py
Changes to be committed:
modified: mmdet/datasets/custom.py