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

Transfer Learning #141

Open sard0r opened 2 years ago

sard0r commented 2 years ago

@WongKinYiu

Hello Dear @WongKinYiu. I wanted to implement transfer learning in YOLOR-p6 weight. But it is a bit different than Scaled-YOLOv4.

So, can you explain if possible how to do transfer learning using YOLOR-p6 weight. Which layers are important to train and which ones should be frozen.

Training the layers 28 32 36 40 and 41 I got only 0.4 mAP which is not good.

Thank you

BartvanMarrewijk commented 2 years ago

Hello, I am also interested in transfer learning. @sard0r To be able to train, did you change anything in the cfg file? Because I have less classes than the coco dataset as a result I got some errors when plotting the data. i can imagine that I have to change some settings in the cfg file. yolor/utils/plots.py", line 164, in plot_images cls = names[cls] if names else cls IndexError: list index out of range

BartvanMarrewijk commented 2 years ago

If people are interested in transfer learning. I used following guide https://github.com/AlexeyAB/darknet#how-to-train-to-detect-your-custom-objects to change the cfg file and this helped me retrain the yolor_6.pt on a custom dataset.

Wazaki-Ou commented 2 years ago

@studentWUR Could you please tell me how you did to train Yolor using AlexeyAB repository? I am familiar with the repository and I have darknet already built in my machine, but I'm not sure which cfg file can be used for training yolorp6 (only scaled yolo csp is mentioned). Thanks a lot !!