GithubHelp home page GithubHelp logo

preddy5 / segnet Goto Github PK

View Code? Open in Web Editor NEW
202.0 9.0 106.0 197.61 MB

A Deep Convolutional Encoder-Decoder Architecture for Image Segmentation

Home Page: http://preddy5.github.io/2016/03/08/segnet-post.html

Jupyter Notebook 97.57% Python 2.43%

segnet's Introduction

This repo is not supported anymore; Please use it only as a reference;

Segnet is deep fully convolutional neural network architecture for semantic pixel-wise segmentation. This is implementation of http://arxiv.org/pdf/1511.00561v2.pdf (Except for the Upsampling layer where paper uses indices based upsampling which is not implemented in keras yet( I am working on it), but that shouldnt make a lot of difference). You can directly download the code from https://github.com/preddy5/segnet. This post is a explaination of what is happening in the code.

http://preddy5.github.io/2016/03/08/segnet-post.html

segnet's People

Contributors

preddy5 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  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  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  avatar  avatar

segnet's Issues

Test Accuracy

Hi,

What is the test accuracy is generated by the model? The test accuracy is not mentioned in the project page either.

It would be really good you mention the results on the test data so that people can be sure the model is not overfitting.

Require requirements.txt for running this project

I'm trying to run SegNet however, I'm seeing a lot of errors in the import statements. This is due to the fact that I'm using updated versions of most packages required.

Can you please provide the requirements.txt file containing the versions of packages that you guys used at the time of implementation. Also, can you please tell me what version of python did you guys use to implement this?

Thanks.

Incorrect prediction or visualisation

Hello.

After run this code:

output = autoencoder.predict_proba(train_data[8:9])
out_labels = np.argmax(output[0], axis=1)

pred = visualize(out_labels.reshape((height,width)), False)
plt.imshow(pred)
plt.figure(2)
plt.imshow(gt[8])
plt.show()

i have next result:
res

I change only Batch size and data size params. I work in PyCharm. It is incorrect prediction or visualisation? What i do wrong?

Reshaping Last convolutional Layer

Hi,

You are reshaping the output of last convolutional layer to ( 12 , 360 * 480 ) and permuting it to ( 360 * 480 , 12 )
so output shape after permutation will be ( None , 360 * 480 , 12 ) where None is the batch size as mentioned in ipython notebook.

On this ( None , 360 * 480 , 12 ) , a 3D tensor, you are applying softmax, which according to keras softmax defination will be consider as ( nb_samples , nb_timesteps , nb_channels ).

My question is what is this nb_timesteps?? which is 360*480 for here. As per my understanding in semantic segmentation each pixel is sample so output should be ( None * 360 * 480 , 12 ) , but here we don't know value of None in prior, so can you give me explanation of how to make sense of your implementation, as I am unable to understand this nb_timesteps part.

UpSampling2D vs UnPooling2D

Hey, thanks for the example!

I found the code on your blog post first and there you're using the custom layer UnPooling2D but here you define it as well but then use the build-in UpSampling2D.

Do they perform exactly the same operation? Why did you change?
I understand the code for UnPooling2D but I'm a little bit confused by the code of UpSampling2D..

Thanks in advance

adadelta over SGD

Hi,

I have a question regarding the optimisation algo: why have chosen adadelta instead of SGD?

I trained my data on both and adadelta gave better results!

Thanks for sharing!!

Difference in output as shown in Segnet.ipynb

Hello,

I am just trying to run your code, I just tried to run the same example as it is mentioned is Segnet.ipynb but unfortunately I am not able to generate the same results as it is shown in it. So this is the image
0001tp_006750

what I tried to feed the network and this is the output I am getting.

output

Can you please help me what I am doing wrong.

Best,
Muaz

Regarding migrating this implementation to Tensorflow-based

Hi Pradyumna,

Thanks for sharing the code. Just curious, how difficult(or different) if migrating this implementation to Tensorflow-based? Or what are the major parts need to be modified? I am not familiar with Keras, and am learning Tensorflow.

Error allocating memory

Hello,

When I run this code, it gives me the following error:

MemoryError: Error allocating 442368000 bytes of device memory (out of memory).
Apply node that caused the error: GpuElemwise{sub,no_inplace}(GpuElemwise{add,no_inplace}.0, GpuElemwise{Composite{(((i0 / i1) / i2) / i3)},no_inplace}.0)
Toposort index: 366
Inputs types: [CudaNdarrayType(float32, 4D), CudaNdarrayType(float32, (True, True, True, False))]
Inputs shapes: [(10, 64, 360, 480), (1, 1, 1, 480)]
Inputs strides: [(11059200, 172800, 480, 1), (0, 0, 0, 1)]
Inputs values: ['not shown', 'not shown']
Outputs clients: [[GpuElemwise{sqr,no_inplace}(GpuElemwise{sub,no_inplace}.0), GpuElemwise{mul,no_inplace}(CudaNdarrayConstant{[[[[ 2.]]]]}, GpuElemwise{Composite{(((i0 / i1) / i2) / i3)},no_inplace}.0, GpuElemwise{sub,no_inplace}.0), GpuElemwise{mul,no_inplace}(GpuElemwise{Composite{(((i0 / i1) / i2) / i3)},no_inplace}.0, GpuElemwise{sub,no_inplace}.0)]]

Tried using 660Ti - went upto 980 and 1080. Doesn't seem to go.

Any solutions???

Also, does this warning have anything to do with it ??

UserWarning: Model inputs must come from a Keras Input layer, they cannot be the output of a previous non-Input layer. Here, a tensor specified as input to "sequential_11_model" was not an Input tensor, it was generated by layer layer_10.
Note that input tensors are instantiated via tensor = Input(shape).
The tensor that caused the issue was: layer_input_10
str(x.name))

About the decoder part

Hi there,

Thank you for your code.

I'm just wondering if it's a proper way to implement the decoder part using UpSampling2D since the paper mentioned that it uses max-pooling indices for upsampling.

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.