The repository contains source code and models to use PixelNet architecture used for various pixel-level tasks. More details can be accessed at .

Overview

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 :)

Comments
  • Hypercolumns rearrangement into Matrix

    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

    opened by SavanGowda 6
  • The specified key is not present in this container.

    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 ';']);


    opened by alliecc 2
  • Pixel Location for multi-class problem

    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

    opened by SavanGowda 1
  • Trained models not found

    Trained models not found

    Hi, thank you for your great work! I find that the trained models listed in the README in this page: https://github.com/aayushbansal/PixelNet/tree/master/models/generalizability are not found (404). Where can I download the trained models?

    Thanks!

    opened by laoreja 1
  • permuting image but not the label

    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?

    opened by eliethesaiyan 0
Owner
Aayush Bansal
Aayush Bansal
Implementation of Transformer in Transformer, pixel level attention paired with patch level attention for image classification, in Pytorch

Transformer in Transformer Implementation of Transformer in Transformer, pixel level attention paired with patch level attention for image c

Phil Wang 272 Dec 23, 2022
Learning Pixel-level Semantic Affinity with Image-level Supervision for Weakly Supervised Semantic Segmentation, CVPR 2018

Learning Pixel-level Semantic Affinity with Image-level Supervision This code is deprecated. Please see https://github.com/jiwoon-ahn/irn instead. Int

Jiwoon Ahn 337 Dec 15, 2022
Smart edu-autobooking - Johnson @ DMI-UNICT study room self-booking system

smart_edu-autobooking Sistema di autoprenotazione per l'aula studio Johnson@DMI-

Davide Carnemolla 17 Jun 20, 2022
Author: Wenhao Yu ([email protected]). ACL 2022. Commonsense Reasoning on Knowledge Graph for Text Generation

Diversifying Commonsense Reasoning Generation on Knowledge Graph Introduction -- This is the pytorch implementation of our ACL 2022 paper "Diversifyin

DM2 Lab @ ND 61 Dec 30, 2022
This repository contains the code for the paper "PIFu: Pixel-Aligned Implicit Function for High-Resolution Clothed Human Digitization"

PIFu: Pixel-Aligned Implicit Function for High-Resolution Clothed Human Digitization News: [2020/05/04] Added EGL rendering option for training data g

Shunsuke Saito 1.5k Jan 3, 2023
AI virtual gym is an AI program which can be used to exercise and can be used to see if we are doing the exercises

AI virtual gym is an AI program which can be used to exercise and can be used to see if we are doing the exercises

null 4 Feb 13, 2022
This repository contains the code and models necessary to replicate the results of paper: How to Robustify Black-Box ML Models? A Zeroth-Order Optimization Perspective

Black-Box-Defense This repository contains the code and models necessary to replicate the results of our recent paper: How to Robustify Black-Box ML M

OPTML Group 2 Oct 5, 2022
This repository contains the code and models necessary to replicate the results of paper: How to Robustify Black-Box ML Models? A Zeroth-Order Optimization Perspective

Black-Box-Defense This repository contains the code and models necessary to replicate the results of our recent paper: How to Robustify Black-Box ML M

OPTML Group 2 Oct 5, 2022
Propagate Yourself: Exploring Pixel-Level Consistency for Unsupervised Visual Representation Learning, CVPR 2021

Propagate Yourself: Exploring Pixel-Level Consistency for Unsupervised Visual Representation Learning By Zhenda Xie*, Yutong Lin*, Zheng Zhang, Yue Ca

Zhenda Xie 293 Dec 20, 2022
The implementation of ICASSP 2020 paper "Pixel-level self-paced learning for super-resolution"

Pixel-level Self-Paced Learning for Super-Resolution This is an official implementaion of the paper Pixel-level Self-Paced Learning for Super-Resoluti

Elon Lin 41 Dec 15, 2022
Patch2Pix: Epipolar-Guided Pixel-Level Correspondences [CVPR2021]

Patch2Pix for Accurate Image Correspondence Estimation This repository contains the Pytorch implementation of our paper accepted at CVPR2021: Patch2Pi

Qunjie Zhou 199 Nov 29, 2022
Pytorch Implementation for NeurIPS (oral) paper: Pixel Level Cycle Association: A New Perspective for Domain Adaptive Semantic Segmentation

Pixel-Level Cycle Association This is the Pytorch implementation of our NeurIPS 2020 Oral paper Pixel-Level Cycle Association: A New Perspective for D

null 87 Oct 19, 2022
Pixel-level Crack Detection From Images Of Levee Systems : A Comparative Study

PIXEL-LEVEL CRACK DETECTION FROM IMAGES OF LEVEE SYSTEMS : A COMPARATIVE STUDY G

Manisha Panta 2 Jul 23, 2022
code for paper "Does Unsupervised Architecture Representation Learning Help Neural Architecture Search?"

Does Unsupervised Architecture Representation Learning Help Neural Architecture Search? Code for paper: Does Unsupervised Architecture Representation

null 39 Dec 17, 2022
This project contains an implemented version of Face Detection using OpenCV and Mediapipe. This is a code snippet and can be used in projects.

Live-Face-Detection Project Description: In this project, we will be using the live video feed from the camera to detect Faces. It will also detect so

Hassan Shahzad 3 Oct 2, 2021
This project is based on RIFE and aims to make RIFE more practical for users by adding various features and design new models

This project is based on RIFE and aims to make RIFE more practical for users by adding various features and design new models. Because improving the PSNR index is not compatible with subjective effects, we hope this part of work and our academic research are independent of each other.

hzwer 190 Jan 8, 2023
This repository contains several image-to-image translation models, whcih were tested for RGB to NIR image generation. The models are Pix2Pix, Pix2PixHD, CycleGAN and PointWise.

RGB2NIR_Experimental This repository contains several image-to-image translation models, whcih were tested for RGB to NIR image generation. The models

null 5 Jan 4, 2023