Giter Site home page Giter Site logo

u-net-for-caffe's Introduction

U-NET-for-Caffe

U-Net with upsampling layer under caffe

  1. copy the src/caffe/layers/upsample_layer.cpp and src/caffe/layers/upsampling_layer.cu and include/caffe/layers/upsample_layer.h to your caffe

  2. edit the src/caffe/proto/caffe.proto add a declaration of parameters used in upsample_layer and give the parameter a unique ID add a line inside message LayerParameter {}

    // Parameter for upsample_layer. optional UpsampleParameter upsample_param = 152;

    add a line after message LayerParameter {} // message for upsample parameter message UpsampleParameter { optional int32 scale = 1 [default = 1]; }

  3. re-build the source code of caffe in vs. if you use python interference, don't forget copy the released file in \Build\x64\Release\pycaffe\caffe to site-packages of python path.

  4. I modified the prototxt file of unet network with deconvolution layer, because its params are difficult to initialize. I always have trouble in training deconvolution layer. the deconvolution layer is replaced by upsampling layer + convolution layer with 2*2 kernel, which is as same structure as unet in keras.

  5. you should modify the parameter offset in crop layer to make sure the bottom0 blob is cropped in center. the offsite=(bottom0-bottom1)/2, note that bottom is the one to be cropped and it is larger.

  6. you can try your own data now!

u-net-for-caffe's People

Contributors

yanwenci avatar

Watchers

 avatar

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.