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

January 13, 2025 ยท View on GitHub

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

ECCV arXiv Visitor

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

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

Architecture

architecture

Pattern clustering & inv operation

pattern clustering

Experimental results on gray double JPEG images

results

Visual results

gray visual results

Training details

All the weights are put in Baidu Netdisk and Gdrive

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

The version of PyTorch we used is 1.7.0. Please ensure you have the correct versions of all dependencies by installing from the requirements.txt file.

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

Train

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

Test

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

Acknowledgement

This project is mainly based on SwinIR and HAT.