Skip to content

Melon-Xu/TopoCellGen

Repository files navigation

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

drawing

Environment

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

Generating Cell Layouts

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

Evaluation

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

Qualitative Results

drawing

Topological Fréchet Distance

drawing

Download

Citation

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}
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages