ONNX Model Zoo

vlad-m-dev/mobilenetv2_doc_photo_quant

By vlad-m-dev · ↓ 0 · ♥ 1 · Updated 2025-06-15

What's in this repo

This page lists the files in vlad-m-dev/mobilenetv2_doc_photo_quant, including mobilenetv2_doc_photo.onnx, mobilenetv2_doc_photo_quant.onnx.

  • 2 ONNX models (.onnx files)
  • 4 files, including 2 .onnx, 1 .md
  • Last updated 2025-06-15

ONNX files

File Size Download
mobilenetv2_doc_photo.onnx — Download
mobilenetv2_doc_photo_quant.onnx — 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

MobileNetV2 — ONNX, Quantized

🔥 Lightweight mobile model for image classification into two categories:

  • document (scans, receipts, papers, invoices)
  • photo (regular phone photos: scenes, people, nature, etc.)

🟢 Overview

  • Designed for mobile devices (phones and tablets, Android/iOS), perfect for real-time on-device inference!
  • Architecture: MobileNetV2
  • Format: ONNX (both float32 and quantized int8 versions included)
  • Trained on balanced, real-world open-source datasets for both documents and photos.
  • Ideal for tasks like:
    • Document detection in gallery/camera rolls
    • Screenshot, receipt, photo, and PDF preview classification
    • Image sorting for privacy-first offline AI assistants

🏷️ Model Classes

  • 0 — document
  • 1 — photo

⚡️ Versions

  • mobilenetv2_doc_photo.onnx — Standard float32 for maximum accuracy (best for ARM/CPU)
  • mobilenetv2_doc_photo_quant.onnx — Quantized int8 for even faster inference and smaller file size (best for low-power or edge devices)

🚀 Why this model?

  • Ultra-small size (~10-15MB), real-time inference (<100ms) on most phones
  • Runs 100% offline (privacy, no cloud required)
  • Easy integration with any framework, including React Native (onnxruntime-react-native), Android (ONNX Runtime), and iOS.

🗃️ Datasets


🤖 Author

@vlad-m-dev Built for edge-ai/phone/tablet offline image classification: document vs photo Telegram: https://t.me/dwight_schrute_engineer


🛠️ Usage Example

import onnxruntime as ort
import numpy as np

session = ort.InferenceSession("mobilenetv2_doc_photo_quant.onnx")
img = np.random.randn(1, 3, 224, 224).astype(np.float32)  # Replace with your image preprocessing!
output = session.run(None, {"input": img})
pred_class = np.argmax(output[0])
print(pred_class)  # 0 = document, 1 = photo```

Model info

onnx image-classification mobile tablet quantization mobilenetv2 mobilenet_v2 mobilenetv2_onnx document-classification photo-classification real-time lightweight
↓ 0 ♥ 1

Created: 2025-06-15

Updated: 2025-06-15

View on Hugging Face

Files (4)

.gitattributes
README.md
mobilenetv2_doc_photo.onnx ONNX
mobilenetv2_doc_photo_quant.onnx ONNX

Related models