YOLOv6 icon indicating copy to clipboard operation
YOLOv6 copied to clipboard

Is there any way to get the model output annotations in text file???

Open Rizwan-S opened this issue 1 year ago • 5 comments

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

Rizwan-S avatar Mar 06 '23 05:03 Rizwan-S

Hi, if you want to get the predicted results in text file, you can runtools/infer.py with the args --save-txt.

Chilicyy avatar Mar 06 '23 06:03 Chilicyy

I'm getting this error when I run the command. The command and the output are both shown in the image below:

Screenshot from 2023-03-22 18-53-50

Rizwan-S avatar Mar 22 '23 13:03 Rizwan-S

Hi @Rizwan-S , you can review this line, and check if the rel_path is valid. You can modify the save path by yourself.

Chilicyy avatar Mar 24 '23 09:03 Chilicyy

Is there any way to store the confidence values in the txt file for all the predictions?

Rizwan-S avatar Mar 31 '23 10:03 Rizwan-S

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

DoManhQuang avatar Jul 24 '23 03:07 DoManhQuang