Image Segmentation
Transformers
Safetensors
PyTorch
segformer
medical-imaging
brain-mri
semantic-segmentation
Instructions to use kiselyovd/brain-mri-segmentation with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kiselyovd/brain-mri-segmentation with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-segmentation", model="kiselyovd/brain-mri-segmentation")# pip install -U transformers accelerate # Load model directly from transformers import AutoImageProcessor, SegformerForSemanticSegmentation processor = AutoImageProcessor.from_pretrained("kiselyovd/brain-mri-segmentation") model = SegformerForSemanticSegmentation.from_pretrained("kiselyovd/brain-mri-segmentation", device_map="auto") - Notebooks
- Google Colab
- Kaggle
fix: add id2label/label2id for binary segmentation (background/tumor)
Browse files- config.json +10 -1
config.json
CHANGED
|
@@ -65,5 +65,14 @@
|
|
| 65 |
2,
|
| 66 |
2
|
| 67 |
],
|
| 68 |
-
"transformers_version": "5.5.4"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
}
|
|
|
|
| 65 |
2,
|
| 66 |
2
|
| 67 |
],
|
| 68 |
+
"transformers_version": "5.5.4",
|
| 69 |
+
"num_labels": 2,
|
| 70 |
+
"id2label": {
|
| 71 |
+
"0": "background",
|
| 72 |
+
"1": "tumor"
|
| 73 |
+
},
|
| 74 |
+
"label2id": {
|
| 75 |
+
"background": 0,
|
| 76 |
+
"tumor": 1
|
| 77 |
+
}
|
| 78 |
}
|