Code to train self-supervised adversarial autoencoder for visual field expansion of histopathology tiles [1].
main.py
contains training code.src/models.py
defines GAN generator and discriminators.src/utils.py
defines utility functions for training and graphing.config/
defines .yml
configuration files to set experiment parameters. The Anaconda environment is specified in environment.yml
. The environment can be recreated using,
conda env create -f environment.yml
Tested with single NVIDIA P100 GPU, running Cuda 10.0.130, and PyTorch 1.9.0 with torchvision 0.10.0.
main.py
is the training code, which requires two parameters
job_number
specifies a unique identifier for writing outputsconfig
specifies configuration file pathSee slurm_submit.sh
for example.
See config/README.md for a description of configuration options.
See data/README.md for data procurement instructions.
[1] Self-Supervised Representation Learning using Visual Field Expansion on Digital Pathology, Joseph Boyd, Mykola Liashuha, Eric Deutsch, Nikos Paragios, Stergios Christodoulidis, Maria Vakalopoulou, CDpath ICCV 2021 [PDF]
Decoder can be trained with coordinates of crop input to control position of reconstruction. See coordinates branch for code.