Image classification
MobileNetV3-Large
Fast image classifier for phones: names the main subject of a photo among 1,000 everyday categories.
About this model
MobileNetV3-Large looks at a photo and names its main subject, choosing among the 1,000 ImageNet categories: animals, vehicles, food, household objects and more. It is built for phones: 5.5 million parameters, and about 1 ms per photo on Apple's Neural Engine.
These are torchvision's IMAGENET1K_V2 weights, with 75.3% top-1 accuracy on ImageNet as torchvision reports it.
What you can build
- Tag and search a photo library by subject
- Sort or route images before heavier processing
- Live camera labels on a phone
Golden retriever dog
f16Karen Arnold, CC0, https://commons.wikimedia.org/wiki/File:Golden-retriever-dog-1362597631o6g.jpg
Top 5 on the Apple Neural Engine (FP16 pack): golden retriever: 81.0% Labrador retriever: 2.8% cocker spaniel: 0.7% tennis ball: 0.6% Tibetan terrier: 0.3%
Macaw parrot
f16Christopher Kuszajewski, CC0, https://commons.wikimedia.org/wiki/File:Macaw_parrot_sitting_on_a_tree_branch.jpg_.jpg
Top 5 on the Apple Neural Engine (FP16 pack): macaw: 80.0% lorikeet: 1.5% African grey: 0.2% toucan: 0.2% bee eater: 0.1%
Steam locomotive
f16Karora, Public domain, https://commons.wikimedia.org/wiki/File:JA1271_crossing_the_Otaki_River.jpg
Top 5 on the Apple Neural Engine (FP16 pack): steam locomotive: 39.2% passenger car: 9.1% freight car: 6.3% viaduct: 5.9% electric locomotive: 5.1%
Variants & downloads
Choose the build for your appModel files are hosted on Google Drive. Large files may open a confirmation page before downloading.
Standard
SlabWeights stored in FP16: half the size of FP32, the same predictions.
Platforms: macos · android
mobilenet-v3-large-f16.slab
12.1 MB · Hosted download
SHA-256 checksum
e4edc9a95315bb217578522b70ac941b70ae5387298d396f9a526704d56c3a2fLICENSE-torchvision.txt
1 KB
SHA-256 checksum
6502f676851cfe25f8af75531dfb32375b7325b73c37e7b43741fa422893e71dConversion details
- command
- python -c "import torch, torchvision; m = torchvision.models.mobilenet_v3_large(weights='IMAGENET1K_V2').eval(); torch.onnx.export(m, torch.randn(1, 3, 224, 224), 'model.onnx', input_names=['image'], output_names=['logits'], opset_version=17, dynamo=False)" python -c "import torchvision; open('labels.txt', 'w').write('\n'.join(torchvision.models.MobileNet_V3_Large_Weights.IMAGENET1K_V2.meta['categories']))" slab-load convert model.onnx model.slab --input image=1x3x224x224 --meta task=classify --meta resize=center_crop --meta resize_size:i64=232 --meta interpolation=bilinear --meta antialias:bool=true --meta normalize=imagenet --meta color=rgb --meta labels:labels=@labels.txt slab-load quantize model.slab mobilenet-v3-large-f16.slab --f16 slab-load meta set mobilenet-v3-large-f16.slab default_backend.macos=npu
Integration examples
Python
python
import slab
cfg = slab.Config(cache_dir="/tmp/slab_cache", license=open("license.slablic.txt").read())
session = slab.Session(cfg, "mobilenet-v3-large-f16.slab", warmup=True)
out = session.run(slab.Input(frame=slab.Frame.open("photo.jpg")))
for c in out.top_k(5):
print(f"{c.label}: {c.score:.1%}")
Device & backend compatibility
Pack default: macos / NPU. Fastest on the Mac (about 1 to 2 ms per photo) and quick to prepare.
| Platform | Engine | Status | Precision |
|---|---|---|---|
| apple | CPU CPU | Supported Measured on macOS. | f32 |
| apple | Metal GPU | Supported Measured on macOS. | f32 |
| apple | Apple Neural Engine NPU | Supported Measured on macOS. The Neural Engine computes in FP16; preparing the model for it takes noticeably longer than for the GPU (see open time under Performance). | f16 |
| android | CPU CPU | Supported Measured on a Samsung Galaxy S23 Ultra (Snapdragon 8 Gen 2, Adreno 740), Android 17. | f32 |
| android | Vulkan GPU | Supported Measured on a Samsung Galaxy S23 Ultra (Snapdragon 8 Gen 2, Adreno 740), Android 17. | f32 |
| android | Qualcomm Hexagon NPU (QNN) NPU | Supported Measured on a Samsung Galaxy S23 Ultra (Snapdragon 8 Gen 2, Adreno 740), Android 17. The NPU computes in FP16 (the int8 pack's weights are widened to FP16). | f16 |
Performance
Results depend on the device, runtime, and test conditions. Each measurement keeps its own context.
Mac with Apple M1 Max
Slab · CPU
macOS 26.6.2
8.0 ms
Measured time · scope below
Median of 100 warm runs of the model (Slab's run time). From a 1920 x 1080 photo, preprocessing included: 8.65 ms median. open_ms: opening the session, including preparing the model for the CPU.
Mac with Apple M1 Max
Slab · GPU
macOS 26.6.2
2.4 ms
Measured time · scope below
Median of 100 warm runs of the model (Slab's run time). From a 1920 x 1080 photo, preprocessing included: 3.61 ms median. open_ms: opening the session, including preparing the model for the Metal.
Mac with Apple M1 Max
Slab · NPU
macOS 26.6.2
1.3 ms
Measured time · scope below
Median of 100 warm runs of the model (Slab's run time). From a 1920 x 1080 photo, preprocessing included: 2.23 ms median. open_ms: opening the session, including preparing the model for the Apple Neural Engine.
Samsung Galaxy S23 Ultra (Snapdragon 8 Gen 2)
Slab · CPU
Android 17
11.0 ms
Measured time · scope below
Median of 100 warm runs of the model (Slab's run time). From a 1920 x 1080 photo, preprocessing included: 12.1 ms median. open_ms: opening the session. Peak memory (resident) after the runs: 80 MB.
Samsung Galaxy S23 Ultra (Snapdragon 8 Gen 2)
Slab · GPU
Android 17
8.5 ms
Measured time · scope below
Median of 100 warm runs of the model (Slab's run time). From a 1920 x 1080 photo, preprocessing included: 19.4 ms median. open_ms: opening the session with the GPU programs already in the cache folder (the first open on a device compiles them, about 0.3 s more). Peak memory (resident) after the runs: 90 MB.
Samsung Galaxy S23 Ultra (Snapdragon 8 Gen 2)
Slab · NPU
Android 17
1.5 ms
Measured time · scope below
Median of 100 warm runs of the model (Slab's run time). From a 1920 x 1080 photo, preprocessing on the CPU included: 3.65 ms median. open_ms: opening the session, including preparing the model for the Hexagon NPU. Peak memory (resident) after the runs: 92 MB.
Accuracy checks
macos · CPU · f16
The upstream PyTorch model with its own preprocessing, on 53 public-domain photos (Wikimedia Commons)
Same top answer on 53/53 photos with Slab doing the preprocessing; on identical input tensors, same top answer on 53/53, upstream's answer among Slab's top 5 on 53/53, largest probability difference 0.004.
macos · GPU · f16
The upstream PyTorch model with its own preprocessing, on 53 public-domain photos (Wikimedia Commons)
Same top answer on 53/53 photos with Slab doing the preprocessing; on identical input tensors, same top answer on 53/53, upstream's answer among Slab's top 5 on 53/53, largest probability difference 0.004.
macos · NPU · f16
The upstream PyTorch model with its own preprocessing, on 53 public-domain photos (Wikimedia Commons)
Same top answer on 53/53 photos with Slab doing the preprocessing; on identical input tensors, same top answer on 53/53, upstream's answer among Slab's top 5 on 53/53, largest probability difference 0.007.
android · NPU · f16
Slab's CPU engine (FP32) on the same 1920 x 1080 photo
Cosine similarity of the output with the CPU's: 0.99999; the same top answer and the same top 5.
Before you choose this model
- Knows only the 1,000 ImageNet categories; anything else is reported as the closest of them.
- One label per photo: with several objects, it names the most prominent.
- Scores are relative confidences, not calibrated probabilities.
- Trained on photos; drawings, screenshots and unusual viewpoints are less reliable.