meituan / YOLOv6

YOLOv6: a single-stage object detection framework dedicated to industrial applications.
GNU General Public License v3.0
5.67k stars 1.02k forks source link

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

Open Rizwan-S opened 1 year ago

Rizwan-S commented 1 year ago

Before Asking

Search before asking

Question

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

Additional

No response

Chilicyy commented 1 year ago

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

Rizwan-S commented 1 year ago

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

Chilicyy commented 1 year ago

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

Rizwan-S commented 1 year ago

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

DoManhQuang commented 1 year ago

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