- 🧠 brainless gradient descent-based image reconstruction
- 🤓 fully customizable loss functions
- 🫡 auto logging and visualization via tensorboard
- 😬 flexible optimization parameters (variable specific settings, learning rate schedule, etc.)
- 🤯 post-update custom functions
- 🔮 handy helper functions for interactive 3/4D visualization on jupyter notebook
- jax.numpy as a drop-in replacement for numpy, and also jax.scipy for scipy
- Light weight, easy to debug, and functional programming
- Slightly faster than pytorch
- Good reproducibility through explicit PRNG key management
- Less commonly used than pytorch, so less community support
- Pretty barebone, often need other libraries from jax ecosystem
- The development of jax mainly relies on Google which may not be a good thing for some people
Detailed installation instructions can be found here.
# Create a virtual environment
conda create -n calcil python=3.9
conda activate calcil
# (optional, if needed) Install CUDA in conda virtual env
conda install -c conda-forge cudatoolkit~=11.8.0 cudnn~=8.8.0
conda install -c "nvidia/label/cuda-11.8.0" cuda-nvcc
# Install jaxlib for GPU
pip install jaxlib==0.3.18+cuda11.cudnn82 -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
# Install this library
pip install git+https://github.com/rmcao/CalCIL.git
A step-by-step tutorial on how to use CalCIL for image reconstruction can be found here. Also, check out the example notebook for image deconvolution.
The following work is powered by CalCIL:
- Dynamic speckle structured illumination microscopy
- Neural space-time model, code repo
- Space-Time DiffuserCam Video Reconstruction
If you find this library useful, please consider citing the following papers:
@inproceedings{cao2022dynamic,
title={Dynamic structured illumination microscopy with a neural space-time model},
author={Cao, Ruiming and Liu, Fanglin Linda and Yeh, Li-Hao and Waller, Laura},
booktitle={2022 IEEE International Conference on Computational Photography (ICCP)},
pages={1--12},
year={2022},
organization={IEEE}
}
@article{cao2024neural,
title={Neural space-time model for dynamic scene recovery in multi-shot computational imaging systems},
author={Cao, Ruiming and Divekar, Nikita and Nu{\~n}ez, James and Upadhyayula, Srigokul and Waller, Laura},
journal={bioRxiv 2024.01.16.575950},
pages={2024--01},
year={2024},
publisher={Cold Spring Harbor Laboratory}
}