Update README.md
Browse files
README.md
CHANGED
|
@@ -12,42 +12,37 @@ tags:
|
|
| 12 |
- characterization
|
| 13 |
---
|
| 14 |
|
| 15 |
-
#
|
| 16 |
|
| 17 |
<!-- Provide a quick summary of what the model is/does. -->
|
| 18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
|
|
|
| 20 |
|
| 21 |
-
##
|
| 22 |
-
|
| 23 |
-
### Model Description
|
| 24 |
-
|
| 25 |
-
<!-- Provide a longer summary of what this model is. -->
|
| 26 |
-
|
| 27 |
-
This is the model card of a 🧨 diffusers model that has been pushed on the Hub. This model card has been automatically generated.
|
| 28 |
-
|
| 29 |
-
- **Developed by:** [More Information Needed]
|
| 30 |
-
- **Funded by [optional]:** [More Information Needed]
|
| 31 |
-
- **Shared by [optional]:** [More Information Needed]
|
| 32 |
-
- **Model type:** [More Information Needed]
|
| 33 |
-
- **Language(s) (NLP):** [More Information Needed]
|
| 34 |
-
- **License:** [More Information Needed]
|
| 35 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
| 36 |
-
|
| 37 |
-
### Model Sources [optional]
|
| 38 |
-
|
| 39 |
-
<!-- Provide the basic links for the model. -->
|
| 40 |
-
|
| 41 |
-
- **Repository:** [More Information Needed]
|
| 42 |
-
- **Paper [optional]:** [More Information Needed]
|
| 43 |
-
- **Demo [optional]:** [More Information Needed]
|
| 44 |
|
| 45 |
-
##
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
-
|
|
|
|
|
|
|
|
|
|
| 48 |
|
| 49 |
-
#
|
|
|
|
| 50 |
|
| 51 |
-
|
|
|
|
| 52 |
|
| 53 |
-
|
|
|
|
|
|
|
|
|
| 12 |
- characterization
|
| 13 |
---
|
| 14 |
|
| 15 |
+
# UniEM-Gen
|
| 16 |
|
| 17 |
<!-- Provide a quick summary of what the model is/does. -->
|
| 18 |
|
| 19 |
+
## 📘 Model Summary
|
| 20 |
+
This is the text-to-image diffusion model trained on the complete **[UniEM-3M](https://huggingface.co/datasets/NNNan/UniEM-3M)** dataset.
|
| 21 |
+
It is designed for **electron microscopy (EM)-style image generation**, enabling:
|
| 22 |
+
- Scientific data augmentation
|
| 23 |
+
- Proxy generation for microstructural distributions
|
| 24 |
+
- Multimodal research in materials science
|
| 25 |
|
| 26 |
+
---
|
| 27 |
|
| 28 |
+
## 🚀 Usage Example
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
+
### Using `diffusers`
|
| 31 |
+
```python
|
| 32 |
+
from diffusers import StableDiffusionPipeline
|
| 33 |
+
import torch
|
| 34 |
|
| 35 |
+
# Load model from Hugging Face
|
| 36 |
+
model_id = "NNNan/UniEM-Gen"
|
| 37 |
+
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
|
| 38 |
+
pipe = pipe.to("cuda")
|
| 39 |
|
| 40 |
+
# Example prompt
|
| 41 |
+
prompt = "High-resolution electron micrograph of nanoparticles with spherical morphology, high contrast"
|
| 42 |
|
| 43 |
+
# Generate image
|
| 44 |
+
image = pipe(prompt).images[0]
|
| 45 |
|
| 46 |
+
# Save or display
|
| 47 |
+
image.save("generated_em.png")
|
| 48 |
+
image.show()
|