Image classification
ConvNeXt-Tiny
Accurate modern image classifier: names the main subject of a photo among 1,000 categories.
About this model
ConvNeXt-Tiny names the main subject of a photo among the 1,000 ImageNet categories, with clearly better accuracy than mobile-first models. It is a modern convolutional network (28.6 million parameters) that borrows its design from vision transformers.
These are torchvision's IMAGENET1K_V1 weights, with 82.5% top-1 accuracy on ImageNet as torchvision reports it.
What you can build
- Photo tagging where accuracy matters more than size
- Quality checks and catalog classification on desktop or recent phones
Golden retriever dog
f16Karen Arnold, CC0, https://commons.wikimedia.org/wiki/File:Golden-retriever-dog-1362597631o6g.jpg
Top 5 on the Metal (FP16 pack): golden retriever: 88.2% Labrador retriever: 1.0% kuvasz: 0.3% Sussex spaniel: 0.3% flat-coated retriever: 0.2%
Macaw parrot
f16Christopher Kuszajewski, CC0, https://commons.wikimedia.org/wiki/File:Macaw_parrot_sitting_on_a_tree_branch.jpg_.jpg
Top 5 on the Metal (FP16 pack): macaw: 82.8% sulphur-crested cockatoo: 0.1% lorikeet: 0.1% crash helmet: 0.0% Pembroke: 0.0%
Steam locomotive
f16Karora, Public domain, https://commons.wikimedia.org/wiki/File:JA1271_crossing_the_Otaki_River.jpg
Top 5 on the Metal (FP16 pack): steam locomotive: 57.8% viaduct: 14.2% freight car: 2.3% pier: 2.1% passenger car: 1.4%
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
convnext-tiny-f16.slab
57.6 MB · Hosted download
SHA-256 checksum
f0037540ce90ffad5f586ee3e19eaf3e338cff0a6aef12828f5f2fc112e2728cLICENSE-torchvision.txt
1 KB
SHA-256 checksum
6502f676851cfe25f8af75531dfb32375b7325b73c37e7b43741fa422893e71dConversion details
- command
- python -c "import torch, torchvision; m = torchvision.models.convnext_tiny(weights='IMAGENET1K_V1').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.ConvNeXt_Tiny_Weights.IMAGENET1K_V1.meta['categories']))" slab-load convert model.onnx model.slab --input image=1x3x224x224 --meta task=classify --meta resize=center_crop --meta resize_size:i64=236 --meta interpolation=bilinear --meta antialias:bool=true --meta normalize=imagenet --meta color=rgb --meta labels:labels=@labels.txt slab-load quantize model.slab convnext-tiny-f16.slab --f16 slab-load meta set convnext-tiny-f16.slab default_backend.macos=gpu
Integration examples
Python
python
import slab
cfg = slab.Config(cache_dir="/tmp/slab_cache", license=open("license.slablic.txt").read())
session = slab.Session(cfg, "convnext-tiny-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 / GPU. On the Mac the Neural Engine is barely faster per photo but takes several seconds to prepare the model; the GPU prepares it in a fraction of a second.
| 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
33.9 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: 34.45 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
5.7 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: 6.28 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
4.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: 6.54 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
152.0 ms
Measured time · scope below
Median of 79 warm runs of the model (Slab's run time). From a 1920 x 1080 photo, preprocessing included: 148 ms median. open_ms: opening the session. Peak memory (resident) after the runs: 177 MB.
Samsung Galaxy S23 Ultra (Snapdragon 8 Gen 2)
Slab · GPU
Android 17
61.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: 64.2 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: 184 MB.
Samsung Galaxy S23 Ultra (Snapdragon 8 Gen 2)
Slab · NPU
Android 17
9.6 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: 13.5 ms median. open_ms: opening the session, including preparing the model for the Hexagon NPU. Peak memory (resident) after the runs: 241 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.001.
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.001.
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.003.
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.99989; 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.
- About 5 times the size of MobileNetV3-Large.