WongKinYiu / yolor

implementation of paper - You Only Learn One Representation: Unified Network for Multiple Tasks (https://arxiv.org/abs/2105.04206)
GNU General Public License v3.0
1.98k stars 524 forks source link

Failing to finetune #49

Open devloper13 opened 2 years ago

devloper13 commented 2 years ago

Here's what I did:

  1. I have a pascal voc format label (8 classes, completely different form coco labels), which I converted to yolo format using this: https://gist.github.com/Amir22010/a99f18ca19112bc7db0872a36a03a1ec

  2. I made changes to yolor_p6.cfg, replacing filters from 255 with appropriate value, in my case 39, and the num_classes.

  3. I replaced labels in coco.labels with 8 classes of my own.

  4. The train command I used: python train.py --batch-size 1 --img 1280 1280 --data coco.yaml --cfg cfg/yolor_p6.cfg --weights yolor_p6.pt --device 0 --name yolor_p6_digit --hyp hyp.scratch.1280.yaml --epochs 20

Also tried with hyp.finetune.1280.yaml

But the model doesn't learn anything. Infact after 12 epochs the losses start increasing and mAP starts falling, which was already bad to begin with. Can you please guide me?

remtav commented 2 years ago

@devloper13 this may help: https://github.com/WongKinYiu/yolor/issues/103#issuecomment-927617539