Meilong Xu1, Saumya Gupta1, Xiaoling Hu2, Chen Li1, Shahira Abousamra3,
Dimitris Samaras1, Prateek Prasanna1, Chao Chen1
1Stony Brook University, NY, USA
2Harvard Medical School and Massachusetts General Hospital, MA, USA
3Department of Biomedical Data Science, Stanford University, CA, USA
Training and evaluation environment: Python 3.8.19, Pytorch 1.11.0, CUDA 11.3. Please run the following command to install required packages.
conda create -n topocellgen python=3.8
conda activate topocellgen
git clone https://github.com/Melon-Xu/TopoCellGen.git
cd /path/to/TopoCellGen
pip install -r requirements.txt
Use the following code to generate synthetic cell layouts for the BRCA-M2C testset:
python3 generate_layout_brca.py
After running it, the results are structured as follows:
/path/to/results/%Y-%M-%D/%H-%M-%S
img/
npy/
cell_counts.json
For the evaluation, you need to firstly set the paths to the reference and synthetic layouts, and then run:
cd /path/to/TopoCellGen/evaluate
python3 evaluate_BRCA.py
For the TopoFD evaluation, you can run:
python3 eval_TopoFD.py
- TopoCellGen pre-trained weights: Google Drive
- BRCA-M2C dataset: You can assess the data from official website.
- Lizard dataset: You can assess the data from official website
If you found this work useful, please consider citing our paper:
@inproceedings{xu2024topocellgen,
title={TopoCellGen: Generating Histopathology Cell Topology with a Diffusion Model},
author={Xu, Meilong and Gupta, Saumya and Hu, Xiaoling and Li, Chen and Abousamra, Shahira and Samaras, Dimitris and Prasanna, Prateek and Chen, Chao},
booktitle={IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
year={2025}
}