Skip to main content

A collection of pre-quantized AI models for Mobilint NPUs.

Project description

Mobilint Model Zoo

mblt-model-zoo is a curated collection of AI models optimized by Mobilint’s Neural Processing Units (NPUs).

Designed to help developers accelerate deployment, Mobilint's Model Zoo offers access to public, pre-trained, and pre-quantized models for vision, language, and multimodal tasks. Along with performance results, we provide pre- and post-processing tools to help developers evaluate, fine-tune, and integrate the models with ease.

Installation

  • Install Mobilint ACCELerator(MACCEL) on your environment. In case you are not Mobilint customer, please contact us.
  • Install mblt-model-zoo using pip:
pip install mblt-model-zoo
  • If you want to install the latest version from the source, clone the repository and install it:
git clone https://github.com/mobilint/mblt-model-zoo.git
cd mblt-model-zoo
pip install -e .

Quick Start Guide

Initializing Quantized Model Class

mblt-model-zoo provides a quantized model with associated pre- and post-processing tools. The following code snippet shows how to use the pre-trained model for inference.

from mblt_model_zoo.vision import ResNet50

# Load the pre-trained model. 
# Automatically download the model if not found in the local cache.
resnet50 = ResNet50() 

# Load the model trained with different recipe
# Currently, default is "DEFAULT", or "IMAGENET1K_V1
resnet50 = ResNet50(model_type = "IMAGENET1K_V2")

# Download the model to local directory and load it
resnet50 = ResNet50(local_path = "path/to/local/") # the file will be downloaded to "path/to/local/model.mxq"

# Load the model from a local path or download as filename and file path you want
resnet50 = ResNet50(local_path = "path/to/local/model.mxq")

Working with Quantized Model

With the image given as path, PIL image, numpy array, or torch tensor, you can perform inference with the quantized model. The following code snippet shows how to use the quantized model for inference:

image_path = "path/to/image.jpg"

input_img = resnet50.preprocess(image_path) # Preprocess the input image
output = resnet50(input_img) # Perform inference with the quantized model
result = resnet50.postprocess(output) # Postprocess the output

result.plot(
    source_path=image_path,
    save_path="path/to/save/result.jpg",
)

Listing Available Models

mblt-model-zoo offers a function to list all available models. You can use the following code snippet to list the models for a specific task (e.g., image classification, object detection, etc.):

from mblt_model_zoo.vision import list_models
from pprint import pprint

available_models = list_models()
pprint(available_models)

Model List

The following tables summarize the models available in mblt-model-zoo. We provide the models that are quantized with our advanced quantization techniques.

Image Classification (ImageNet)

Model Input Size
(H, W, C)
Top1 Acc
(NPU)
Top1 Acc
(GPU)
Ops (G) MACs Source
alexnet (224,224,3) 56.01 56.56 1.42 0.71 Link
densenet121 (224,224,3) 73.86 74.44 5.70 2.85 Link
densenet161 (224,224,3) 76.69 77.11 15.52 7.76 Link
densenet169 (224,224,3) 74.90 75.61 6.76 3.38 Link
densenet201 (224,224,3) 76.30 76.89 8.64 4.32 Link
efficientnet_b1 (240,240,3) 77.22 78.60 1.39 0.69 Link
mnasnet0_5 (224,224,3) 67.01 67.73 0.20 0.10 Link
mnasnet0_75 (224,224,3) 70.42 71.18 0.43 0.21 Link
mnasnet1_0 (224,224,3) 73.06 73.47 0.62 0.31 Link
mobilenet_v1 (224,224,3) 72.35 70.60 1.14 0.57 Link
mobilenet_v2 (224,224,3) 72.85 71.87 0.60 0.30 Link
regnet_x_16gf (224,224,3) 79.83 80.06 31.88 15.94 Link
regnet_x_1_6gf (224,224,3) 76.84 77.05 3.20 1.60 Link
regnet_x_32gf (224,224,3) 80.46 80.61 63.47 31.73 Link
regnet_x_3_2gf (224,224,3) 78.10 78.36 6.35 3.17 Link
regnet_x_400mf (224,224,3) 72.37 72.83 0.82 0.41 Link
regnet_x_800mf (224,224,3) 74.94 75.22 1.60 0.80 Link
regnet_x_8gf (224,224,3) 79.21 79.34 15.99 7.99 Link
resnet18 (224,224,3) 69.54 69.75 3.63 1.81 Link
resnet34 (224,224,3) 73.08 73.30 7.33 3.66 Link
resnet50_v1 (224,224,3) 75.92 76.13 8.18 4.09 Link
resnet50_v2 (224,224,3) 80.25 80.86 8.18 4.09 Link
resnet101 (224,224,3) 77.06 77.37 15.60 7.80 Link
resnet152 (224,224,3) 77.82 78.31 23.04 11.52 Link
resnext50_32x4d (224,224,3) 77.48 77.61 8.46 4.23 Link
resnext101_32x8d (224,224,3) 79.01 79.31 32.83 16.41 Link
resnext101_64x4d (224,224,3) 82.77 83.25 30.92 15.46 Link
shufflenet_v2_x1_0 (224,224,3) 68.74 69.36 0.62 0.31 Link
shufflenet_v2_x1_5 (224,224,3) 72.41 72.98 1.36 0.68 Link
shufflenet_v2_x2_0 (224,224,3) 75.38 76.23 2.65 1.32 Link
vgg11 (224,224,3) 68.82 69.04 15.22 7.61 Link
vgg11_bn (224,224,3) 70.02 70.37 15.22 7.61 Link
vgg13 (224,224,3) 69.65 69.93 22.62 11.31 Link
vgg13_bn (224,224,3) 71.25 71.59 22.62 11.31 Link
vgg16 (224,224,3) 71.41 71.59 30.94 15.47 Link
vgg16_bn (224,224,3) 73.18 73.36 30.94 15.47 Link
vgg19 (224,224,3) 72.27 72.38 39.26 19.63 Link
vgg19_bn (224,224,3) 73.90 74.22 39.26 19.63 Link

Object Detection (COCO)

Model Input Size
(H, W, C)
mAP
(NPU)
mAP
(GPU)
Ops (G) MACs Source
yolov7 (640,640,3) 50.13 51.14 104.66 52.33 Link
yolov8s (640,640,3) 44.07 44.95 28.64 14.32 Link
yolov8m (640,640,3) 49.68 50.22 79.00 39.50 Link
yolov8l (640,640,3) 52.31 52.75 165.24 82.62 Link
yolov8x (640,640,3) 53.37 53.90 257.92 128.96 Link
yolov9m (640,640,3) 50.65 51.40 76.95 38.47 Link
yolov9c (640,640,3) 52.16 52.68 102.86 51.43 Link

Instance Segmentation (COCO)

Model Input Size
(H, W, C)
mAPmask
(NPU)
mAPmask
(GPU)
Ops (G) MACs Source
yolov5l-seg (640,640,3) 39.32 39.67 147.83 73.91 Link
yolov8s-seg (640,640,3) 35.90 36.50 42.64 21.32 Link
yolov8m-seg (640,640,3) 39.88 40.40 110.26 55.13 Link
yolov8l-seg (640,640,3) 42.04 42.27 220.55 110.27 Link

License

The Mobilint Model Zoo is released under BSD 3-Clause License. Please see the LICENSE file for more details.

Support & Issues

If you encounter any problem with this package, please feel free to contact us.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mblt_model_zoo-0.0.2.tar.gz (55.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mblt_model_zoo-0.0.2-py3-none-any.whl (71.7 kB view details)

Uploaded Python 3

File details

Details for the file mblt_model_zoo-0.0.2.tar.gz.

File metadata

  • Download URL: mblt_model_zoo-0.0.2.tar.gz
  • Upload date:
  • Size: 55.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for mblt_model_zoo-0.0.2.tar.gz
Algorithm Hash digest
SHA256 733278d544741a23b6ace933ebabd38f24562ed597ac51b7871a7d8d6856c3ff
MD5 5409ee4b9d9f38f40d6f3e605f411e40
BLAKE2b-256 04c2a223c6421f082501007f28e379a52b33d25ad57b2d4496c16a63e62685f6

See more details on using hashes here.

File details

Details for the file mblt_model_zoo-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: mblt_model_zoo-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 71.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for mblt_model_zoo-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f8757f897e601d7457965fefedd23bac99c212bb28e2d81985ec021365d7da3d
MD5 3df4995918539f6f62c326d7fd59dd5c
BLAKE2b-256 ed1053864f96a861b0dc9bb750d1f21d35d08a7c1218a91f924f3e595ca4dd50

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page