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

Evaluation on COCO Val 2017 with COCO annotations #547

Open
ztc20011103 opened this issue Dec 9, 2024 · 0 comments
Open

Evaluation on COCO Val 2017 with COCO annotations #547

ztc20011103 opened this issue Dec 9, 2024 · 0 comments

Comments

@ztc20011103
Copy link

ztc20011103 commented Dec 9, 2024

Can I use dist_test.sh to evaluate the model on COCO Val 2017 by changing the class_text_path into coco_class_text.json and ann_file into instances_val2017.json in the model config file? I got KeyError: 'neg_category_ids' when I have a try. It seems that lvis/eval.py is adopted to do evaluation and I have no idea how to integrate COCO/eval.py
12/09 04:50:31 - mmengine - INFO - Evaluating bbox...
[rank0]: Traceback (most recent call last):
[rank0]: File "/mnt/c/Users/10549/YOLO-World/./tools/test.py", line 150, in
[rank0]: main()
[rank0]: File "/mnt/c/Users/10549/YOLO-World/./tools/test.py", line 146, in main
[rank0]: runner.test()
[rank0]: File "/home/ztc/anaconda3/envs/yolo/lib/python3.9/site-packages/mmengine/runner/runner.py", line 1823, in test
[rank0]: metrics = self.test_loop.run() # type: ignore
[rank0]: File "/home/ztc/anaconda3/envs/yolo/lib/python3.9/site-packages/mmengine/runner/loops.py", line 448, in run
[rank0]: metrics = self.evaluator.evaluate(len(self.dataloader.dataset))
[rank0]: File "/home/ztc/anaconda3/envs/yolo/lib/python3.9/site-packages/mmengine/evaluator/evaluator.py", line 79, in evaluate
[rank0]: _results = metric.evaluate(size)
[rank0]: File "/home/ztc/anaconda3/envs/yolo/lib/python3.9/site-packages/mmengine/evaluator/metric.py", line 133, in evaluate
[rank0]: _metrics = self.compute_metrics(results) # type: ignore
[rank0]: File "/home/ztc/anaconda3/envs/yolo/lib/python3.9/site-packages/mmdet/evaluation/metrics/lvis_metric.py", line 315, in compute_metrics
[rank0]: lvis_eval.evaluate()
[rank0]: File "/home/ztc/anaconda3/envs/yolo/lib/python3.9/site-packages/lvis/eval.py", line 130, in evaluate
[rank0]: self._prepare()
[rank0]: File "/home/ztc/anaconda3/envs/yolo/lib/python3.9/site-packages/lvis/eval.py", line 90, in _prepare
[rank0]: img_nl = {d["id"]: d["neg_category_ids"] for d in img_data}
[rank0]: File "/home/ztc/anaconda3/envs/yolo/lib/python3.9/site-packages/lvis/eval.py", line 90, in
[rank0]: img_nl = {d["id"]: d["neg_category_ids"] for d in img_data}
[rank0]: KeyError: 'neg_category_ids'

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