Instructions to use onkarsus13/Semantic-Control-Stable-diffusion-3-M-Mask2CT-Atlas with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use onkarsus13/Semantic-Control-Stable-diffusion-3-M-Mask2CT-Atlas 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("onkarsus13/Semantic-Control-Stable-diffusion-3-M-Mask2CT-Atlas", 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
Update README.md
Browse files
README.md
CHANGED
|
@@ -7,12 +7,9 @@ pipeline_tag: image-to-image
|
|
| 7 |
tags:
|
| 8 |
- medical
|
| 9 |
---
|
| 10 |
-
This
|
| 11 |
-
We build this models research purpose only.
|
| 12 |
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
For Pretraining we used Atlas Dataset From John Hopkins
|
| 16 |
|
| 17 |
```
|
| 18 |
Training Details
|
|
@@ -25,7 +22,7 @@ Computes:
|
|
| 25 |
|
| 26 |
Code for generation:
|
| 27 |
|
| 28 |
-
```
|
| 29 |
from diffusers import StableDiffusion3ControlNetPipeline, SD3ControlNetModel, UniPCMultistepScheduler, LDMSuperResolutionPipeline
|
| 30 |
import torch
|
| 31 |
from PIL import Image
|
|
|
|
| 7 |
tags:
|
| 8 |
- medical
|
| 9 |
---
|
| 10 |
+
This repository contains a model specifically designed for synthetic data generation of 2D CT-scans, intended solely for research purposes. The base model we employed is Stable-Diffusion-Medium, which has been enhanced using ControlNet, a technique for exerting more precise control over the image generation process.
|
|
|
|
| 11 |
|
| 12 |
+
For pretraining, we utilized the Atlas Dataset from Johns Hopkins University. This dataset provided a comprehensive range of medical imaging data, crucial for the initial training phase of our model. Our aim with this project is to contribute to the medical imaging field by enabling more robust and versatile synthetic data generation.
|
|
|
|
|
|
|
| 13 |
|
| 14 |
```
|
| 15 |
Training Details
|
|
|
|
| 22 |
|
| 23 |
Code for generation:
|
| 24 |
|
| 25 |
+
```python
|
| 26 |
from diffusers import StableDiffusion3ControlNetPipeline, SD3ControlNetModel, UniPCMultistepScheduler, LDMSuperResolutionPipeline
|
| 27 |
import torch
|
| 28 |
from PIL import Image
|