Instructions to use scenario-labs/segmentation with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use scenario-labs/segmentation with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoImageProcessor, MaskFormerForInstanceSegmentation processor = AutoImageProcessor.from_pretrained("scenario-labs/segmentation") model = MaskFormerForInstanceSegmentation.from_pretrained("scenario-labs/segmentation", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download preprocessor_config.json from scenario-labs/segmentation: direct link, hf CLI and curl.
- Browser
- Download file 502 Bytes
-
https://huggingface.co/scenario-labs/segmentation/resolve/refs%2Fpr%2F1/preprocessor_config.json
- Command line
-
hf download hf://scenario-labs/segmentation@refs/pr/1/preprocessor_config.json
-
curl -L -o preprocessor_config.json https://huggingface.co/scenario-labs/segmentation/resolve/refs%2Fpr%2F1/preprocessor_config.json
502 Bytes
| { | |
| "_max_size": 2048, | |
| "do_normalize": true, | |
| "do_reduce_labels": false, | |
| "do_rescale": true, | |
| "do_resize": true, | |
| "ignore_index": 255, | |
| "image_mean": [0.48500001430511475, 0.4560000002384186, 0.4059999883174896], | |
| "image_processor_type": "MaskFormerImageProcessor", | |
| "image_std": [0.2290000021457672, 0.2239999920129776, 0.22499999403953552], | |
| "resample": 2, | |
| "rescale_factor": 0.00392156862745098, | |
| "size": { | |
| "longest_edge": 2048, | |
| "shortest_edge": 512 | |
| }, | |
| "size_divisor": 32 | |
| } | |