flyingwolfz / CCNN-CGH

code for Real-Time High-Quality Computer-Generated Hologram Using Complex-Valued Convolutional Neural Network
Apache License 2.0
24 stars 1 forks source link

CCNN-CGH

capture

Real-time CGH using CCNN (zero-padding version)

Real-time end-to-end CGH network with average PSNR more than 30dB in DIV2K valitaion dataset. Compared with HoloNet and holo-encoder, we achieve the fasted speed and the best quality using compact CCNN. Moreover, CCNN-CGH is a 4K capable network and mini CCNN-CGH is the first 4K real-time network!The following tests run using RTX 3080.

1920 performance

1920

4k performance

4k

paper: https://doi.org/10.1109/tvcg.2023.3239670 (If it's useful, consider cite our paper!)

0. Contents

1. Set up conda environment

conda create -n ccnncgh python=3.9
conda activate ccnncgh
conda install pytorch==1.11.0 torchvision==0.12.0 torchaudio==0.11.0 cudatoolkit=11.3 -c pytorch
pip install opencv-python
pip install tqdm
pip install scipy
pip install scikit-image

The environment has been tested in Windows 10 and Ubuntu 20.04 in 2022.7. We use python 3.9, Pytorch 1.10.

2. Run CCNN-CGH

For better compatibility with complex values, we use complexPyTorch from https://github.com/wavefrontshaping/complexPyTorch. Their new version should also work.

Change the file path in the code.

Run corresponding python files. CCNN uses 4init, mini CCNN uses 2init.

3.Comparision with other networks