This repository contains the official implementation of https://www.sciencedirect.com/science/article/pii/S1361841523002554. Please follow the instructions given below to setup the environment and execute the code. The code is developed and tested on Windows 10 with Python 3.6 and PyTorch 1.10
The semantic masks for the experiment can be collected by running the scripts inside ./preprocessing/ directory. From the home directory, type cd preprocessing. To construct masks for CoNiC dataset, run ./conic/collect_masks.py. Fill the respective paths for variables labelspath and outfolder. For PanNuke, run ./pannuke/collect_masks.py. Place paths to maskspath, typespath and output folder.
Please place the paths and values for respective variables in parser and run the following command for training the framework:
python main.py
To generate images from predefined cellular layouts from datasets,
run python main.py --mode test
To generate images from cellular layouts generated by the TheCoT framework,
run python main.py --mode thecot
If you find SynCLay useful or use it in your research, please consider citing our paper:
@article{Deshpande2024,
title = {SynCLay: Interactive synthesis of histology images from bespoke cellular layouts},
volume = {91},
ISSN = {1361-8415},
url = {http://dx.doi.org/10.1016/j.media.2023.102995},
DOI = {10.1016/j.media.2023.102995},
journal = {Medical Image Analysis},
publisher = {Elsevier BV},
author = {Deshpande, Srijay and Dawood, Muhammad and Minhas, Fayyaz and Rajpoot, Nasir},
year = {2024},
month = jan,
pages = {102995}
}