HistoGen is an open-source computational pathology toolbox designed to support researchers and regulatory scientists in generating Histopathology cell nuclei images. For more information, please contact: seyed.kahaki@fda.hhs.gov.
Please refer to the steps below for installation and usage instructions.
To set up the HistoGen environment, first clone this repository and navigate to the project directory:
git clone https://github.com/DIDSR/HistoGen.git
cd HistoGenCreate a virtual environment and install dependencies from the provided requirements.txt:
python3 -m venv HistoGen_env
source HistoGen_env/bin/activate
pip install -r requirements.txtTested Environment:
- Linux (Ubuntu 22.04 LTS recommended)
- Python 3.12+
This package needs GPU. Some key dependencies include:
matplotlib==3.10.8
mpi4py==4.1.1
numpy==2.2.6
opencv-contrib-python==4.12.0.88
scikit-image==0.25.2
scikit-learn==1.8.0
scipy==1.16.3
tensorflow==2.20.0
torch==2.9.1
torchvision==0.24.1(See requirements.txt for the full list.)
The model checkpoints are available on Huggingface.
Coarse checkpoint: model150000.pt
Finetuned checkpoint: model290000.pt
Jupyter notebook and scripts provided to quickly familiarize you with the capabilities and usage of HistoGen:
This notebook enables the following:
- Load an instance segmentation mask from a
.matfile - Convert the instance segmentation mask to semantic mask concatenated to horizontal and vertical map, as detailed in the paper HoverNet
- Setup a diffusion model to generate nuclei images from the mask
- Use either a coarse or finetuned diffusion model checkpoint to generate a user specified number of nuclei images.
- Visualize the generated images with mask overlay and outline
- Save the generated images as 8-bit
.pngfiles
For any inquiries, suggestions, or collaborative opportunities, please contact Seyed Kahaki or Tahsin Rahman either via this GitHub repo or via email (seyed.kahaki@fda.hhs.gov or Tahsin.Rahman@fda.hhs.gov).
The enclosed tool is part of the Catalog of Regulatory Science Tools, which provides a peer-reviewed resource for stakeholders to use where standards and qualified Medical Device Development Tools (MDDTs) do not yet exist. These tools do not replace FDA-recognized standards or MDDTs. This catalog collates a variety of regulatory science tools that the FDA’s Center for Devices and Radiological Health’s (CDRH) Office of Science and Engineering Labs (OSEL) developed. These tools use the most innovative science to support medical device development and patient access to safe and effective medical devices. If you are considering using a tool from this catalog in your marketing submissions, note that these tools have not been qualified as Medical Device Development Tools and the FDA has not evaluated the suitability of these tools within any specific context of use. You may request feedback or meetings for medical device submissions as part of the Q-Submission Program. For more information about the Catalog of Regulatory Science Tools, email RST_CDRH@fda.hhs.gov.
• Recommended Citation (will be revised when the tool is posted in the RST catalog):
U.S. Food and Drug Administration. (2026). HistoGen: A Generative AI tool for for Generating Nuclei Images (RSTXXXX.01). https://cdrh-rst.fda.gov/TBD
