hukaixuan19970627 / yolov5_obb

yolov5 + csl_label.(Oriented Object Detection)(Rotation Detection)(Rotated BBox)基于yolov5的旋转目标检测
GNU General Public License v3.0
1.84k stars 428 forks source link

evaluation #18

Closed nhathoang0110 closed 3 years ago

nhathoang0110 commented 3 years ago

when I used the evalution file for evaluation, I changed the following path to mine: classnames=['product'] classnames_inVal = ['0'] evaluation( detoutput='image_eval', imageset=r'/mnt/hdd10tb/Users/hoangnn/product/prj14_data_gen/DATA_26/GenProduct_Yolo_26_convert90_final/images/test/',annopath=r'/mnt/hdd10tb/Users/hoangnn/product/prj14_data_gen/DATA_26/GenProduct_Yolo_26_convert90_final/labels/test/{:s}.txt', classnames=classnames_inVal ) However, I have bugs related to not having a file: FileNotFoundError: [Errno 2] No such file or directory: 'image_eval/result_txt/result_classname/Task1_0.txt' I don't know what the folders: result_before_merge, result_merged, result_classname, result_txt are and I need to create them myself?

hukaixuan19970627 commented 3 years ago

3IP(9QQGRQL~CZ2)6E}WS0B Run detect.py. Get ~/result_txt/result_before_merge T099FL{~C4@Y05%(QUJ4~QQ Run evaluation.py. Get ~/result_txt/result_classname and ~/result_txt/result_merged. You better run the demo with demo_files first.

nhathoang0110 commented 3 years ago

I ran successfully with the demo file. However for my data set it doesn't, it seems to evaluate only dota data?

hukaixuan19970627 commented 3 years ago

classnames_inVal = ['product'] same as ~/result_txt/result_classname

nhathoang0110 commented 3 years ago

I see an example with the dota dataset, which is the merge of parts of the image, etc. (I haven't seen it clearly yet). When I applied my dataset it didn't work, my dataset just has images and file annotations

hukaixuan19970627 commented 3 years ago

Can you show me the files in this path ——‘image_eval/result_txt/result_classname/’ For example: image

nhathoang0110 commented 3 years ago

I have not yet run to generate such files I think because your annotations in row_DOTA_labels are different from my annotations. image image My annotations is yolo format as training dataset.

nhathoang0110 commented 3 years ago

Do you think that's the reason why I can't evaluate

hukaixuan19970627 commented 3 years ago

Do you think that's the reason why I can't evaluate

Yes. The evaluation.py works for DOTA_labels format: [x1 y1 x2 y2 x3 y3 x4 y4 'classname' diffcult] . You can get ‘image_eval/result_txt/result_classname/Task1_classname.txt’ by runing detect.py.

Train_dataset annotations for train.py: [classid x_c y_c longside shortside θ_id] Ground Truth annotations for evaluation.py: [x1 y1 x2 y2 x3 y3 x4 y4 'classname' diffcult]

nhathoang0110 commented 3 years ago

what is x1,y1,x1,y2,x3,y3,x4,y4 and gsd in dota annotation ground truth?

hukaixuan19970627 commented 3 years ago

image

https://captain-whu.github.io/DOTA/dataset.html

nhathoang0110 commented 3 years ago

Hello. I reformatted the data according to your format. However, I still got the error and couldn't explain it. Can you help me? My code in evaluate.py : classnames=['0'] classnames_inVal = ['0'] # evaluation( detoutput='image_eval', imageset=r'/mnt/hdd10tb/Users/hoangnn/product/prj14_data_gen/DATA_26/GenProduct_Yolo_26_convert90_final/images/test/', annopath=r'/mnt/hdd10tb/Users/hoangnn/product/prj14_data_gen/new_txt_formatdota/{:s}.txt', classnames=classnames_inVal ) image

nhathoang0110 commented 3 years ago

this is my bug : image

hukaixuan19970627 commented 3 years ago

Run detect.py on your dataset, you will get ××/detection/result_before_merge/×××.txt. For example: image

So what's the data-format you get?