Coder Social home page Coder Social logo

seg-torch's Introduction

Seg-Torch for Image Segmentation with Torch

This work was sparked by my personal research on simple segmentation methods based on deep learning. It is the harvest of two great predecessors;

However this code includes radical differences (such as data loading, augmentation, memory optimization) and it has more generic type of implementation suitable for use in any custom project. You only need to modify data-loader files data/custom-gen.lua and data/custom.lua.

Be warned this is susceptible to bugs. Any pull request is appreciated.

Check train_scripts/ for example execution.

Models

  • SegNet: Very simple encoder-decoder network, segmenting end2end
  • EroNet: Very similar but it chops Batch-Normalization and uses ELU activation. It is lower in accuracy but faster in training.

Example Results

exp_model/ includes a proof of concept on CamVid dataset. If you compare the results with the real-project this implementation has higher values interestingly (at least for me) :) .

Model will be shared on Dropbox, as soon as I find some time to do so.

seg-torch's People

Contributors

eriche2016 avatar erogol 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  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

seg-torch's Issues

bugs in the code

Thanks for sharing the excellent work. In camvid.lua file, I think it is better to remove self.dir or set it to be nil.

self.dir = opt.datapath

because it will give us the wrong directory where the image data sits., which will be:

self.dir/self.dir/sub_path_to_images. 

according to the line in

table.insert(imagePaths, line)

variable line(which represents path) will contain self.dir as its prefix substring

Segnet output/target dimensions

Hi,
thank you for such a great work!
Could you please explain the required dimensionality of outputs and targets? Segnet model input is [batchSize, numChannels, H, W] and the output is [batchSize, numClasses, H, W]. But cudnn.SpatialCrossEntropyCriterion() requires the target to be of size [batchSize, H, W]. So it looks like that the model outputs numClasses separate masks for each class while the criterion expects a single mask with all the classes within it.
I can't get through this issue while reproducing the model with a toy example.

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.