@ARTICLE{9606525,
author={Punnappurath, Abhijith and Brown, Michael S},
journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},
title={A Little Bit More: Bitplane-Wise Bit-Depth Recovery},
year={2021},
volume={},
number={},
pages={1-1},
doi={10.1109/TPAMI.2021.3125692}}
This code was tested on
- Python 3.6
- Tensorflow 1.12.0
- Keras 2.2.4
- scikit-image 0.15.0
- opencv 3.3.1
Or create a new conda environment with
conda env create -f environment.yml
and activate it with
conda activate bitmore
-
To test 4 to 8-bit recovery on the Kodak dataset (which has already been downloaded to
./data/Test/Kodak
) using our D16 model, runpython test.py --set_names Kodak --type_8_or_16 0 --quant 4 --quant_end 8 --dep 16
(Note: Set
--type_8_or_16 0
for 8-bit images and--type_8_or_16 1
for 16-bit images according to the corresponding--set_names
folder) -
To test 6 to 16-bit recovery on this sample image from the Sintel dataset (which has already been downloaded to
./data/Test/Sintel_sample
) using our D4 model and save the result, runpython test.py --set_names Sintel_sample --type_8_or_16 1 --quant 6 --quant_end 16 --dep 4 --save_result 1
-
To test 4 to 8-bit recovery on the Kodak dataset and on the sample image from the Sintel dataset using our D4 model, run
python test.py --set_names Kodak,Sintel_sample --type_8_or_16 0,1 --quant 4 --quant_end 8 --dep 4
- To reproduce the numbers in Table I, run this code to download the data, and this code to produce the outputs.
- To reproduce the numbers in Table II, run this code to download the data, and this code to produce the outputs.
- Note: Downloading and preparing Adobe MIT test data can take a while!
- To reproduce the numbers in Table III, follow these instructions to download the data, and run this code to produce the outputs.
- To reproduce the numbers in Table IV on the Kodak dataset which has already been downloaded to ./data/Test/Kodak, run this code.
- To reproduce the numbers in Table V, follow these instructions to download the data, and run this code to produce the outputs.
- To reproduce the numbers in Table S4, follow these instructions to download the data, and run this code to produce the outputs.
- To reproduce the numbers in Table S5, follow these instructions to download the data, and run this code to produce the outputs.
- To reproduce the numbers in Table S6, and run this code.
- To reproduce the numbers in Table S7, and run this code.
- To reproduce the numbers in Table S8, follow these instructions to download the data, and run this code to produce the outputs.
- Run this code to download training data.
- Note: Downloading and preparing training data can take a while!
- To train a model that predicts the 5th bit, run
python train.py --quant 4
- Note: The images are quantized to 4 bits, and the model is trained to predict the (4+1)th bit.
- To perform 4 to 8-bit recovery, train four separate models as
python train.py --quant 4 python train.py --quant 5 python train.py --quant 6 python train.py --quant 7
- The number of residual units is set to 4 by default, i.e., D4 model. To train the D16 model, pass
--dep 16
as argument. - The models are saved to
./models
.