←
ENFR

On-device image classifier

Image moderation prototype for a messaging app, trained on a proxy dataset (Food-101, 3 classes) and quantised into three builds for three deployment targets.

93.1%macro F1
1.24 MBsmallest build
9,714images
View on GitHub →

Problem

A messaging app needs to classify shared images without shipping them to a server. That means the model runs on the handset, so it has to be small and fast, not just accurate. Size is the binding constraint.

Approach: transfer learning, then quantisation

Food-101 subset 9,714 images · 3 classes 224×224 RGB MobileNetV3Small frozen ImageNet backbone stage 1 · 20 epochs Fine-tune 52 BatchNorm layers frozen stage 2 · 3 epochs Macro F1 93.10% TFLite export: one trained model, three quantisations Dynamic range 1.24 MB edge devices Float16 1.96 MB mobile apps FP32 3.89 MB server inference

How it works

Why it runs on the device

Results

93.10%
Macro F1
92.92%
Validation accuracy
1.24 MB
Smallest build

Technology Stack

MobileNetV3Transfer learningQuantisationComputer vision