oscarnar / DeepRFT_CPU

Deep Residual Fast Transdormer for CPU

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deep Residual Fourier Transformation for Single Image Deblurring for CPU

Implementation for DeepRFT to CPU.

Paper: https://arxiv.org/abs/2111.11745

Network Architecture

Overall Framework of DeepRFT

Installation

For installing, follow these intructions, this is an implementation for CPU.

conda create -n pytorch python=3.10
conda activate pytorch
conda install pytorch==1.11.0 torchvision==0.9.0 torchaudio==0.8.0 cudatoolkit=11.1 -c pytorch -c conda-forge
pip install matplotlib scikit-image opencv-python yacs joblib natsort h5py tqdm kornia tensorboard ptflops

Install warmup scheduler

cd pytorch-gradual-warmup-lr; python setup.py install; cd ..

Quick Run

To test the pre-trained models of Deblur and Defocus Google Drive on your own images, run

python test.py --weights ckpt_path_here --input_dir path_to_images --result_dir save_images_here --win_size 256 # deblur
python test.py --weights ckpt_path_here --input_dir path_to_images --result_dir save_images_here --win_size 512 # defocus

Here is an example to train:

python train.py

Results

Experiment for image deblurring.

Reference Code:

About

Deep Residual Fast Transdormer for CPU

License:MIT License


Languages

Language:Python 98.7%Language:MATLAB 1.3%