hukaixuan19970627 / yolov5_obb

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

yolov5_obb no result on custom data after training #567

Open alialoulou opened 1 year ago

alialoulou commented 1 year ago

Hello, i trained the Yolo obb on custom data on colab but i did not get any predictions. I used 20 images for train/ 6 for val/ 4 for test (this gave a good result when training the normal yolo without obb) images are of size: 640*640 I annotated the data using Roboflow polygons (polygons are not accurately parallel)

This is one line describing an object annotation using DOTA format: 239.62417265174736 127.93222519997913 302.356362912833 186.37579519453877 166.40665699997044 332.2949109999914 103.67543377069524 273.85233732928725 853 0

training code line: %cd /content/yolov5_obb !python train.py --data /content/yolov5_obb/datasets/roboflow/data.yaml --epochs 600 --batch-size 8 --img 640 --device 0 --exist-ok

I got this val batch labels: image

and got this val batch pred: image

my results: image

after I run detect.py: !python detect.py --weights /content/yolov5_obb/runs/train/exp/weights/best.pt --source /content/yolov5_obb/datasets/roboflow/val/images/im13_png.rf.f7711c8451616e3afdad4acf41ddce26.jpg --imgsz 640 --save-txt --device 0

i got: Results saved to runs/detect/exp11 0 labels saved to runs/detect/exp11/labels

anny idea what could be the problem

thank you.

Fraulainee commented 1 year ago

Hello! I am having the same problem. Did you already fixed this? Thank you

alialoulou commented 1 year ago

Hello! I am having the same problem. Did you already fixed this? Thank you

Hi, i still did not fix it, if you find something pls let me know, thanks.

HungVS commented 1 year ago

@alialoulou @Fraulainee I'm facing the same issue.

Actually, I have tried YOLOv5-OBB on two different datasets (A and B). Dataset A with white background (similar to yours) faces the same issues as you, meanwhile, dataset B with normal background (such as inside offices, bedrooms,...) does not cause any problems. Do you think the cause of the issue can be the white background?

leviethung2103 commented 1 year ago

I also faced the same issue? Any progress on that?

FengyiLi1102 commented 1 year ago

May try to use Adam optimiser. I had the same problem and after refered to this it was solved.