• Stars
    star
    115
  • Rank 305,916 (Top 7 %)
  • Language Cuda
  • License
    BSD 3-Clause "New...
  • Created over 6 years ago
  • Updated about 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Detail-Preserving Pooling in Deep Networks (CVPR 2018)

Detail Preserving Pooling in Torch

This repository contains the code for DPP introduced in the following paper:
Detail-Preserving Pooling in Deep Networks (CVPR 2018)
Faraz Saeedan1, Nicolas Weber1,2*, Michael Goesele1,3*, and Stefan Roth1
1TU Darmstadt (VISINF & GCC), 2NEC Laboratories Europe, 3Oculus Research
*Work carried out while at TU Darmstadt

Citation

If you find DPP useful in your research, please cite:

@inproceedings{saeedan2018dpp,
  title={Detail-preserving pooling in deep networks},
  author={Saeedan, Faraz and Weber, Nicolas and Goesele, Michael and Roth, Stefan},
  booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},
  year={2018}
}

Requirements

  • This code is built on fb.resnet.torch. Check that repository for requirements and preparations.
  • In addition you need the nnlr package installed in Torch.

Install

  1. Install the visinf package first. This package will give you access to all the models that were used in the paper: Symmetric, asymmetric, full, lite, with and without stochasticity. Please check the reference paper for a description of these variants.

  2. Clone the repository:

    git clone https://github.com/visinf/dpp.git 
  3. Follow one of the recipes below or try your own.

Usage

For training, simply run main.lua. By default, the script runs ResNet-110 with $DPP sym lite$ on CIFAR10 with 1 GPU and 2 data-loader threads. To run the models used in CIFAR10 experiments try:

    th main.lua -data [imagenet-folder with train and val folders] -netType resnetdpp -poolingType DPP_sym_lite -save [folder to save results] -stochasticity 'false' -manualSeed xyz
    th main.lua -data [imagenet-folder with train and val folders] -netType resnetdpp -poolingType DPP_asym_lite -save [folder to save results] -stochasticity 'false' -manualSeed xyz
    th main.lua -data [imagenet-folder with train and val folders] -netType resnetdpp -poolingType DPP_sym_full -save [folder to save results] -stochasticity 'false' -manualSeed xyz
    th main.lua -data [imagenet-folder with train and val folders] -netType resnetdpp -poolingType DPP_asym_full -save [folder to save results] -stochasticity 'false' -manualSeed xyz
    th main.lua -data [imagenet-folder with train and val folders] -netType resnetdpp -poolingType DPP_sym_lite -save [folder to save results] -stochasticity 'true' -manualSeed xyz

replace xyz with your desired random number generator seed.

To train ResNets on ImageNet try:

    th main.lua -depth 50 -batchSize 85 -nGPU 4 -nThreads 8 -shareGradInput true -data [imagenet-folder] -dataset imagenet -LR 0.033 -netType resnetdpp -poolingType DPP_sym_lite

or

    th main.lua -depth 101 -batchSize 85 -nGPU 4 -nThreads 8 -shareGradInput true -data [imagenet-folder] -dataset imagenet -LR 0.033 -netType resnetdpp -poolingType DPP_sym_lite

Different implementations of DPP

There are two different implementation codes of DPP available in the Visinf package:

  1. Black-box implementation: For this implementation we have derived closed form equations for the forward and backward passes of the inverse bilateral pooling component of DPP and implemented them in CUDA. visinf.SpatialInverseBilateralPooling gives access to this implementation, which is very fast and memory efficient. This version can be used for large-scale experiments such as ImageNet, but gives very little insight into various elements inside the block and modifying them is difficult and requires re-deriving and implementing the gradients w.r.t. parameters and inputs.

  2. Implementation based on nngraph: This version is made up of a number of Torch primitive blocks connected to each other in a graph. The internals of the block can be understood easily, examined, and altered if need be. This version is fast but not memory efficient for large image sizes. The memory overhead for CIFAR-sized experiments is moderate.

Contact

If you have further questions or discussions write an email to [email protected]

More Repositories

1

1-stage-wseg

Single-Stage Semantic Segmentation from Image Labels (CVPR 2020)
Python
379
star
2

n3net

Neural Nearest Neighbors Networks (NIPS*2018)
Python
284
star
3

self-mono-sf

Self-Supervised Monocular Scene Flow Estimation (CVPR 2020)
Python
248
star
4

irr

Iterative Residual Refinement for Joint Optical Flow and Occlusion Estimation (CVPR 2019)
Python
192
star
5

dense-ulearn-vos

Dense Unsupervised Learning for Video Segmentation (NeurIPS*2021)
Python
181
star
6

da-sac

Self-supervised Augmentation Consistency for Adapting Semantic Segmentation (CVPR 2021)
Python
148
star
7

multi-mono-sf

Self-Supervised Multi-Frame Monocular Scene Flow (CVPR 2021)
Python
99
star
8

ppac_refinement

Probabilistic Pixel-Adaptive Refinement Networks (CVPR 2020)
Python
77
star
9

cos-cvae

Diverse Image Captioning with Context-Object Split Latent Spaces (NeurIPS 2020)
Jupyter Notebook
37
star
10

lnfmm

Latent Normalizing Flows for Many-to-Many Cross Domain Mappings (ICLR 2020)
Python
33
star
11

adapter_plus

[CVPR 2024] Official implementation of "Adapters Strike Back"
Python
29
star
12

cad

Content-Adaptive Downsampling in Convolutional Neural Networks (CVPR 2023 Workshop on Efficient Deep Learning for Computer Vision)
Python
23
star
13

veto

Vision Relation Transformer for Unbiased Scene Graph Generation (ICCV 2023)
Jupyter Notebook
21
star
14

funnybirds

FunnyBirds: A Synthetic Vision Dataset for a Part-Based Analysis of Explainable AI Methods (ICCV 2023)
JavaScript
19
star
15

acis

Actor-Critic Instance Segmentation (CVPR 2019)
Lua
19
star
16

deblur-devil

Deep Video Deblurring: The Devil is in the Details (ICCV Workshop 2019)
Python
17
star
17

self-adaptive

Semantic Self-adaptation: Enhancing Generalization with a Single Sample
Python
17
star
18

fast-axiomatic-attribution

Fast Axiomatic Attribution for Neural Networks (NeurIPS*2021)
Jupyter Notebook
15
star
19

mar-scf

Normalizing Flows with Multi-Scale Autoregressive Priors (CVPR 2020)
Python
15
star
20

funnybirds-framework

FunnyBirds: A Synthetic Vision Dataset for a Part-Based Analysis of Explainable AI Methods (ICCV 2023)
Python
13
star
21

fldr-vfi

Efficient Feature Extraction for High-resolution Video Frame Interpolation (BMVC 2022)
Python
11
star
22

primaps

11
star
23

pixelpyramids

PixelPyramids: Exact Inference Models from Lossless Image Pyramids (ICCV 2021)
Python
10
star
24

s2-flow

S2-Flow: Joint Semantic and Style Editing of Facial Images (BMVC 2022)
Python
7
star
25

style-seqcvae

Diverse Image Captioning with Grounded Style (GCPR 2021)
Python
6
star
26

semantic_lattice

Semantic Lattice (GCPR 2019)
Python
5
star
27

jwae

Joint Wasserstein Autoencoders for Aligning Multimodal Embeddings (ICCV 2019 Workshop on Cross-Modal Learning in Real World)
Python
5
star
28

probflow

ProbFlow: Joint Optical Flow and Uncertainty Estimation (ICCV 2017)
MATLAB
4
star
29

DIAGen

DIAGen: Semantically Diverse Image Augmentation with Generative Models for Few-Shot Learning (GCPR 2024)
Python
4
star
30

benchmarking-synthetic-clones

Is Synthetic Data all We Need? Benchmarking the Robustness of Models Trained with Synthetic Images (CVPRW 2024)
3
star
31

svigl

Stochastic Variational Inference with Gradient Linearization (CVPR 2018)
MATLAB
2
star
32

playing-for-data

Playing for data: Ground Truth from Computer Games (ECCV 2016)
C++
2
star
33

mirrorflow

MirrorFlow: Exploiting Symmetries in Joint Optical Flow and Occlusion Estimation (ICCV 2017)
C++
1
star
34

matryoshka

Matryoshka Networks: Predicting 3D Geometry via Nested Shape Layers
Python
1
star