official code for dynamic convolution decomposition

Related tags

Deep Learning dcd
Overview

Revisiting Dynamic Convolution via Matrix Decomposition (ICLR 2021)

A pytorch implementation of DCD. If you use this code in your research please consider citing

@article{li2021revisiting, title={Revisiting Dynamic Convolution via Matrix Decomposition}, author={Li, Yunsheng and Chen, Yinpeng and Dai, Xiyang and Liu, Mengchen and Chen, Dongdong and Yu, Ye and Yuan, Lu and Liu, Zicheng and Chen, Mei and Vasconcelos, Nuno}, journal={arXiv preprint arXiv:2103.08756}, year={2021} }

Requirements

  • Hardware: PC with NVIDIA Titan GPU.
  • Software: Ubuntu 16.04, CUDA 10.0, Anaconda3, pytorch 1.0.0
  • Python package
    • conda install --quiet --yes pytorch==1.0.0 torchvision==0.2.1 cuda100 -c pytorch
    • pip install tensorboard tensorboardX pillow==6.1

Evaluate DCD on ImageNet

The pre-trained model can be downloaded here ResNet-50 and MobileNetV2x1.0

DCD for ResNet-50

python main.py -a resnet50_dcd -d /path/to/imagenet/ -b 256 -c /path/to/output -j 48 --input-size 224 --dropout 0.1 --weight /path/to/resnet50_dcd.pth.tar --evaluate

DCD for MobileNetV2x1.0

python main.py -a mobilenetv2_dcd -d /path/to/imagenet/ -b 512 -c /path/to/output --width-mult 1.0 -j 48 --input-size 224 --dropout 0.1 --fc-squeeze 16 --weight mv2x1.0_dcd.pth.tar --evaluate

Train DCD on ImageNet

DCD for ResNet-50

CUDA_VISIBLE_DEVICES=0,1,2,3 python main.py -a resnet50_dcd -d /path/to/imagenet/ -b 256 --epochs 120 --lr-decay schedule --lr 0.1 --wd 1e-4 -c /path/to/output -j 48 --input-size 224 --label-smoothing 0.1 --dropout 0.1 --mixup 0.2

DCD for MobileNetV2x1.0

CUDA_VISIBLE_DEVICES=0,1,2,3 python main.py -a mobilenetv2_dcd -d /path/to/imagenet/ --epochs 300 --lr-decay cos --lr 0.1 --wd 2e-5 -c /path/to/output --width-mult 1.0 -j 48 --input-size 224 --label-smoothing 0.1 --dropout 0.2 -b 512 --mixup 0.2 --fc-squeeze 16
You might also like...
[ICLR 2021] Is Attention Better Than Matrix Decomposition?
[ICLR 2021] Is Attention Better Than Matrix Decomposition?

Enjoy-Hamburger 🍔 Official implementation of Hamburger, Is Attention Better Than Matrix Decomposition? (ICLR 2021) Under construction. Introduction T

STYLER: Style Factor Modeling with Rapidity and Robustness via Speech Decomposition for Expressive and Controllable Neural Text to Speech
STYLER: Style Factor Modeling with Rapidity and Robustness via Speech Decomposition for Expressive and Controllable Neural Text to Speech

STYLER: Style Factor Modeling with Rapidity and Robustness via Speech Decomposition for Expressive and Controllable Neural Text to Speech Keon Lee, Ky

Continuous Query Decomposition for Complex Query Answering in Incomplete Knowledge Graphs

Continuous Query Decomposition This repository contains the official implementation for our ICLR 2021 (Oral) paper, Complex Query Answering with Neura

DeepLM: Large-scale Nonlinear Least Squares on Deep Learning Frameworks using Stochastic Domain Decomposition (CVPR 2021)
DeepLM: Large-scale Nonlinear Least Squares on Deep Learning Frameworks using Stochastic Domain Decomposition (CVPR 2021)

DeepLM DeepLM: Large-scale Nonlinear Least Squares on Deep Learning Frameworks using Stochastic Domain Decomposition (CVPR 2021) Run Please install th

NeRD: Neural Reflectance Decomposition from Image Collections
NeRD: Neural Reflectance Decomposition from Image Collections

NeRD: Neural Reflectance Decomposition from Image Collections Project Page | Video | Paper | Dataset Implementation for NeRD. A novel method which dec

Learnable Multi-level Frequency Decomposition and Hierarchical Attention Mechanism for Generalized Face Presentation Attack Detection
Learnable Multi-level Frequency Decomposition and Hierarchical Attention Mechanism for Generalized Face Presentation Attack Detection

LMFD-PAD Note This is the official repository of the paper: LMFD-PAD: Learnable Multi-level Frequency Decomposition and Hierarchical Attention Mechani

MEND: Model Editing Networks using Gradient Decomposition

MEND: Model Editing Networks using Gradient Decomposition Setup Environment This codebase uses Python 3.7.9. Other versions may work as well. Create a

Autoformer: Decomposition Transformers with Auto-Correlation for Long-Term Series Forecasting
Autoformer: Decomposition Transformers with Auto-Correlation for Long-Term Series Forecasting

Autoformer (NeurIPS 2021) Autoformer: Decomposition Transformers with Auto-Correlation for Long-Term Series Forecasting Time series forecasting is a c

 Optimal space decomposition based-product quantization for approximate nearest neighbor search
Optimal space decomposition based-product quantization for approximate nearest neighbor search

Optimal space decomposition based-product quantization for approximate nearest neighbor search Abstract Product quantization(PQ) is an effective neare

Comments
  • Question about the code

    Question about the code

    Thanks for your great work~ I have a question about the code out = self.bn2(torch.matmul(phi, out)) + out I can't understand the residual part of the code above, is this means phi * Q * x + Q * x ? Is this residual part necessary? Looking forward to your reply

    opened by HzZHoO 2
  • Use of mixup, label smoothing are used?

    Use of mixup, label smoothing are used?

    Hello, Thank you for the intriguing work!

    I had a question regarding the use of mixup and label smoothing. The paper mentions that mixup is used for MobileNetV2 x1.0 and dropout is used for ResNet-50: "For MobileNetV2 ×1.0,Mixup (Zhang et al., 2018a) and label smoothing are further added to avoid overfitting."

    But in the command provided, it seems like mixup is used to train ResNet-50. Was mixup or label smoothing used for any other models? Additionally, regarding the numbers in the paper, are the above mentioned methods used for the static method?

    Thanks!

    opened by bangawayoo 1
  • About pretrained model

    About pretrained model

    Thanks for your impressive work! Could you please provide your resnet-101 model pretrained on ImageNet1k? We will cite your work in recent papers. Thanks a lot!

    opened by xiaoachen98 1
Owner
Yunsheng Li
Yunsheng Li
(CVPR 2021) PAConv: Position Adaptive Convolution with Dynamic Kernel Assembling on Point Clouds

PAConv: Position Adaptive Convolution with Dynamic Kernel Assembling on Point Clouds by Mutian Xu*, Runyu Ding*, Hengshuang Zhao, and Xiaojuan Qi. Int

CVMI Lab 228 Dec 25, 2022
Facial Action Unit Intensity Estimation via Semantic Correspondence Learning with Dynamic Graph Convolution

FAU Implementation of the paper: Facial Action Unit Intensity Estimation via Semantic Correspondence Learning with Dynamic Graph Convolution. Yingruo

Evelyn 78 Nov 29, 2022
[ICCV2021] Official code for "Channel-wise Topology Refinement Graph Convolution for Skeleton-Based Action Recognition"

CTR-GCN This repo is the official implementation for Channel-wise Topology Refinement Graph Convolution for Skeleton-Based Action Recognition. The pap

Yuxin Chen 148 Dec 16, 2022
Dynamic View Synthesis from Dynamic Monocular Video

Towards Robust Monocular Depth Estimation: Mixing Datasets for Zero-shot Cross-dataset Transfer This repository contains code to compute depth from a

Intelligent Systems Lab Org 2.3k Jan 1, 2023
Dynamic View Synthesis from Dynamic Monocular Video

Dynamic View Synthesis from Dynamic Monocular Video Project Website | Video | Paper Dynamic View Synthesis from Dynamic Monocular Video Chen Gao, Ayus

Chen Gao 139 Dec 28, 2022
Dynamic vae - Dynamic VAE algorithm is used for anomaly detection of battery data

Dynamic VAE frame Automatic feature extraction can be achieved by probability di

null 10 Oct 7, 2022
Code for "Unsupervised Layered Image Decomposition into Object Prototypes" paper

DTI-Sprites Pytorch implementation of "Unsupervised Layered Image Decomposition into Object Prototypes" paper Check out our paper and webpage for deta

null 40 Dec 22, 2022
This is the code repository implementing the paper "TreePartNet: Neural Decomposition of Point Clouds for 3D Tree Reconstruction".

TreePartNet This is the code repository implementing the paper "TreePartNet: Neural Decomposition of Point Clouds for 3D Tree Reconstruction". Depende

刘彦超 34 Nov 30, 2022
Official pytorch implementation of paper "Inception Convolution with Efficient Dilation Search" (CVPR 2021 Oral).

IC-Conv This repository is an official implementation of the paper Inception Convolution with Efficient Dilation Search. Getting Started Download Imag

Jie Liu 111 Dec 31, 2022
Functional TensorFlow Implementation of Singular Value Decomposition for paper Fast Graph Learning

tf-fsvd TensorFlow Implementation of Functional Singular Value Decomposition for paper Fast Graph Learning with Unique Optimal Solutions Cite If you f

Sami Abu-El-Haija 14 Nov 25, 2021