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

Results do not correspond to current coco set #969

Open
3 tasks done
EudicL opened this issue Jan 26, 2024 · 3 comments
Open
3 tasks done

Results do not correspond to current coco set #969

EudicL opened this issue Jan 26, 2024 · 3 comments

Comments

@EudicL
Copy link

EudicL commented Jan 26, 2024

Prerequisite

🐞 Describe the bug

Why does running the command report this error, but evaluating it in training is fine

‘python tools/test.py work_dir/ppyoloe.py work_dirs/ppyoloe/best_coco_bbox_mAP_epoch_230.pth’

assert set(annsImgIds) == (set(annsImgIds) & set(self.getImgIds())),
AssertionError: Results do not correspond to current coco set

Environment

pytorch1.8.1

Additional information

None

@amira-essawy
Copy link

@EudicL I got a similar error but during the evaluation in training YOLOv5, do you know why?

@mgh233
Copy link

mgh233 commented Feb 13, 2024

I got a similar error during the inference of YOLOv8, too. Seems like a common problem.

@tarv33
Copy link

tarv33 commented Apr 10, 2024

In my case, it is reusing the val_evaluator and test_evaluator in old config. In that case, it loads ann file from coco dataset instead of my new dataset. Here is my solution, hope it would help.

# in the bottom of config file, add these lines
val_evaluator = dict(
    type="mmdet.CocoMetric",
    proposal_nums=(100, 1, 10),
    ann_file="Path/to/your/new_val.json",
    metric="bbox",
)
test_evaluator = val_evaluator

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

4 participants