天天看點

深度殘差網絡:ResNet

ResNet:

一、介紹

caffe-fast-rcnn(Caffe、FSRCNN、FastRCNN)

深度殘差網絡:ResNet
name: "ResNet_50_1by2"
layer {
  name: "data"
  type: "Input"
  top: "data"
  input_param { shape: { dim:  dim:  dim:  dim:  } } 
  // 第一個次元是圖檔數,第二個是通道數,後面的是圖檔的長寬
}
layer {
  name: "conv_1"
  type: "Convolution"
  bottom: "data"
  top: "conv_1"
  param {
    lr_mult: 
    decay_mult: 
  }
  param {
    lr_mult: 
    decay_mult: 
  }
  convolution_param {
    num_output: 
    pad: 
    kernel_size: 
    stride: 
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
      value: 
    }
  }
}
           

shape {

dim: 1 #num,可自行定義

dim: 3 #通道數,表示RGB三個通道

dim: 32 #圖像的長和寬,通過 _train_test.prototxt檔案中資料輸入層的crop_size擷取

dim: 32}

二、訓練

http://www.cnblogs.com/ml-cv/p/5719531.html 深度殘差網(deep residual networks)的訓練過程

1、下載下傳基于python的訓練代碼:

https://github.com/dnlcrl/deep-residual-networks-pyfunt

深度殘差網絡:ResNet

2、pyfunt需要安裝:

@ubuntu:~$ sudo pip install git+git://github.com/dnlcrl/PyFunt.git
Downloading/unpacking git+git://github.com/dnlcrl/PyFunt.git
  Cloning git://github.com/dnlcrl/PyFunt.git to /tmp/pip-MS88tP-build

    customize UnixCCompiler

    warning: no files found matching 'setupegg.py'
    warning: no files found matching 'bscript'
    warning: no files found matching 'bento.info'
    warning: no files found matching '*' under directory 'doc'
    warning: no files found matching 'tox.ini'
    warning: no previously-included files matching '*_subr_*.f' found under directory 'pyfunt/linalg/src/id_dist/src'
    no previously-included directories found matching 'doc/build'
    no previously-included directories found matching 'doc/source/generated'
    no previously-included directories found matching '*/__pycache__'
    warning: no previously-included files matching '*~' found anywhere in distribution
    warning: no previously-included files matching '*.bak' found anywhere in distribution
    warning: no previously-included files matching '*.swp' found anywhere in distribution
    warning: no previously-included files matching '*.pyo' found anywhere in distribution
Successfully installed numpy tqdm cython torchfile pyfunt
Cleaning up...
           

3、

@ubuntu:~/deep-residual-networks-pyfunt$ git clone https://github.com/dnlcrl//PyDatSet
Cloning into 'PyDatSet'...
remote: Counting objects: , done.
remote: Total  (delta ), reused  (delta ), pack-reused 
Receiving objects: % (/),  KiB |  KiB/s, done.
Resolving deltas: % (/), done.
Checking connectivity... done.
           
@ubuntu:~/deep-residual-networks-pyfunt/PyDatSet$ sudo python setup.py install
[sudo] password for wei: 
/usr/lib/python2./distutils/dist.py:: UserWarning: Unknown distribution option: 'install_requires'
  warnings.warn(msg)
running install
running build
running build_py
running install_lib
creating /usr/local/lib/python2./dist-packages/pydatset
copying build/lib.linux-x86_64-/pydatset/gtsrb.py -> /usr/local/lib/python2./dist-packages/pydatset
copying build/lib.linux-x86_64-/pydatset/__init_.py -> /usr/local/lib/python2./dist-packages/pydatset
copying build/lib.linux-x86_64-/pydatset/sfddd.py -> /usr/local/lib/python2./dist-packages/pydatset
copying build/lib.linux-x86_64-/pydatset/tiny_imagenet.py -> /usr/local/lib/python2./dist-packages/pydatset
copying build/lib.linux-x86_64-/pydatset/cifar1.py -> /usr/local/lib/python2./dist-packages/pydatset
copying build/lib.linux-x86_64-/pydatset/mnist.py -> /usr/local/lib/python2./dist-packages/pydatset
copying build/lib.linux-x86_64-/pydatset/data_augmentation.py -> /usr/local/lib/python2./dist-packages/pydatset
byte-compiling /usr/local/lib/python2./dist-packages/pydatset/gtsrb.py to gtsrb.pyc
byte-compiling /usr/local/lib/python2./dist-packages/pydatset/__init_.py to __init_.pyc
byte-compiling /usr/local/lib/python2./dist-packages/pydatset/sfddd.py to sfddd.pyc
byte-compiling /usr/local/lib/python2./dist-packages/pydatset/tiny_imagenet.py to tiny_imagenet.pyc
byte-compiling /usr/local/lib/python2./dist-packages/pydatset/cifar1.py to cifar1.pyc
byte-compiling /usr/local/lib/python2./dist-packages/pydatset/mnist.py to mnist.pyc
byte-compiling /usr/local/lib/python2./dist-packages/pydatset/data_augmentation.py to data_augmentation.pyc
running install_egg_info
Writing /usr/local/lib/python2./dist-packages/pydatset-..egg-info
wei@ubuntu:~/deep-residual-networks-pyfunt/PyDatSet$ 
           

https://www.cs.toronto.edu/%7Ekriz/cifar.html The CIFAR-10 dataset

Download
If you're going to use this dataset, please cite the tech report at the bottom of this page.
Version     Size    md5sum
CIFAR- python version      MB  c58f30108f718f92721af3b95e74349a
CIFAR- Matlab version      MB  af85842c9e89bb428ec9976c926
CIFAR- binary version (suitable for C programs)    MB  c32a1d4ab5d03f1284b67883e8d87530
           

參考資料:

http://blog.csdn.net/forest_world/article/details/53035009 LeNet、AlexNet、GoogLeNet、VGG、ResNet

http://www.cnblogs.com/daihengchen/p/5761304.html 使用caffe測試自己的圖檔

http://blog.csdn.net/lg1259156776/article/details/52550865 神經網絡與深度學習 Caffe部署中的幾個train-test-solver-prototxt-deploy等說明<三>

http://www.kaiminghe.com/ Kaiming He

http://blog.csdn.net/sunbaigui/article/details/50906002 [caffe]深度學習之MSRA圖像分類模型Deep Residual Network(深度殘差網絡)解讀

http://blog.csdn.net/yichenmoyan/article/details/51885433 使用Keras搭建深度殘差網絡

http://blog.csdn.net/heyongluoyao8/article/details/52478715 梯度下降優化算法綜述

http://mp.weixin.qq.com/s?__biz=MzIzNDQyNjI5Mg==&mid=100000125&idx=1&sn=72ba0e3e301281c13349f1a1821bad0d&chksm=68f7dba65f8052b0762594489c785ed67f19e111cf2c44dc4522e941989e85d8ee2a03203d26&mpshare=1&scene=23&srcid=1202GeZsjHGcHixoK41RU2mS#rd 深度學習所有文章

繼續閱讀