Git Product home page Git Product logo

aayushbansal / pixelnet Goto Github PK

View Code? Open in Web Editor NEW
195.0 14.0 48.0 20.83 MB

The repository contains source code and models to use PixelNet architecture used for various pixel-level tasks. More details can be accessed at <http://www.cs.cmu.edu/~aayushb/pixelNet/>.

License: MIT License

MATLAB 92.76% Shell 7.24%
deep-learning pixels surface-normals edge-detection unsupervised-learning depth-estimation caffe semantic-segmentation

pixelnet's Introduction

PixelNet: Representation of the pixels, by the pixels, and for the pixels.

We explore design principles for general pixel-level prediction problems, from low-level edge detection to mid-level surface normal estimation to high-level semantic segmentation. Convolutional predictors, such as the fully-convolutional network (FCN), have achieved remarkable success by exploiting the spatial redundancy of neighboring pixels through convolutional processing. Though computationally efficient, we point out that such approaches are not statistically efficient during learning precisely because spatial redundancy limits the information learned from neighboring pixels. We demonstrate that stratified sampling of pixels allows one to:

  1. add diversity during batch updates, speeding up learning;

  2. explore complex nonlinear predictors, improving accuracy;

  3. efficiently train state-of-the-art models tabula rasa (i.e., from scratch) for diverse pixel-labeling tasks.

Our single architecture produces state-of-the-art results for semantic segmentation on PASCAL-Context dataset, surface normal estimation on NYUDv2 depth dataset, and edge detection on BSDS. We also demonstrate self-supervised representation learning via geometry. With even few data points, we achieve results better than previous approaches for unsupervised/self-supervised representation learning. More details are available on our project page.

If you found these codes useful for your research, please consider citing -

@article{pixelnet,
  title={PixelNet: {R}epresentation of the pixels, by the pixels, and for the pixels},
  author={Bansal, Aayush and Chen, Xinlei, and  Russell, Bryan and Gupta, Abhinav and Ramanan, Deva},
  Journal={arXiv preprint arXiv:1702.06506},
  year={2017}
}

How to use these codes?

Anyone can freely use our codes for what-so-ever purpose they want to use. Here we give a detailed instruction to set them up and use for different applications. We will also provide the state-of-the-art models that we have trained.

The codes can be downloaded using the following command:

git clone --recursive https://github.com/aayushbansal/PixelNet.git
cd PixelNet

Our codebase is built around caffe. We have included a pointer to caffe as a submodule.

ls tools/caffe

Our required layers are available within this submodule. To install Caffe, please follow the instructions on their project page.

Models

We give a overview of the trained models in models/ directory.

ls models

Experiments

We provide scripts to train/test models in experiments/ directory.

ls experiments

Python Codes

The amazing Xinlei Chen wrote a version of code in Python as well and wrote the GPU implementation of sampling layer. Check it out. We have not tested that extensively. It would be great if you could help us test that :)

pixelnet's People

Contributors

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

pixelnet's Issues

permuting image but not the label

@aayushbansal it seems that during seg_image_provider you permute dimension of the image here but i don't see the equivalent in seg_label_provider [here] (https://github.com/aayushbansal/PixelNet/blob/master/experiments/train/utils/seg_label_provider.m) which i beleive might lead to a missmatch of pixels and their annotation and also resizing with different flags(bilinear,antialiasing in seg_image_provider and nearest in seg_label_provider) doesn't have any effect on training?

.build_release

Binary file of caffe build directory are commited in the repository.

test code

can you share your testing code of semantic segmentation

Pixel Location for multi-class problem

Hi @aayushbansal

Thanks for providing the code for PixelNet. I have a small issue regarding the pixel selection in case of Multi-class problems. In Multi-class problems do we need to take the class-specific sparse set of pixel location or is it the sparse set of pixel locations anywhere in the Image. In case of 224x224 image what number of sparse pixel locations might be a good choice for multi-class segmentation.
As I new to this I am a bit confused. Looking forward for any help.

Thanks & Regards
Savan

Hypercolumns rearrangement into Matrix

Hi @aayushbansal,

I am very much intersted in PixelNet and I am trying to implement the same in MatConvNet. I have an issue regarding what you have mentioned in your paper about the sparse predictions.

According to my understanding, if we have say 1000 sampled pixels we are extracting hypercolumns from the conv1_2 (64 feature maps) , conv2_2 (128 feature maps), conv3_3 (256 feature maps), conv4_3 (512 feature maps) and from conv5_3 (512 feature maps) (if included also from fc7_conv)

Question 1. May be a dumb question, but are we supposed to extract the Ci(p) from all (say conv1_2) 64 feature maps or can we select some random feature maps (say random 32 feature maps)?

In the below snapshot about the sparse prediction, you have mentioned that we have to rearrange the hypercolumn features into a matrix.

Question 2. Are we supposed to rearrange the hypercolumns back to (if the size of the image is 224 x 224) or into a vector with all the hypercolumns (512x1000+ 512x1000 + 256x1000 +128x1000 + 64x1000) concatinated before giving it to the downstream processing.

pixelnet_doubt

Thanks in advance. Your reply would be really helpful.

Best Regards
Savan

Boundary detection

Hello. Thank you for providing your code.

You seem not to include prototxt files or caffemodels for the boundary detection tasks. Why is this?

Ade20k

Have you tried to submit to the scene parsing challenge?

The specified key is not present in this container.

Hello aayushbansal,

Thanks for sharing your code!

I installed the caffe version in tool folder and then try to run demo_code.m.
But I got the following error. Do you have any idea about this?


Image : ./experiments/demo/img_000001.jpg
Error using containers.Map/subsref
The specified key is not present in this container.

Error in caffe.Net/blobs (line 77)
blob = self.blob_vec(self.name2blob_index(blob_name));

Error in demo_code (line 53)
net.blobs('data0').reshape([crop_height+200, crop_width+200, 3, 1]);

Error in run (line 96)
evalin('caller', [script ';']);


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.