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

得到 TensorRT 模型后,评估其性能出现错误'Results do not correspond to current coco set' #825

Open
4 tasks done
Superwen1017 opened this issue May 11, 2023 · 2 comments
Labels
question Further information is requested

Comments

@Superwen1017
Copy link

Before Asking

  • I have read the README carefully. 我已经仔细阅读了README上的操作指引。

  • I want to train my custom dataset, and I have read the tutorials for training your custom data carefully and organize my dataset correctly; (FYI: We recommand you to apply the config files of xx_finetune.py.) 我想训练自定义数据集,我已经仔细阅读了训练自定义数据的教程,以及按照正确的目录结构存放数据集。(FYI: 我们推荐使用xx_finetune.py等配置文件训练自定义数据集。)

  • I have pulled the latest code of main branch to run again and the problem still existed. 我已经拉取了主分支上最新的代码,重新运行之后,问题仍不能解决。

Search before asking

  • I have searched the YOLOv6 issues and found no similar questions.

Question

当我们得到 TensorRT 模型后,我们可以通过以下方式评估其性能:python deploy/ONNX/eval_trt.py --weights yolov6s.engine --batch-size=1 --data data/coco.yaml
当我用tensorrt进行推理时,测试性能时会出现错误'Results do not correspond to current coco set'
set(annsImgIds) == (set(annsImgIds) & set(self.getImgIds()))
这句话出现了问题,annsImgIds 数量和self.getImgIds()数量不相等且格式不一样。我没有动过源代码,这是怎么回事呢?谢谢!

Additional

No response

@Superwen1017 Superwen1017 added the question Further information is requested label May 11, 2023
@mtjhl
Copy link
Collaborator

mtjhl commented May 15, 2023

如果是 coco 数据集,评估的时候有个参数 --is_coco 您加上这个参数了吗?

@wuxianucw
Copy link

wuxianucw commented Sep 1, 2023

我也遇到了相同的错误,我的推测如下:

image_id = int(path.stem) if path.stem.isnumeric() else path.stem

这里,当文件名为数字时,可能导致 id 的类型被错误转换。

image_id = path.stem

用上述代码替换后,eval_trt.py 可以正常执行。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants