Home

Awesome

OAPT: Offset-Aware Partition Transformer for Double JPEG Artifacts Removal

Qiao Mo, Yukang Ding, Jinhua Hao, Qiang Zhu, Ming Sun, Chao Zhou, Feiyu Chen, Shuyuan Zhu

UESTC, Kuaishou Techonology

Official implement of OAPT in ECCV2024, which is a transformer-based network deigned for double (or multiple) compressed image restoration.

Paper Link


TODO List


Architecture

architecture

Pattern clustering & inv operation

pattern clustering

Experimental results on gray double JPEG images

results

Visual results

gray visual results

Training details

Model(Gray)Params(M)Multi-Adds(G)TrainingSetsPretrain modeliterations
SwinIR11.49293.42DF2K006_CAR_DFWB_s126w7_SwinIR-M_jpeg10200k
HAT-S9.24227.14DF2KHAT-S_SRx2800k
ART16.14415.51DF2KCAR_ART_q10200k
OAPT12.96293.60DF2K006_CAR_DFWB_s126w7_SwinIR-M_jpeg10200k

Setup

This project is mainly based on swinir and hat. All the weights are put in 'Baidu Netdisk' and 'Gdrive'

The version of PyTorch we used is 1.7.0.

pip install -r requirements.txt
python setup.py develop

Test

CUDA_VISIBLE_DEVICES=0 python oapt/test.py -opt ./options/Gray/test/test_oapt.yml

Train

CUDA_VISIBLE_DEVICES=0,1,2,3 python -m torch.distributed.launch --nproc_per_node=4 --master_port=73 hat/train.py -opt options/Gray/train/train_oapt.yml --launcher pytorch