Skip to content
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

How to show the recognition accuracy of each category when using model evaluation? #533

Open
wowangle97 opened this issue Nov 28, 2024 · 1 comment

Comments

@wowangle97
Copy link

Hello, I used coco dataset when I was using model fine-tuning. I modified metric=['bbox', 'segm'] in val_evaluator according to the mmengine user manual, and the metric of bbox was obtained during evaluation, but raise an error:
File "/home/work/miniforge3/envs/yoloworld/lib/python3.9/site-packages/mmengine/runner/runner.py", line 1777, in train
model = self.train_loop.run() # type: ignore
File "/home/work/miniforge3/envs/yoloworld/lib/python3.9/site-packages/mmengine/runner/loops.py", line 102, in run
self.runner.val_loop.run()
File "/home/work/miniforge3/envs/yoloworld/lib/python3.9/site-packages/mmengine/runner/loops.py", line 374, in run
metrics = self.evaluator.evaluate(len(self.dataloader.dataset))
File "/home/work/miniforge3/envs/yoloworld/lib/python3.9/site-packages/mmengine/evaluator/evaluator.py", line 79, in evaluate
_results = metric.evaluate(size)
File "/home/work/miniforge3/envs/yoloworld/lib/python3.9/site-packages/mmengine/evaluator/metric.py", line 133, in evaluate
_metrics = self.compute_metrics(results) # type: ignore
File "/home/work/miniforge3/envs/yoloworld/lib/python3.9/site-packages/mmdet/evaluation/metrics/coco_metric.py", line 446, in compute_metrics
raise KeyError(f'{metric} is not in results')
KeyError: 'segm is not in results'
how can I modify the code to show the recognition accuracy of each category in the evaluation? As the picture shows, thank you!
image

@wowangle97 wowangle97 changed the title 如何使用模型评估时显示各个类别的识别准确度 How to show the recognition accuracy of each category when using model evaluation? Nov 28, 2024
@wowangle97
Copy link
Author

I have solved this problem. Thank you.

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

No branches or pull requests

1 participant