--- title: NV-Generate Synthetic Medical Imaging emoji: 🧠 colorFrom: green colorTo: indigo sdk: gradio sdk_version: "6.14.0" app_file: app.py python_version: "3.11" pinned: true license: other license_name: nvidia-open-model-license license_link: https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-open-model-license/ short_description: Synthetic 3D CT and MR generation with NVIDIA NV-Generate. --- # NV-Generate · Synthetic Medical Imaging A unified Hugging Face Spaces demo for NVIDIA Medtech's three open-weight 3D medical image generators, all built on the MAISI-v2 rectified-flow architecture (~30 inference steps each). | Model | Modality | Output | Weights | |---|---|---|---| | **NV-Generate · CT** | Computed Tomography | Image + paired 132-class anatomy mask | [nvidia/NV-Generate-CT](https://huggingface.co/nvidia/NV-Generate-CT) | | **NV-Generate · MR** | MR (multi-contrast, multi-anatomy) | Image only | [nvidia/NV-Generate-MR](https://huggingface.co/nvidia/NV-Generate-MR) | | **NV-Generate · MR Brain** | Brain MR (T1 / T2 / FLAIR / SWI) | Image only | [nvidia/NV-Generate-MR-Brain](https://huggingface.co/nvidia/NV-Generate-MR-Brain) | ## Features - Hero card landing → per-model workspace. - niivue WebGL multiplanar viewer (axial / coronal / sagittal + 3D render). - Paired 132-class anatomy mask overlay for CT (with deterministic per-label colormap + named legend). - Window/Level presets (Soft Tissue / Lung / Bone / Brain) on the CT viewer. - Direct NIfTI download of every generated volume + mask. - ZeroGPU support for HF Spaces (`@spaces.GPU` decorator). ## Local development ```bash pip install -r requirements.txt pip install -r repos/NV-Generate-CTMR/requirements.txt python app.py # http://localhost:7860 ``` `app.py` auto-clones the upstream `NV-Generate-CTMR` inference repo into `./repos/` on first run (no separate `pre-build.sh` needed). Weights are downloaded lazily from the Hugging Face Hub the first time each model is exercised, then cached. ## Hugging Face Spaces deployment Recommended hardware: **ZeroGPU** (A10G or H100), since each model needs ~16–80 GB VRAM depending on volume size. 1. Create a new Space on huggingface.co with `sdk: gradio` (already set in this README's frontmatter). 2. Push this repository: ```bash git remote add space https://huggingface.co/spaces//nv-generate git push space main ``` 3. In the Space's **Settings → Hardware**, select **ZeroGPU**. 4. First build will install dependencies + clone the upstream repo. First generation on each model downloads weights into a persistent cache. ## License | Component | License | |---|---| | This repo (Gradio glue) | Apache 2.0 | | Upstream `NV-Generate-CTMR` source | Apache 2.0 | | `NV-Generate-CT` weights | [NVIDIA Open Model License](https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-open-model-license/) | | `NV-Generate-MR` weights | [**NVIDIA OneWay Non-Commercial License**](https://developer.download.nvidia.com/licenses/NVIDIA-OneWay-Noncommercial-License-22Mar2022.pdf) — academic / research use only | | `NV-Generate-MR-Brain` weights | [NVIDIA Open Model License](https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-open-model-license/) | **Not for clinical diagnostics.** This is a research demo for synthetic data generation only. ## Credits Built on the MAISI framework: - **MAISI-v1** — [WACV 2025 paper](https://arxiv.org/abs/2409.11169) - **MAISI-v2** — [AAAI 2026 paper](https://arxiv.org/abs/2508.05772) NVIDIA Medtech, University of Zurich, Istanbul Medipol, Forithmus.