Skip to content

A1exy/yolov3-network-slimming

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yolov3-network-slimming

LICENSE

Learning Efficient Convolutional Networks Through Network Slimming (ICCV 2017)应用在yolov3和yolov2上

环境

pytorch 0.41

window 10

如何使用

1.对原始weights文件进行稀疏化训练

python sparsity_train.py -sr --s 0.0001 --image_folder coco.data --cfg yolov3.cfg --weights yolov3.weights

2.剪枝

python prune.py --cfg yolov3.cfg --weights checkpoints/yolov3_sparsity_100.weights --percent 0.3

3.对剪枝后的weights进行微调

python sparsity_train.py --image_folder coco.data --cfg prune_yolov3.cfg --weights prune_yolov3.weights

关于new_prune.py

new_prune更新了算法,现在可以确保不会有某一层被减为0的情况发生,参考RETHINKING THE SMALLER-NORM-LESSINFORMATIVE ASSUMPTION IN CHANNEL PRUNING OF CONVOLUTION LAYERS(ICLR 2018)对剪枝后bn层β系数进行了保留

待完成

coco测试

About

yolov3 network slimming剪枝的一种实现

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%