If you use this code, please cite:
Taylor L. Bobrow, Faisal Mahmood, Miguel Inserni, Nicholas J. Durr, “DeepLSR: Deep learning approach for laser speckle reduction" arxiv link
- Linux (Tested on Ubuntu 16.04)
- NVIDIA GPU (Tested on Nvidia P100 using Google Cloud)
- CUDA CuDNN (CPU mode and CUDA without CuDNN may work with minimal modification, but untested)
- Pytorch>=0.4.0
- torchvision>=0.2.1
- dominate>=2.3.1
- visdom>=0.1.8.3
- scipy
The dataset can be downloaded here (7GB).
All image pairs must be 256x256 and paired together in 2048x1024 images. '.png' and '.jpg' files are acceptable. Data needs to be arranged in the following order:
SOMEPATH # Some arbitrary path
└── Datasets # Datasets folder
└── XYZ_Dataset # Active dataset
├── test
└── train
To train a model:
python train.py --dataroot <datapath> --name DeepLSR --gpu_ids 0 --display_id 0
--lambda_L1 70 --niter 200 --niter_decay 200 --pool_size 64 --loadSize 1024 --fineSize 1024
- To view training losses and results, run
python -m visdom.server
and click the URL http://localhost:8097. For cloud servers replace localhost with your IP. - To view epoch-wise intermediate training results,
./checkpoints/DeepLSR/web/index.html
--niter
number of epochs with constant learning rate--niter_decay
number of epochs with linearly decaying learning rate--lr
adjusts the learning rate, default = 0.002
Our pre-trained models can be downloaded here.
To test the model:
python test.py --dataroot <datapath> --name DeepLSR --gpu_ids 0 --display_id 0
--loadSize 1024 --fineSize 1024
- The test results will be saved to a html file here:
./results/DeepLSR/test_latest/index.html
.
- Please open new threads or report issues to faisalm@jhu.edu
- Immidiate response to minor issues may not be available.
© Durr Lab - This project is licensed under the MIT License - see the LICENSE.md file for details
- This code is inspired by pytorch-DCGAN, pytorch-CycleGAN-and-pix2pix and SNGAN-Projection
- Subsidized computing resources were provided by Google Cloud.
If you find our work useful in your research please consider citing our paper:
@inproceedings{bobrow2018deeplsr,
title = {DeepLSR: Deep learning approach for laser speckle reduction},
author = {Taylor L. Bobrow, Faisal Mahmood, Miguel Inserni, Nicholas J. Durr},
booktitle = {arXiv.1810.10039},
year = {2018}
}