This respository is the official implementation of our ECCV2022 paper.
The overview of the proposed quantization framework CADyQ for SR network, which we illustrate with a residual block based backbone.
For each given patch and each layer, our CADyQ module introduces a light-weight bit selector that dynamically selects the bit-width and its corresponding quantization function
Our implementation is based on EDSR(PyTorch) and PAMS(PyTorch).
conda env create -f environment.yml --name CADyQ
conda activate CADyQ
- Python 3.6
- PyTorch == 1.1.0
- coloredlogs >= 14.0
- scikit-image
-
For training, we use DIV2K datasets.
-
For testing, we use benchmark datasets and Test2K,4K.8K. Test8K contains the images (index 1401-1500) from DIV8K. Test2K/4K contain the images (index 1201-1300/1301-1400) from DIV8K which are downsampled to 2K and 4K resolution.
# for training
DIV2K
# for testing
benchmark
Test2K
Test4K
Test8K
sh train_carn_cadyq.sh
sh train_idn_cadyq.sh
sh train_edsrbaseline_cadyq.sh
sh train_srresnet_cadyq.sh
Pretrained model for stduent and teacher model to start training from can be accessed from Google Drive.
sh test_cadyq_patch.sh # for patch-wise inference
sh test_cadyq_image.sh # for image-wise inference
Email : [email protected]