The official implementation of the User clearlon On the AIM 2022 Instagram Filter Removal Challenge. We propose a method for removing Instagram filters from the images by assuming the affects of filters as the style information.
Clone our repository
git clone https://github.com/clearlon/StyleFormer.git
cd StyleFormer
To install requirements:
pip install -r requirements.txt
Install
python setup.py develop
IFFI dataset contains high-resolution (1080×1080) 600 images and with 16 different filtered versions for each. In particular, we have picked mostly-used 16 filters: 1977, Amaro, Brannan, Clarendon, Gingham, He-Fe, Hudson, Lo-Fi, Mayfair, Nashville, Perpetua, Sutro, Toaster, Valencia, Willow, X-Pro II.
CUDA_VISIBLE_DEVICES=0 \
python basicsr/train.py -opt options/train_StyleFormer.yml
CUDA_VISIBLE_DEVICES=0,1 \
python -m torch.distributed.launch --nproc_per_node=2 --master_port=4321 basicsr/train.py -opt options/train_StyleFormer.yml --launcher pytorch
Download pretrained model from Google Drive and put it in the experiments/pretrained path.
CUDA_VISIBLE_DEVICES=0 python inference/iffi_submit_generate.py
This repository is built on BasicSR. Our work is also inspired by ArcFace, Restormer, NAFNet, MixFormer, and StyleGAN2.