YOLOX
YOLOX copied to clipboard
voc_eval.py中,函数voc_eval参数处理错误导致无法找到Annotations文件夹的xml文件
voc.py中,_do_python_eval函数调用: rec, prec, ap = voc_eval( filename, annopath, imagesetfile, cls, cachedir, ovthresh=iou, use_07_metric=use_07_metric, ) 而voc_eval.py中,函数voc_eval中的recs[imagename] = parse_rec(annopath.format(imagename)),没有完整的文件路径,训练时报无法找到文件错误。
修改如下: annofile = os.path.join(annopath, detpath) ## add by iss for i, imagename in enumerate(imagenames): #recs[imagename] = parse_rec(annopath.format(imagename)) recs[imagename] = parse_rec(annofile.format(imagename)) ## add by iss
voc.py中,_do_python_eval函数调用: rec, prec, ap = voc_eval( filename, annopath, imagesetfile, cls, cachedir, ovthresh=iou, use_07_metric=use_07_metric, ) 而voc_eval.py中,函数voc_eval中的recs[imagename] = parse_rec(annopath.format(imagename)),没有完整的文件路径,训练时报无法找到文件错误。
修改如下: annofile = os.path.join(annopath, detpath) ## add by iss for i, imagename in enumerate(imagenames): #recs[imagename] = parse_rec(annopath.format(imagename)) recs[imagename] = parse_rec(annofile.format(imagename)) ## add by iss
在 2022-01-09 17:54:49,"tigerdhl" @.***> 写道:
遇到同样的问题 ,请问原因是什么
— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>
In Win environment, pls replace the
annopath = os.path.join(rootpath, "Annotations", "{:s}.xml")
with
annopath = os.path.join(rootpath, "Annotations", "{}.xml")
按照您给的方法修改了,但是还是找不到是因为啥?