Instructions to use mkoohim/PathoGen with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use mkoohim/PathoGen with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("mkoohim/PathoGen", dtype=torch.bfloat16, device_map="cuda") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
fix readme
Browse files
README.md
CHANGED
|
@@ -20,7 +20,6 @@ PathoGen is a diffusion-based model for histopathology image inpainting. It enab
|
|
| 20 |
- **Model Type:** Diffusion model with custom attention processors
|
| 21 |
- **Task:** Image inpainting for histopathology images
|
| 22 |
- **Architecture:** UNet2DConditionModel with custom SkipAttnProcessor
|
| 23 |
-
- **Input Size:** 512x512 pixels
|
| 24 |
- **Framework:** PyTorch, Diffusers, PyTorch Lightning
|
| 25 |
|
| 26 |
## Usage
|
|
@@ -101,19 +100,14 @@ This model is designed for:
|
|
| 101 |
- Research in computational pathology
|
| 102 |
- Data augmentation for pathology AI training
|
| 103 |
|
| 104 |
-
## Limitations
|
| 105 |
-
|
| 106 |
-
- Optimized for 512x512 input images
|
| 107 |
-
- Best results on H&E stained tissue images
|
| 108 |
-
- Requires GPU for reasonable inference speed
|
| 109 |
|
| 110 |
## Citation
|
| 111 |
|
| 112 |
```bibtex
|
| 113 |
-
@misc{
|
| 114 |
-
title={PathoGen:
|
| 115 |
author={mkoohim},
|
| 116 |
-
year={
|
| 117 |
url={https://huggingface.co/mkoohim/PathoGen}
|
| 118 |
}
|
| 119 |
```
|
|
|
|
| 20 |
- **Model Type:** Diffusion model with custom attention processors
|
| 21 |
- **Task:** Image inpainting for histopathology images
|
| 22 |
- **Architecture:** UNet2DConditionModel with custom SkipAttnProcessor
|
|
|
|
| 23 |
- **Framework:** PyTorch, Diffusers, PyTorch Lightning
|
| 24 |
|
| 25 |
## Usage
|
|
|
|
| 100 |
- Research in computational pathology
|
| 101 |
- Data augmentation for pathology AI training
|
| 102 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
|
| 104 |
## Citation
|
| 105 |
|
| 106 |
```bibtex
|
| 107 |
+
@misc{pathogen2025,
|
| 108 |
+
title={PathoGen: Diffusion-Based Synthesis of Realistic Lesions in Histopathology Images},
|
| 109 |
author={mkoohim},
|
| 110 |
+
year={2025},
|
| 111 |
url={https://huggingface.co/mkoohim/PathoGen}
|
| 112 |
}
|
| 113 |
```
|