代码地址:
https://github.com/Sharpiless/Yolov5-distillation-train-inference
蒸馏训练:
python train_distill.py --weights yolov5s.pt \
--teacher weights/yolov5l_voc.pt --distill_ratio 0.001 \
-- teacher-cfg model/yolov5l.yaml --data data/voc.yaml \
--epochs 30 --batch-size 16
训练参数:
–weights:预训练模型
–teacher:教师模型权重
–distill-ratio:蒸馏损失权重
实验结果:
数据集: