ONNX Model Zoo

gifty-so/shoppy-mobilesam

By gifty-so · ↓ 2 · ♥ 0 · Updated 2025-11-07

What's in this repo

This page lists the files in gifty-so/shoppy-mobilesam, including mobile_sam.onnx, mobile_sam_decoder.onnx, mobile_sam_encoder.onnx.

  • 3 ONNX models (.onnx files)
  • 8 files, including 3 .onnx, 2 .data, 1 .md, 1 .pte
  • Repository size ~143 MB
  • Last updated 2025-11-07

ONNX files

File Size Download
mobile_sam.onnx 45.9 MB Download
mobile_sam_decoder.onnx — Download
mobile_sam_encoder.onnx 988 KB Download

How to use

These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.

README

MobileSAM ONNX Models

MobileSAM models in ONNX format for on-device mobile inference.

Files

  • mobile_sam_encoder.onnx + .onnx.data - Image encoder (27MB)
  • mobile_sam_decoder.onnx + .onnx.data - Mask decoder (23MB)

Usage

These models are designed for React Native applications using onnxruntime-react-native.

Model URLs

const ENCODER_MODEL_URL = 'https://huggingface.co/gifty-so/shoppy-mobilesam/resolve/main/mobile_sam_encoder.onnx';
const DECODER_MODEL_URL = 'https://huggingface.co/gifty-so/shoppy-mobilesam/resolve/main/mobile_sam_decoder.onnx';

Input Format

Encoder:

  • Input: input (float32, shape: [1, 3, 1024, 1024])
    • ImageNet normalized RGB image
  • Output: image_embeddings (float32, shape: [1, 256, 64, 64])

Decoder:

  • Inputs:
    • image_embeddings (from encoder)
    • point_coords (float32, shape: [1, N, 2]) - Point coordinates normalized to [0, 1024]
    • point_labels (float32, shape: [1, N]) - 1 for positive, 0 for negative
    • mask_input (float32, shape: [1, 1, 256, 256]) - Previous mask or zeros
    • has_mask_input (float32, shape: [1]) - 0 or 1
    • orig_im_size (float32, shape: [2]) - Original image dimensions
  • Outputs:
    • masks (float32) - Segmentation masks
    • iou_predictions (float32) - Confidence scores

License

Apache 2.0

Citation

MobileSAM: https://github.com/ChaoningZhang/MobileSAM

Model info

onnx computer-vision image-segmentation mobile-sam license:apache-2.0 region:us
↓ 2 ♥ 0

Created: 2025-11-07

Updated: 2025-11-07

View on Hugging Face

Files (8)

.gitattributes
README.md
mobile_sam.onnx 45.9 MB ONNX
mobile_sam.pte
mobile_sam_decoder.onnx ONNX
mobile_sam_decoder.onnx.data
mobile_sam_encoder.onnx 988 KB ONNX
mobile_sam_encoder.onnx.data

Related models