WongKinYiu / yolov9

Implementation of paper - YOLOv9: Learning What You Want to Learn Using Programmable Gradient Information
GNU General Public License v3.0
8.97k stars 1.42k forks source link

During Instance Segmentation training, the P, R, and mAP50 values all became 0 after epoch 3 #337

Open txctxc opened 7 months ago

txctxc commented 7 months ago

Several hours ago, I downloaded the latest official YOLOv9 GitHub repository manually instead of downloading it by

git clone https://github.com/SkalskiP/yolov9.git

as the latest repository has not been released yet. Then I exported YOLOv9 format from my Roboflow dataset version. I have used this dataset format for YOLOv9 Object Detection and it works fine. Now I want to use the same dataset format for YOLOv9 Instance Segmentation. In Roboflow platform, my dataset is well-annotated by polygon masks.

python segment/train.py --epochs 50 --batch 1 --img 1408 --workers 8 --device 0 \
--data /root/autodl-tmp/yolov9/AutoKary2022-2/data.yaml \
--cfg models/segment/gelan-c-seg.yaml \
--weights /root/autodl-tmp/weights/gelan-c-seg.pt \
--name gelan-c-seg --hyp hyp.scratch-high.yaml --no-overlap --close-mosaic 10

where I used this code for training: https://github.com/WongKinYiu/yolov9/blob/main/segment/train.py
as the training process continued, I found something went wrong. The P, R, and mAP50 values all became 0 after epoch 3: image

The detailed log is as follows: detailedLog.txt

But I have not got any warning messages on my labels' format, so I think my situation is not quite the same as yours.

Any advice on how to fix this? Best regards.

Originally posted by @txctxc in https://github.com/WongKinYiu/yolov9/issues/252#issuecomment-2044267051

Chenxu-666 commented 6 months ago

When i train object detection code with my custom dataset, i met with the same problem. And i modified optimizer, but have no effect.