hukaixuan19970627 / DOTA_devkit_YOLO

Trans DOTA OBB format(poly format) to YOLO format.
198 stars 39 forks source link

evaluationdifferent result #3

Closed roberttorres67 closed 2 years ago

roberttorres67 commented 3 years ago

hi why every time I use evaluation.py my mAP changes?

roberttorres67 commented 3 years ago

hi why every time I use evaluation.py my mAP changes?

I understand this problem is in evaluationtrans(srcpath, dstpath) and image2txt(srcpath, dstpath). they repeat data in Task1....txt and imgnamefile.txt. so it solved with this change: in evaluation_trans(srcpath, dstpath) before loop: if os.path.exists(dstpath): shutil.rmtree(dstpath) os.makedirs(dstpath) in image2txt(srcpath, dstpath) before loop: dstname = os.path.join(dstpath, 'imgnamefile.txt') # eg: result/imgnamefile.txt if not os.path.exists(dstpath): os.makedirs(dstpath) if os.path.exists(dstname): os.remove(dstname)