Giter Club home page Giter Club logo

yolov3-channel-pruning's Introduction

yolov3-channel-pruning

Update:

补充prune_utils.py. 在自己的数据集上,剪枝30%-50%, mAP不变。

requirements:

  • numpy>=1.13
  • tensorboardX
pip install tensorboardX

or

git clone https://github.com/lanpa/tensorboardX && cd tensorboardX && python setup.py install
  • albumentations
pip install albumentations

or

conda install -c conda-forge imgaug
conda install albumentations -c albumentations
  • terminaltables
pip install terminaltables
  • tqdm
  • torch
  • random
  • matplotlib
  • .......

Run

python train.py --model_def config/yolov3.cfg

python train.py --model_def config/yolov3.cfg -sr

python test_prune.py

python train.py --model_def config/prune_yolov3.cfg -pre checkpoints/prune_yolov3_ckpt.pth

Reference:

YOLOv3-model-pruning(感谢Lam1360给了很多帮助)

yolov3-network-slimming

PyTorch-YOLOv3

yolov3-channel-pruning's People

Contributors

violet17 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

yolov3-channel-pruning's Issues

suitable prune rule

When training, there are something different between your code and @Lam1360 code, such as:

in Lam1360 code, the training is:
1, python train.py --model_def config/yolov3-hand.cfg -sr --s 0.01

but in yours, missing the back value.

2,for step2, in Lam1360 code, he didn't show the suitable prune rule, but in your code, it is

python test_prune.py

no suitable prune rule following.

I was wonder whether you have already test and the result is fine, or you missing some key point.

mAP

你好,非常感谢的你的工作,想问一下你有测试剪枝前后的mAP,不知道能否放出测试结果呢?

计算MAP的时候报错!

验证计算AP的时候提示out of list,是因为哪里的配置文件没有设置好吗?在 .cfg和 .data文件里头我都设置好类别数了!
image

剪枝效果

您好,请问您的代码剪枝效果怎么样,最后精度如何?

剪枝操作时对running_mean的处理

非常感谢作者的开源代码,我有一个疑惑,我看到在prune_utils.py文件的prune_model_keep_size()函数中,当下一层含有BN时,上层输出多余的部分经过卷积层后直接加到了running_mean里。请问在加到running_mean之前是不是需要求一下均值?因为running_mean里应该都是各个channel的均值。

数据格式

你好,我尝试用你的repo训练一下自己的数据集,发现一直存在: "assert os.path.exists(label_path) # 确保label_path必定存在,即图片必定存在label" 这个错误,不知道数据的格式和路径是怎样的?方便加一下你的微信吗?好让我向你请教一下的!Wechat:FLY15625018720

在自己的数据集上训练

您好:我使用您的工程在自己的数据集上进行训练,过程中总是报一个错误:
ValueError: x_max is less than or equal to x_min for bbox [0.5802083333333333, 0.5598958333333334, 0.5802083333333333, 0.5598958333333334, 0.0].
应该是数据上的问题,您这里面用了数据增强的相关操作,目前调试看了出问题的那张图像的annotation并没有问题,并且我使用相同的数据在talebolano大佬的工程中是可以训练的,还希望您有空可以帮忙看看是哪里出了问题,非常感谢!

BNOptimizer not found

hi, thanks very much for you great work. but when I run you code , an error occured, NameError: name 'BNOptimizer' is not defined. there is no definition of it!!

如何在线测试?

test.py里只是对mAP等速度计算进行比较,没有可视化,也没有相关实时测试的demo,大神可以补充下吗

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.