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

Error when finetuning self-defined dataset: Results do not correspond to current coco set #207

Closed
fireoil opened this issue Jul 2, 2022 · 3 comments

Comments

@fireoil
Copy link

fireoil commented Jul 2, 2022

Evaluating speed.

Evaluating mAP by pycocotools.
Saving ./runs/train/exp/predictions.json...
loading annotations into memory...
Done (t=0.00s)
creating index...
index created!
Loading and preparing results...
ERROR in evaluate and save model.
ERROR in training loop or eval/save model.

Training completed in 0.002 hours.
Traceback (most recent call last):
File "tools/train.py", line 87, in
main(args)
File "tools/train.py", line 77, in main
trainer.train()
File "/zhangxin/training/YOLOv6/yolov6/core/engine.py", line 62, in train
self.train_in_loop()
File "/zhangxin/training/YOLOv6/yolov6/core/engine.py", line 81, in train_in_loop
self.eval_and_save()
File "/zhangxin/training/YOLOv6/yolov6/core/engine.py", line 107, in eval_and_save
self.eval_model()
File "/zhangxin/training/YOLOv6/yolov6/core/engine.py", line 132, in eval_model
task='train')
File "/root/anaconda3/lib/python3.7/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/zhangxin/training/YOLOv6/tools/eval.py", line 76, in run
eval_result = val.eval_model(pred_result, model, dataloader, task)
File "/zhangxin/training/YOLOv6/yolov6/core/evaler.py", line 129, in eval_model
pred = anno.loadRes(pred_json)
File "/root/anaconda3/lib/python3.7/site-packages/pycocotools/coco.py", line 328, in loadRes
'Results do not correspond to current coco set'
AssertionError: Results do not correspond to current coco set

@mtjhl
Copy link
Collaborator

mtjhl commented Jul 3, 2022

Hi, did you set is_coco to False here

@jcrdeep
Copy link

jcrdeep commented Jul 4, 2022

In my case, it by giving the default file name for the JSON file, i.e: instances_val2017.json and also by giving is_coco: False

data/coco.yaml

val: coco3/images/val2017
anno_path: coco3/annotations/instances_val2017.json
is_coco: False

@mtjhl
Copy link
Collaborator

mtjhl commented Aug 19, 2022

@fireoil Does your problem solved? If you still have same proble, please tell us.

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