This is an official implementation of the paper "Distance-aware Quantization", accepted to ICCV2021.

Related tags

Deep Learning DAQ
Overview

PyTorch implementation of DAQ

This is an official implementation of the paper "Distance-aware Quantization", accepted to ICCV2021.

For more information, checkout the project site [website].

Getting started

Dependencies

  • Python 3.6
  • PyTorch = 1.5.0

Datasets

  • Cifar-10
    • This can be automatically downloaded by learning our code
  • ImageNet
    • This is available at here

Training & Evaluation

First, clone our github repository.

$ git clone https://github.com/cvlab-yonsei/DAQ.git

Cifar-10 dataset (ResNet-20 architecture)

  • First, download full-precision model into results/ folder. Link: [weights]
  • Note that you create results/ directory manually.
# Cifar-10 & ResNet-20 W1A1 model
$ python cifar10_train.py --config configs/DAQ/resnet20_DAQ_W1A1.yml
# Cifar-10 & ResNet-20 W1A32 model
$ python cifar10_train.py --config configs/DAQ/resnet20_DAQ_W1A32.yml

ImageNet dataset (ResNet-18 architecture)

  • Will be released
# ImageNet & ResNet-18 W1A1 model
# ImageNet & ResNet-18 W1A1 model

Using the pretrained models


Citation

@inproceedings{kim2021daq,
    author={Kim, Dohyung  and Lee, Junghyup and Ham, Bumsub},
    title={Distance-aware Quantization},
    booktitle={Proceedings of International Conference on Computer Vision},
    year={2021},
}

Credit

You might also like...
Official implementation of NLOS-OT: Passive Non-Line-of-Sight Imaging Using Optimal Transport (IEEE TIP, accepted)
Official implementation of NLOS-OT: Passive Non-Line-of-Sight Imaging Using Optimal Transport (IEEE TIP, accepted)

NLOS-OT Official implementation of NLOS-OT: Passive Non-Line-of-Sight Imaging Using Optimal Transport (IEEE TIP, accepted) Description In this reposit

This repository provides the official implementation of 'Learning to ignore: rethinking attention in CNNs' accepted in BMVC 2021.

inverse_attention This repository provides the official implementation of 'Learning to ignore: rethinking attention in CNNs' accepted in BMVC 2021. Le

This is the official implementation code repository of Underwater Light Field Retention : Neural Rendering for Underwater Imaging (Accepted by CVPR Workshop2022 NTIRE)
This is the official implementation code repository of Underwater Light Field Retention : Neural Rendering for Underwater Imaging (Accepted by CVPR Workshop2022 NTIRE)

Underwater Light Field Retention : Neural Rendering for Underwater Imaging (UWNR) (Accepted by CVPR Workshop2022 NTIRE) Authors: Tian Ye†, Sixiang Che

Official PyTorch Implementation of Rank & Sort Loss [ICCV2021]
Official PyTorch Implementation of Rank & Sort Loss [ICCV2021]

Rank & Sort Loss for Object Detection and Instance Segmentation The official implementation of Rank & Sort Loss. Our implementation is based on mmdete

Official implementation of
Official implementation of "A Unified Objective for Novel Class Discovery", ICCV2021 (Oral)

A Unified Objective for Novel Class Discovery This is the official repository for the paper: A Unified Objective for Novel Class Discovery Enrico Fini

Implementation of accepted AAAI 2021 paper: Deep Unsupervised Image Hashing by Maximizing Bit Entropy
Implementation of accepted AAAI 2021 paper: Deep Unsupervised Image Hashing by Maximizing Bit Entropy

Deep Unsupervised Image Hashing by Maximizing Bit Entropy This is the PyTorch implementation of accepted AAAI 2021 paper: Deep Unsupervised Image Hash

Implementation of ICCV2021(Oral) paper - VMNet: Voxel-Mesh Network for Geodesic-aware 3D Semantic Segmentation
Implementation of ICCV2021(Oral) paper - VMNet: Voxel-Mesh Network for Geodesic-aware 3D Semantic Segmentation

VMNet: Voxel-Mesh Network for Geodesic-Aware 3D Semantic Segmentation Created by Zeyu HU Introduction This work is based on our paper VMNet: Voxel-Mes

Implementation for our ICCV2021 paper: Internal Video Inpainting by Implicit Long-range Propagation
Implementation for our ICCV2021 paper: Internal Video Inpainting by Implicit Long-range Propagation

Implicit Internal Video Inpainting Implementation for our ICCV2021 paper: Internal Video Inpainting by Implicit Long-range Propagation paper | project

PyTorch implementation of our ICCV2021 paper: StructDepth: Leveraging the structural regularities for self-supervised indoor depth estimation
PyTorch implementation of our ICCV2021 paper: StructDepth: Leveraging the structural regularities for self-supervised indoor depth estimation

StructDepth PyTorch implementation of our ICCV2021 paper: StructDepth: Leveraging the structural regularities for self-supervised indoor depth estimat

Comments
  • Gussian kernel and Rescale f(y)

    Gussian kernel and Rescale f(y)

    Thanks for your great paper, I have two questions about the code

    1. The first is the 1-dimsion Gussion kernel, in the code, is it k_p = torch.exp(-(torch.pow(self.q_value-max_idx, 2).float()/(sigma**2)))? all the elements in k_p is the same
    2. The second is the Rescale f(y),Is there any more math explanation? the paper use q_c and q_f, while the code use (x-q_c) and (x-q_f), there still exits a gap for me.
            q_var = self.q_value.clone()
            q_var[0] = q_var[0] - (1/(torch.exp(torch.tensor(T_ori).float()) - 1))
    
            q_var[1] = q_var[1] + (1/(torch.exp(torch.tensor(T_ori).float()) - 1))
    
            output = (q_var * prob).sum(dim=0)
            output = output + x_floor
    
    opened by qiulinzhang 5
  • abs backward function

    abs backward function

    Thanks for your great paper. I have one question about the class absol, line 31, https://github.com/cvlab-yonsei/DAQ/blob/main/models/resnet20_DAQ.py, I don't understand your backward function, there seems a lot of redundant operation after grad_input = torch.sign(input). Is there any specific explanation about this backward function.

    opened by qiulinzhang 3
  • Eq. 7 in the paper

    Eq. 7 in the paper

    Hi!

    When reading the paper, I calculated that the closer to the transition point the smaller \beta^* is in Eq. 7. Because one part of the denominator is very large and the other part tends to 0, which contradicts the description in your paper.

    Thanks.

    opened by BobxmuMa 0
  • Paper formula is not the same as code

    Paper formula is not the same as code

    Hi,thanks for your work,When I read the paper formula and code, I found a little different, like where λ = 1/(exp(γ) + 1) as stated in Sec. 3.3,paper is written as +1, but the code is - 1, why?

    https://github.com/cvlab-yonsei/DAQ/blob/e8e9af4cc9ebef2b77800fc3b04ecbf722205dab/models/resnet20_DAQ.py#L133

    opened by aksenventwo 0
Owner
CV Lab @ Yonsei University
CV Lab @ Yonsei University
This project is the official implementation of our accepted ICLR 2021 paper BiPointNet: Binary Neural Network for Point Clouds.

BiPointNet: Binary Neural Network for Point Clouds Created by Haotong Qin, Zhongang Cai, Mingyuan Zhang, Yifu Ding, Haiyu Zhao, Shuai Yi, Xianglong Li

Haotong Qin 59 Dec 17, 2022
Official PyTorch implementation of the preprint paper "Stylized Neural Painting", accepted to CVPR 2021.

Official PyTorch implementation of the preprint paper "Stylized Neural Painting", accepted to CVPR 2021.

Zhengxia Zou 1.5k Dec 28, 2022
Official PyTorch implementation of the paper "Recycling Discriminator: Towards Opinion-Unaware Image Quality Assessment Using Wasserstein GAN", accepted to ACM MM 2021 BNI Track.

RecycleD Official PyTorch implementation of the paper "Recycling Discriminator: Towards Opinion-Unaware Image Quality Assessment Using Wasserstein GAN

Yunan Zhu 23 Nov 5, 2022
This repository contains the official implementation code of the paper Improving Multimodal Fusion with Hierarchical Mutual Information Maximization for Multimodal Sentiment Analysis, accepted at EMNLP 2021.

MultiModal-InfoMax This repository contains the official implementation code of the paper Improving Multimodal Fusion with Hierarchical Mutual Informa

Deep Cognition and Language Research (DeCLaRe) Lab 89 Dec 26, 2022
The official implementation of paper Siamese Transformer Pyramid Networks for Real-Time UAV Tracking, accepted by WACV22

SiamTPN Introduction This is the official implementation of the SiamTPN (WACV2022). The tracker intergrates pyramid feature network and transformer in

Robotics and Intelligent Systems Control @ NYUAD 28 Nov 25, 2022
An official source code for paper Deep Graph Clustering via Dual Correlation Reduction, accepted by AAAI 2022

Dual Correlation Reduction Network An official source code for paper Deep Graph Clustering via Dual Correlation Reduction, accepted by AAAI 2022. Any

yueliu1999 109 Dec 23, 2022
Official code of ICCV2021 paper "Residual Attention: A Simple but Effective Method for Multi-Label Recognition"

CSRA This is the official code of ICCV 2021 paper: Residual Attention: A Simple But Effective Method for Multi-Label Recoginition Demo, Train and Vali

null 163 Dec 22, 2022
Official code for ICCV2021 paper "M3D-VTON: A Monocular-to-3D Virtual Try-on Network"

M3D-VTON: A Monocular-to-3D Virtual Try-On Network Official code for ICCV2021 paper "M3D-VTON: A Monocular-to-3D Virtual Try-on Network" Paper | Suppl

null 109 Dec 29, 2022
Official Repo for ICCV2021 Paper: Learning to Regress Bodies from Images using Differentiable Semantic Rendering

[ICCV2021] Learning to Regress Bodies from Images using Differentiable Semantic Rendering Getting Started DSR has been implemented and tested on Ubunt

Sai Kumar Dwivedi 83 Nov 27, 2022
An official TensorFlow implementation of “CLCC: Contrastive Learning for Color Constancy” accepted at CVPR 2021.

CLCC: Contrastive Learning for Color Constancy (CVPR 2021) Yi-Chen Lo*, Chia-Che Chang*, Hsuan-Chao Chiu, Yu-Hao Huang, Chia-Ping Chen, Yu-Lin Chang,

Yi-Chen (Howard) Lo 58 Dec 17, 2022