Pytorch implementation of our paper accepted by ICLR 2023 -- "Real-time Image Demoiréing on Mobile Devices".
- python 3.7
- pytorch 1.9.0
- torchvision 0.11.3
- opencv-python-headless 4.6
- colour 0.1.5
- scikit-image 0.19.3
First, split and divide the training dataset by the following command:
sh run/split_dataset.sh
Note that the data path of demoiréing benchmarks should be modified in /data_script/aim/slit_patches_train.py
Second, run the command scripts in run/
to accelerate models on different benchmarks. For example, to reproduce the results of DDA for accelerating MBCNN on FHDMI, run:
sh run/mbcnn_fhdmi.sh
The checkpoint file of the accelerated models are provided in the following anonymous link. To evaluate them, download the model file and place it into /ckpt
and then run the command script in run/
. For example, to evaluate the accelerated model of DDA for accelerating MBCNN on FHDMI, run:
sh run/test_mbcnn_fhdmi.sh
Model | Dataset | PSNR | FLOPs reduction | Link |
---|---|---|---|---|
DMCNN | LCDMoiré | 34.19 | 0% | Link |
DMCNN-DDA | LCDMoiré | 34.58 | 55.1% | Link |
DMCNN | FHDMI | 21.69 | 0% | Link |
DMCNN-DDA | FHDMI | 21.86 | 52.3% | Link |
MBCNN | LCDMoiré | 43.95 | 0% | Link |
MBCNN-DDA | LCDMoiré | 41.68 | 46.9% | Link |
MBCNN | FHDMI | 23.27 | 0% | Link |
MBCNN-DDA | FHDMI | 23.62 | 45.2% | Link |
Any problem, feel free to contact yuxinzhang@stu.xmu.edu.cn