Instructions to use facebook/maskformer-swin-tiny-ade with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use facebook/maskformer-swin-tiny-ade with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-segmentation", model="facebook/maskformer-swin-tiny-ade")# Load model directly from transformers import AutoImageProcessor, MaskFormerForInstanceSegmentation processor = AutoImageProcessor.from_pretrained("facebook/maskformer-swin-tiny-ade") model = MaskFormerForInstanceSegmentation.from_pretrained("facebook/maskformer-swin-tiny-ade", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -51,6 +51,7 @@ class_queries_logits = outputs.class_queries_logits
|
|
| 51 |
masks_queries_logits = outputs.masks_queries_logits
|
| 52 |
|
| 53 |
# you can pass them to feature_extractor for postprocessing
|
|
|
|
| 54 |
predicted_semantic_map = feature_extractor.post_process_semantic_segmentation(outputs, target_sizes=[image.size[::-1]])[0]
|
| 55 |
```
|
| 56 |
|
|
|
|
| 51 |
masks_queries_logits = outputs.masks_queries_logits
|
| 52 |
|
| 53 |
# you can pass them to feature_extractor for postprocessing
|
| 54 |
+
# we refer to the demo notebooks for visualization (see "Resources" section in the MaskFormer docs)
|
| 55 |
predicted_semantic_map = feature_extractor.post_process_semantic_segmentation(outputs, target_sizes=[image.size[::-1]])[0]
|
| 56 |
```
|
| 57 |
|