关于Yolo目标检测学习
如何在生成检测结果的同时生成txt文件,除了命令行的方式,可以在代码中一键解决。
正文如下
在detect.py中设置save-txt默认为True即可
parser.add_argument(’–view-img’, action=‘store_true’, help=‘display results’)
parser.add_argument(’–save-txt’, action=‘store_true’, help=‘save results to *.txt’)
parser.add_argument(’–save-conf’, action=‘store_true’, help=‘save confidences in --save-txt labels’)