Skip to content

[Feature] Support CityScapesDetection Metric#103

Open
BIGWangYuDong wants to merge 11 commits into
open-mmlab:mainfrom
BIGWangYuDong:city
Open

[Feature] Support CityScapesDetection Metric#103
BIGWangYuDong wants to merge 11 commits into
open-mmlab:mainfrom
BIGWangYuDong:city

Conversation

@BIGWangYuDong
Copy link
Copy Markdown
Collaborator

No description provided.

@BIGWangYuDong BIGWangYuDong requested a review from zhouzaida as a code owner March 1, 2023 11:22
@BIGWangYuDong BIGWangYuDong requested review from RangiLyu and removed request for zhouzaida March 1, 2023 11:23
Comment thread tests/test_metrics/test_cityscapes_detection.py Outdated
Comment thread mmeval/metrics/cityscapes_detection.py Outdated
Comment thread mmeval/metrics/cityscapes_detection.py Outdated
Comment thread mmeval/metrics/cityscapes_detection.py Outdated
Comment on lines +65 to +68
>>> dataset_metas = {
... 'classes': ('person', 'rider', 'car', 'truck', 'bus', 'train',
... 'motorcycle', 'bicycle')
... }
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If dataset_meta is required in this Metric, it must be explained in the docstring

Comment thread mmeval/metrics/cityscapes_detection.py Outdated
Comment thread mmeval/metrics/cityscapes_detection.py
Comment thread mmeval/metrics/cityscapes_detection.py
Comment thread mmeval/metrics/cityscapes_detection.py Outdated
Comment thread mmeval/metrics/cityscapes_detection.py
Comment thread mmeval/metrics/cityscapes_detection.py Outdated
Comment thread mmeval/metrics/cityscapes_detection.py Outdated
Comment on lines +134 to +146
cityscapes_det_metric = CityScapesDetection(
dataset_meta=dataset_metas,
format_only=True,
outfile_prefix=osp.join(tmp_dir.name, 'test'),
seg_prefix=seg_prefix,
keep_results=True,
keep_gt_json=True,
classwise=True)

eval_results = cityscapes_det_metric(
predictions=predictions, groundtruths=groundtruths)
assert osp.exists(f'{osp.join(tmp_dir.name, "test")}')
assert eval_results == dict()
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should add a test case: call metric.add >= 2 times and then metric.compute

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

already compute 2 times. len(predictions) == len(groundtruths) == 2

Comment thread mmeval/metrics/cityscapes_detection.py Outdated
@BIGWangYuDong BIGWangYuDong requested a review from C1rN09 March 7, 2023 14:30
Comment thread mmeval/metrics/cityscapes_detection.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants