YOLOv6
YOLOv6 copied to clipboard
Is there any way to get the model output annotations in text file???
Before Asking
-
[X] I have read the README carefully. 我已经仔细阅读了README上的操作指引。
-
[X] 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等配置文件训练自定义数据集。)
-
[X] I have pulled the latest code of main branch to run again and the problem still existed. 我已经拉取了主分支上最新的代码,重新运行之后,问题仍不能解决。
Search before asking
- [X] I have searched the YOLOv6 issues and found no similar questions.
Question
Is there any way to get the model output annotations in text file???
Additional
No response
Hi, if you want to get the predicted results in text file, you can runtools/infer.py
with the args --save-txt
.
I'm getting this error when I run the command. The command and the output are both shown in the image below:
Hi @Rizwan-S , you can review this line, and check if the rel_path is valid. You can modify the save path by yourself.
Is there any way to store the confidence values in the txt file for all the predictions?
I change code txt_path = osp.join(save_dir, rel_path, 'labels', osp.splitext(osp.basename(img_path))[0])
to txt_path = osp.join(save_dir, rel_path, osp.splitext(osp.basename(img_path))[0])
then it's work
https://github.com/meituan/YOLOv6/blob/ae7d17c6ad4f4fc2e1ab9a5198cf738e2ef89e9e/yolov6/core/inferer.py#L90