Deep Halftoning with Reversible Binary Pattern
ICCV Paper | Project Website | BibTex
Overview
Existing halftoning algorithms usually drop colors and fine details when dithering color images with binary dot patterns, which makes it extremely difficult to recover the original information. To dispense the recovery trouble in future, we propose a novel halftoning technique that dithers a color image into binary halftone with decent restorability to the original input. The key idea is to implicitly embed those previously dropped information into the binary dot patterns. So, the halftone pattern not only serves to reproduce the image tone, maintain the blue-noise randomness, but also represents the color information and fine details. See the examples illustrated below.
Run
-
Requirements:
- Basic variant infomation: Python 3.7 and Pytorch 1.0.1.
- Create a virutal environment with satisfied requirements:
conda env create -f requirement.yaml
-
Training:
- Place your training set/validation set under
dataset/
per the exampled file organization. Or download our [preprocessed full dataset](coming soon). - Warm-up stage (optional):
python train_warm.py --config scripts/invhalf_warm.json
checkpoints/
, which is required at joint-train stage. - Joint-train stage:
python train.py --config scripts/invhalf_full.json
- Place your training set/validation set under
-
Testing:
- Download the pretrained weight below and put it under
checkpoints/
. - Place your images in any accesible directory, e.g.
test_imgs/
. - Dither the input images and restore from the generated halftones
python inference_fast.py --model checkpoints/model_best.pth.tar --data_dir ./test_imgs --save_dir ./result
- Download the pretrained weight below and put it under
Copyright and License
You are granted with the LICENSE for both academic and commercial usages.
Citation
If any part of our paper and code is helpful to your work, please generously cite with:
@inproceedings{xia-2021-inverthalf,
author = {Menghan Xia and Wenbo Hu and Xueting Liu and Tien-Tsin Wong},
title = {Deep Halftoning with Reversible Binary Pattern},
booktitle = {{IEEE/CVF} International Conference on Computer Vision (ICCV)},
year = {2021}
}