• Stars
    star
    130
  • Rank 271,630 (Top 6 %)
  • Language
    Jupyter Notebook
  • License
    GNU General Publi...
  • Created about 3 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

yolov5 5.0 version distillation || yolov5 5.0版本知识蒸馏,yolov5l >> yolov5s

代码地址:

https://github.com/Sharpiless/yolov5-distillation-5.0

教师模型权重:

链接:https://pan.baidu.com/s/13gq5QwCrRNdRXWzSYUeJIw

提取码:4ppv

蒸馏训练:

python train.py --weights weights/yolov5s.pt \
        --cfg models/yolov5s.yaml --data data/voc.yaml --epochs 50 \
        --batch-size 8 --device 0 --hyp data/hyp.scratch.yaml \
        --t_weights yolov5l_voc.pt --distill

训练参数:

--weights:预训练模型

--t_weights:教师模型权重

--distill:使用知识蒸馏进行训练

--dist_loss:l2或者kl

--temperature:使用知识蒸馏时的温度

使用《Object detection at 200 Frames Per Second》中的损失

这篇文章分别对这几个损失函数做出改进,具体思路为只有当teacher network的objectness value高时,才学习bounding box坐标和class probabilities。

准备数据集:

默认会启用 data/voc.yaml 自动下载VOC数据集进行训练

或者手动运行 data/scripts/get_voc2007.sh 下载

如需修改成自己的数据集,则只需要修改yaml路径即可

实验结果:

数据集:

VOC2007(补充的无标签数据使用VOC2012)

GPU:2080Ti*1

Batch Size:8

Epoches:100

Baseline:Yolov5s

Teacher model:Yolov5l(mAP 0.5:0.95 = 0.541)

这里假设VOC2012中新增加的数据为无标签数据(2k张)。

教师模型 训练方法 蒸馏损失 P R mAP50
正常训练 不使用 0.7756 0.7115 0.7609
Yolov5l output based l2 0.7585 0.7198 0.7644
Yolov5l output based KL 0.7417 0.7207 0.7536
Yolov5m output based l2 0.7682 0.7436 0.7976
Yolov5m output based KL 0.7731 0.7313 0.7931

训练结果

参数和细节正在完善,支持KL散度、L2 logits损失和Sigmoid蒸馏损失等

1. 正常训练:

正常训练

2. L2蒸馏损失:

L2蒸馏损失

我的公众号:

在这里插入图片描述

关于作者

B站:https://space.bilibili.com/470550823

CSDN:https://blog.csdn.net/weixin_44936889

AI Studio:https://aistudio.baidu.com/aistudio/personalcenter/thirdview/67156

Github:https://github.com/Sharpiless

More Repositories

1

Yolov5-deepsort-inference

Yolov5 deepsort inference,使用YOLOv5+Deepsort实现车辆行人追踪和计数,代码封装成一个Detector类,更容易嵌入到自己的项目中
Python
910
star
2

Yolov5-Deepsort

最新版本yolov5+deepsort目标检测和追踪,能够显示目标类别,支持5.0版本可训练自己数据集
Python
584
star
3

Yolov5-distillation-train-inference

Yolov5 distillation training | Yolov5知识蒸馏训练,支持训练自己的数据
Python
170
star
4

yolox-deepsort

基于YoloX目标检测+DeepSort算法实现多目标追踪Baseline
Python
126
star
5

yolov3-vehicle-detection-paddle

vehicle-detection based on yolov3(基于paddle的YOLOv3车辆检测和类型识别)
Python
113
star
6

Easy-AnimeGAN

From https://github.com/TachibanaYoshino/AnimeGAN, easier for a demo
Python
100
star
7

PaddleX-Flask-VUE-demo

基于PaddleX+Flask开发后端,基于VUE开发前端应用,做一个AI医疗的WEB应用
Vue
99
star
8

Yolov5-Flask-VUE

基于Flask开发后端、VUE开发前端框架,在WEB端部署YOLOv5目标检测模型
Python
78
star
9

play-daxigua-using-Reinforcement-Learning

用强化学习DQN算法,训练AI模型来玩合成大西瓜游戏,提供Keras版本和PARL(paddle)版本
Python
76
star
10

yolov5-knowledge-distillation

yolov5目标检测模型的知识蒸馏(基于响应的蒸馏)
Python
62
star
11

PaddleDetection-Pedestrians-Detection-and-Tracking

中软杯baseline-基于百度飞桨的单/多镜头行人追踪,使用百度飞桨PaddleDetection套件的PP-YOLO+Sort算法开发
Python
44
star
12

PaddleDetection-Yolov5

基于Paddlepaddle复现yolov5,支持PaddleDetection接口
Python
36
star
13

opencv-pyqt-makeup-software

基于opencv+pyqt5开发的美颜化妆软件,功能包括:图像锐化、亮睛、红唇、瘦脸、美肤等
Python
34
star
14

gobang-object-detection-dataset

北理BIT人工智能大作业,写脚本收集了黑/白棋子检测数据集并提供YOLOv3训练和推理代码
Jupyter Notebook
32
star
15

Face-recognition-for-classroom-sign-in

基于FaceNet的人脸检测+识别的课堂学生签到系统
Python
29
star
16

Pix2seq-mmdetection

Unofficial implement of "Pix2seq: A Language Modeling Framework for Object Detection" on mmdetection
Python
28
star
17

FCN-DenseNet

FCN implement with densenet for VOC dataset
Python
25
star
18

Paddle-face-detection-and-expression-recognition

基于Paddle框架的TinyYOLO人脸检测和ResNet表情识别
Jupyter Notebook
19
star
19

Point-Transformers-with-Quantization

基于Point Transformers复现点云分割任务,并使用HAQ算法进行自动量化压缩,几乎不影响精度
Python
18
star
20

paddleocr-enterprise-entity-recognition

【中软杯国二开源】基于PaddleOCR和深度学习的企业实体识别
Jupyter Notebook
17
star
21

Easy-Pelee-Detection

A Pelee demo easier for demo(直接跑检测的那种)
Python
17
star
22

BITCS-final-exam-learning-materials

北理工计算机大一到大四各学期CS期末考试复习资料/历年考题汇总,欢迎PR
C
17
star
23

Versailles-text-generation-with-paddlepaddle

使用Paddlehub实现最近大火的凡尔赛文案自动生成
Jupyter Notebook
16
star
24

Point-Transformer-Pytorch

基于Pytorch复现Point-Transformer,用于ShapeNet数据集点云分割
Python
16
star
25

yolov5_export_quant_model

yolov5模型训练后量化代码
Python
14
star
26

paddlex-vehicle-detection-with-YOLOv3

(车辆检测和车道分割)vehicle detection and lane segmentation based on YOLOv3 with paddlex
Jupyter Notebook
14
star
27

HAQ-for-Mobilenetv3-Quantization

用于 MobileNetV3 在自定义数据集上的量化,模型压缩90%而精度几乎不受影响,论文:HAQ: Hardware-Aware Automated Quantization with Mixed Precision
Python
13
star
28

Awesome-datafree-KD

2019~2021年间Zero-shot/Data-free知识蒸馏的论文合集
11
star
29

PARL-DQN-daxigua

用parl框架的DQN强化学习算法玩“合成大西瓜”
Python
11
star
30

Tianchi-PANDA-rank13

PANDA大场景多对象检测跟踪(初赛检测)开源代码,初赛排名13
Python
11
star
31

play-Pacman-with-gesture-recognition-by-resnet18

手把手教你用PaddleX训练手势识别模型,并将该模型用于吃豆豆游戏
Python
10
star
32

Yolov3-plate-detection

Chinese plate detection(基于YOLOv3的中文车牌检测)
Python
10
star
33

Social-safety-distance-detection-with-paddlepaddle

基于Paddlepaddle的社交行人安全距离检测
Jupyter Notebook
9
star
34

yolov3-vehicle-plate-recognition-

基于Yolov3的中文车牌检测和识别
Python
9
star
35

play-daxigua-using-PaddleX

使用PaddleX在浏览器自动玩合成大西瓜
Python
9
star
36

pacman-with-paddlepaddle-gesture-control

pacman with paddlepaddle gesture control,手势识别用于吃豆人小游戏
Python
8
star
37

PyQt5-based-Remote-Medical-System-v1.0

基于PyQt5开发,使用多线程和Socket通信,北理18级小学期大作业,远程医疗云监控系统
Python
7
star
38

pp-yolo-vehcile-detection-and-distance-estimation-for-self-driving

a
Python
7
star
39

lane-detection-for-huawei-competition

2021第三届华为云人工智能大赛 · 无人车挑战杯——车道线检测模块
Python
7
star
40

Play-Tetris-Using-hand-gesture-recognition

使用手势识别算法玩俄罗斯方块
Python
7
star
41

ZSKD-pytorch

Pytorch implement of Zero-shot Knowledge Distillation in Deep Neural Networks
Python
5
star
42

Star-face-recognition

基于FaceNet的明星人脸识别
Python
5
star
43

Yolov3-MobileNet-Distillation

在Yolov3-MobileNet上进行模型蒸馏训练
Jupyter Notebook
5
star
44

SSD-tensorflow

SSD on tensorflow
Python
5
star
45

FCN-tensorflow

Semantic Segmentation by FCN
Python
5
star
46

MPI-Flow

Official Code of "[ICCV 2023] MPI-Flow: Learning Realistic Optical Flow with Multiplane Images"
4
star
47

BIT-AI-final-exam-papers

北京理工大学人工智能基础考试卷(目前两套)
4
star
48

offline-image-argument

离线数据增强,自动生成对应的标注文件
Python
4
star
49

Hand-gesture-recognition-for-game

手势识别玩转打飞机小游戏,基于MobileNetV3_Small和pygame
Python
4
star
50

Paddlepaddle-CenterNet

基于Paddlepaddle2.0动态图版本复现CenterNet
Python
3
star
51

Crawler-for-pokemon

Python
3
star
52

Gold-Miner

汇编大作业,黄金矿工
Assembly
3
star
53

RESNET-tensorflow

resnet on tensorflow
Python
3
star
54

Temporal-Difference

Temporal Difference by opencv
Python
3
star
55

Driver-status-recognition-with-paddlex

(驾驶员状态识别)Driver status recognition with paddlex based on MobileNetv3
Jupyter Notebook
3
star
56

HeartRate

rppg based hr estimator
Python
2
star
57

SSD-video-detector-tensorflow

SSD-video-detector-tensorflow
Python
2
star
58

DenseNet-tensorflow

DenseNet tensorflow
Python
2
star
59

Sharpiless

2
star
60

paddlex-driver-state-recognition

paddlex-baseddriver face detection and state recognition
Java
2
star
61

Face-and-key-points-detector

Python
1
star
62

Train-RAFT-from-single-view-images

Official Code (new released) of "[ICCV 2023] MPI-Flow: Learning Realistic Optical Flow with Multiplane Images"
Python
1
star
63

BIT-Machine-Learning-Fundamentals

北理工-2018级计科-机器学习基础-小作业和大作业
1
star
64

Animation-splicing-picture

Animation splicing picture
Python
1
star
65

Lane-Detector-for-Huawei-Driverless-Car-Race

第二届华为云人工智能大赛——车道线检测算法
Python
1
star
66

VGG-tensorflow

Python
1
star
67

faster-rcnn-mobilenetv2

faster-rcnn-mobilenetv2 using tensorflow
1
star
68

faster-rcnn-mobilenetv2-tf

faster-rcnn-mobilenetv2-tf
1
star
69

faster-rcnn-tf

faster-rcnn-tensorflow
Python
1
star
70

test

no
Python
1
star
71

Heart-rate-monitor

Heart rate monitoring
1
star
72

Crawler-for-LOL-skin

Crawler for LOL skin
Python
1
star
73

Zip-code-identification

Zip code identification using cnn
Python
1
star
74

Anime-Mosaic-Puzzle

动漫人物拼图
Python
1
star
75

Flow-Anything

1
star