Skip to content

Latest commit

 

History

History
executable file
·
69 lines (35 loc) · 1.44 KB

README.md

File metadata and controls

executable file
·
69 lines (35 loc) · 1.44 KB

yolov5 知识蒸馏

介绍

yolov5-l模型压缩至yolov5-s 压缩算法是 https://github.com/twangnh/Distilling-Object-Detectors

Quick Start Examples

Install

Python >= 3.6.0 required with all requirements.txt dependencies installed:

$ git clone https://github.com/magicshuang/yolov5_distillation
$ cd magicshuang/yolov5_distillation
$ pip install -r requirements.txt
Training

没有teacher模型的人,先训练teacher模型

$ python train.py --data coco.yaml --cfg yolov5s.yaml --weights '' --batch-size 64
                                         yolov5m                                40
                                         yolov5l                                24
                                         yolov5x                                16
Distillation Training
$ python Distill_train.py --data coco.yaml --teacher-weights [your path] --batch-size 64
  

详细了解

比yolov5源码只多了两个文件 Distill_train.py & utils/distill_fun.py

所以可以直接下载这两个文件就可以了