- CUDA-enabled GPU
- Linux OS (tested on CentOs Linux 7 (Core))
- [mini]conda (tested with miniconda 4.8.4)
Clone and navigate to this repository
git clone [email protected]:kreshuklab/hylfm-net.git
cd hylfm-net
conda env create -f environment.yml
conda activate hylfm
conda develop .
The install time greatly depends on download speed (several hundred MB).
๐ Without download (or very fast download), the installation takes around 9 min.
conda activate hylfm
A cuda device may be selected before running hylfm (default 0), e.g.
export CUDA_VISIBLE_DEVICES=3
- Login/Sign up at https://wandb.ai/login
- Get your api token at https://wandb.ai/authorize (you'll be ask to provide this token on the first hylfm run, specifically on
import wandb
)
python scripts/train_presets/beads.py
๐ Excluding download time, this training configuration runs for approximately 6 hours (on a GTX 2080 Ti). Note that the network will likely not have fully converged; increase max_epochs
to allow for longer training (HyLFM-Net beads used in the paper was trained for 26.5 hours).
To download and test HyLFM-net beads run
python hylfm/tst.py small_beads_demo
๐ Excluding download time, this test configuration runs for approximately 6,5 min in total with 12 s per sample (on a GTX 2080 Ti). Most time is spend on computing metrics.
Data used in paper
Wagner, N., Beuttenmueller, F., et al. Deep learning-enhanced light-field imaging with continuous validation. Nat Methods 18, 557โ563 (2021).
https://doi.org/10.1038/s41592-021-01136-0
beads: https://www.ebi.ac.uk/biostudies/studies/S-BSST622
Medaka heart: https://www.ebi.ac.uk/biostudies/studies/S-BSST604
zebrafish neural activity: https://www.ebi.ac.uk/biostudies/studies/S-BSST633
- Implement a
get_tensor_info
function inhylfm/datasets/local/<your dataset group>.py
analogously tohylfm/datasets/local/example.py
. - Add your
DatasetChoice
(defined in hylfm_types.py) and extentget_dataset_sections
(in datasets/named.py) andget_transforms_pipeline
(in datasets/transform_pipelines.py) analogously toDatasetChoice.beads_highc_a
- Train or test HyLFM-Net as described in Demo.
To overwrite default settings, like the number of worker threads per pytorch Dataloader, adapt hylfm/_settings/local.py
(copy from hylfm/_settings/local.template.py
)