Image Segmentation
Transformers
Safetensors
cond_unet
ultrasound
medical-image-segmentation
attention-unet
custom-pipeline
custom_code
Instructions to use AImageLab-Zip/US_Cond-UNet with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AImageLab-Zip/US_Cond-UNet with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-segmentation", model="AImageLab-Zip/US_Cond-UNet", trust_remote_code=True)# Load model directly from transformers import AutoModelForImageSegmentation model = AutoModelForImageSegmentation.from_pretrained("AImageLab-Zip/US_Cond-UNet", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -54,9 +54,22 @@ result = segmenter("ultrasound.png", organ_id=3)
|
|
| 54 |
If `organ_id` is not provided, the model automatically uses `-1`, matching the
|
| 55 |
unknown-organ conditioning used in training.
|
| 56 |
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
|
| 61 |
## Output
|
| 62 |
|
|
|
|
| 54 |
If `organ_id` is not provided, the model automatically uses `-1`, matching the
|
| 55 |
unknown-organ conditioning used in training.
|
| 56 |
|
| 57 |
+
Use the following IDs when organ metadata is available:
|
| 58 |
+
|
| 59 |
+
| Organ | `organ_id` |
|
| 60 |
+
| --- | --- |
|
| 61 |
+
| Appendix | `0` |
|
| 62 |
+
| Breast | `1` |
|
| 63 |
+
| Cardiac | `2` |
|
| 64 |
+
| Thyroid | `3` |
|
| 65 |
+
| Fetal / Fetal HC | `4` |
|
| 66 |
+
| Kidney | `5` |
|
| 67 |
+
| Liver | `6` |
|
| 68 |
+
| Testicle | `7` |
|
| 69 |
+
| Unknown | `-1` |
|
| 70 |
+
|
| 71 |
+
To reproduce the original evaluation pipeline for a Fetal HC image, use
|
| 72 |
+
`organ_id=4`.
|
| 73 |
|
| 74 |
## Output
|
| 75 |
|