Skip to content
/ CAR Public
forked from sunwj/CAR

Content adaptive resampler for image downscaling

License

Notifications You must be signed in to change notification settings

ZeeRizvee/CAR

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CAR-pytorch

Pytorch implementation of paper "Learned Image Downscaling for Upscaling using Content Adaptive Resampler"

Installation

# get CAR-pytorch source
git clone https://github.com/sunwj/CAR.git
cd CAR

# compile the code of the resampler
cd adaptive_gridsampler
python3 setup.py build_ext --inplace

Python requirements

Currently, the code only supports python3 and machine with NVIDIA GPU (and the CUDA development toolkit) installed

  • numpy
  • scipy
  • pytorch (== 1.3.1)
  • Pillow
  • tqdm

Pre-trained models

You can download the pre-trained models for 2x and 4x downscaling and super-resolution from here.

Inference

python3 run.py --scale 4 --img_dir path_to_images --model_dir path_to_pretrained_models \
--output_dir path_to_output

Sample results

You can download HR images of benchmark datasets, i.e., the Set5, Set14, B100 and Urban100 from here.

If you find our work useful in your research or publication, please cite our work:

Wanjie Sun, Zhenzhong Chen. "Learned Image Downscaling for Upscaling using Content Adaptive Resampler". arXiv preprint arXiv:1907.12904, 2019.

@misc{1907.12904,
Author = {Wanjie Sun and Zhenzhong Chen},
Title = {Learned Image Downscaling for Upscaling using Content Adaptive Resampler},
Year = {2019},
Eprint = {arXiv:1907.12904}
}

Acknowlegements

EDSR code is provided by thstkdgus35/EDSR-PyTorch.

About

Content adaptive resampler for image downscaling

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 62.1%
  • Python 32.8%
  • Cuda 5.1%