Run this model with HF Jobs
Run SpotLab/MobileViT_DeepLabv3 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/SpotLab/MobileViT_DeepLabv3. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/SpotLab/MobileViT_DeepLabv3 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use SpotLab/MobileViT_DeepLabv3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SpotLab/MobileViT_DeepLabv3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-segmentation", model="SpotLab/MobileViT_DeepLabv3")# pip install -U transformers accelerate # Load model directly from transformers import AutoImageProcessor, MobileViTForSemanticSegmentation processor = AutoImageProcessor.from_pretrained("SpotLab/MobileViT_DeepLabv3") model = MobileViTForSemanticSegmentation.from_pretrained("SpotLab/MobileViT_DeepLabv3", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Jaime García Villena commited on
Commit ·
7822a12
1
Parent(s): 3627736
Add files for extra small
Browse filesFiles changed (7)
12323version https://git-lfs.github.com/spec/v1oid sha256:e50a89dd6be1e3ba7e4df23be4f2d79a081d443c1e498536377d30b8e5fb3a29size 25418432oid sha256:836d1d6b55ee4dabf7cc8fde30c61f3a2e2a4fe770bab04dd4ac4d738dd74d48size 742118412344567891010111213141516171718{ "fileFormatVersion": "1.0.0", "itemInfoEntries": { "4D7D9A73-AEEC-412D-A20C-7AA2C0F806EF": { "5D3AF255-5F4D-4EE3-BC12-3B38690DA1DE": { "author": "com.apple.CoreML", "description": "CoreML Model Specification", "name": "model.mlmodel", "path": "com.apple.CoreML/model.mlmodel" }, "FBABE180-594F-4894-9881-F3B3D807D27D": { "871A3834-A719-4108-9576-7E776094437D": { "author": "com.apple.CoreML", "description": "CoreML Model Weights", "name": "weights", "path": "com.apple.CoreML/weights" } }, "rootModelIdentifier": "4D7D9A73-AEEC-412D-A20C-7AA2C0F806EF" "rootModelIdentifier": "5D3AF255-5F4D-4EE3-BC12-3B38690DA1DE"}9 unmodified lines101112131314151621 unmodified lines3839404142414243444522 unmodified lines686970717273747571727374757677789 unmodified lines example_title: Cat---
# MobileViT + DeepLabV3 (small-sized model)# MobileViT + DeepLabV3 (extra extra small-sized model)
MobileViT model pre-trained on PASCAL VOC at resolution 512x512. It was introduced in [MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer](https://arxiv.org/abs/2110.02178) by Sachin Mehta and Mohammad Rastegari, and first released in [this repository](https://github.com/apple/ml-cvnets). The license used is [Apple sample code license](https://github.com/apple/ml-cvnets/blob/main/LICENSE).
21 unmodified linesurl = "http://images.cocodataset.org/val2017/000000039769.jpg"image = Image.open(requests.get(url, stream=True).raw)
feature_extractor = MobileViTFeatureExtractor.from_pretrained("apple/deeplabv3-mobilevit-small")model = MobileViTForSemanticSegmentation.from_pretrained("apple/deeplabv3-mobilevit-small")feature_extractor = MobileViTFeatureExtractor.from_pretrained("apple/deeplabv3-mobilevit-xx-small")model = MobileViTForSemanticSegmentation.from_pretrained("apple/deeplabv3-mobilevit-xx-small")
inputs = feature_extractor(images=image, return_tensors="pt")
22 unmodified lines
## Evaluation results
| Model | PASCAL VOC mIOU | # params | URL ||------------------|-----------------|-----------|-----------------------------------------------------------|| MobileViT-XXS | 73.6 | 1.9 M | https://huggingface.co/apple/deeplabv3-mobilevit-xx-small || MobileViT-XS | 77.1 | 2.9 M | https://huggingface.co/apple/deeplabv3-mobilevit-x-small || **MobileViT-S** | **79.1** | **6.4 M** | https://huggingface.co/apple/deeplabv3-mobilevit-small || Model | PASCAL VOC mIOU | # params | URL ||-------------------|-----------------|-----------|-----------------------------------------------------------|| **MobileViT-XXS** | **73.6** | **1.9 M** | https://huggingface.co/apple/deeplabv3-mobilevit-xx-small || MobileViT-XS | 77.1 | 2.9 M | https://huggingface.co/apple/deeplabv3-mobilevit-x-small || MobileViT-S | 79.1 | 6.4 M | https://huggingface.co/apple/deeplabv3-mobilevit-small |
### BibTeX entry and citation info
11 unmodified lines12131415151617171819202119202122232448 unmodified lines737475767677787978798081808182838411 unmodified lines "attention_probs_dropout_prob": 0.0, "classifier_dropout_prob": 0.1, "conv_kernel_size": 3, "expand_ratio": 4.0, "expand_ratio": 2.0, "hidden_act": "silu", "hidden_dropout_prob": 0.1, "hidden_dropout_prob": 0.05, "hidden_sizes": [ 144, 192, 240 64, 80, 96 ], "id2label": { "0": "background",48 unmodified lines "model_type": "mobilevit", "neck_hidden_sizes": [ 16, 32, 16, 24, 48, 64, 96, 128, 160, 640 80, 320 ], "num_attention_heads": 4, "num_channels": 3,12323version https://git-lfs.github.com/spec/v1oid sha256:5e68a534df237d8b89aa9209c815976b4b34f49a4e8107f630fd799697e98291size 25615631oid sha256:0f91dba8e66cf725cc0cd987b9bf47b0e95788bf4050032d55de23217d5ffa60size 757275112323version https://git-lfs.github.com/spec/v1oid sha256:5e14ab532bd4b573c60e4f4c6639de6176db4c35c803cc7c0ba05fdb16e5b3desize 25943848oid sha256:feec578f1413c5f2a9c759d488bc95548b9741a370ed408b2b0f8f5a921394eesize 7898720MobileViT_DeepLabV3.mlpackage/Data/com.apple.CoreML/model.mlmodel
MobileViT_DeepLabV3.mlpackage/Data/com.apple.CoreML/weights/weight.bin+2-2
MobileViT_DeepLabV3.mlpackage/Manifest.json+3-3
README.md+8-8
config.json+10-10
pytorch_model.bin+2-2
tf_model.h5+2-2