This repository contains the official implementation of the paper "Error-compensation network for ringing artifact reduction in holographic displays" (Optics Letters 2024).
We propose an error-compensation network for reducing ringing artifacts in computer-generated holograms (CGHs). Our method introduces a specialized network architecture that effectively compensates for errors in the holographic reconstruction process, leading to improved image quality and reduced artifacts.
- Python 3.8+
- PyTorch 1.8.0+
- PyTorch Lightning 2.0.0+
- CUDA capable GPU
For detailed requirements, see requirements.txt.
# Clone the repository
git clone https://github.com/MoyoungY/error-compensation-holography.git
cd error-compensation-holography
# Create and activate conda environment
conda create -n errorCGH python=3.8
conda activate errorCGH
# Install dependencies
pip install -r requirements.txtWe use the DIV2K dataset for training and evaluation. Please download it from DIV2K website and organize as follows:
data/
├── DIV2K_train_HR/
│ └── rgb/
└── DIV2K_valid_HR/
└── rgb/
To train the model:
python main.py \
--channel 1 \
--exp_name your_experiment_name \
--batch_size 1 \
--num_epochs 20 \
--lr 1e-3Key arguments:
channel: Color channel selection (0:red, 1:green, 2:blue)exp_name: Name for the experimentbatch_size: Training batch sizenum_epochs: Number of training epochslr: Learning rate
To test a trained model:
python main.py \
--channel 1 \
--exp_name test_experiment \
--test True \
--ckpt_path path/to/checkpoint.pthThe network achieves significant reduction in ringing artifacts compared to traditional methods. Sample results can be found in the paper.
If you find this code useful for your research, please cite our paper:
@article{yuan2024error,
title={Error-compensation network for ringing artifact reduction in holographic displays},
author={Yuan, Ganzhangqin and Zhou, Mi and Peng, Yifan and Chen, Muku and Geng, Zihan},
journal={Optics Letters},
volume={49},
number={11},
pages={3210--3213},
year={2024},
publisher={Optica Publishing Group}
}This project is released under the MIT License.
- Neural Holography for the ASM implementation
- CCNN-CGH for CCNN network implementation