←Back to Works / Projects
Mobile//AI & ML
LIVE SYSTEM
MobileAI & ML

PashuSwasthya

Offline-First Multilingual Mobile App for Cattle Breed & Disease Diagnosis

Stack:FlutterTensorFlow LiteMobileNetV3Python
YOUR ROLE & SCOPEAI Model Engineer & Mobile App Developer
TIMELINE3 Months
CORE CONSTRAINTSZero internet connectivity in remote farmland; target budget Android devices (<2GB RAM)
DEPLOYMENTFlutter (Android) + TensorFlow Lite (On-Device)
error_outline

// 01. THE PROBLEM

Rural cattle farmers face severe economic losses due to delayed veterinary diagnosis for cattle diseases in remote zero-connectivity zones.

account_tree

// 02. SYSTEM ARCHITECTURE & PIPELINE FLOW

STAGE 01CAPTURE

Camera & Image Preprocessing

Captures cattle image and resizes/normalizes array to 224x224 tensor format on device.

STAGE 02INFERENCE

On-Device Quantized TFLite Engine

Executes INT8 MobileNetV3 model completely offline with sub-50ms CPU inference time.

STAGE 03DIAGNOSIS

Disease & Confidence Parser

Maps output vector to class labels with confidence score and immediate treatment advisory.

STAGE 04AUDIO

Localized Voice Advisory Output

Synthesizes regional dialect audio advisory so illiterate farmers can act immediately.

balance

// 03. TECHNICAL APPROACH & DECISION MATRIX

01On-Device Quantized TFLite Inference

✓ DECISION CHOSEN

INT8 Post-Training Quantization (14MB TFLite Model)

Cloud APIs fail in internet-dead zones. INT8 quantization reduced model size from 65MB to 14MB with sub-50ms inference latency.

✕ REJECTED ALTERNATIVE

Cloud-Hosted Inference API

Requires continuous 4G/5G data connections which are unavailable in remote Indian farm fields.

terminal

// 04. CORE ARCHITECTURAL LOGIC

On-device INT8 quantized MobileNetV3 TFLite inference loop with sub-50ms latency.

ml/tflite_engine.dart
12345678910111213
Future<DiagnosisResult> runOnDeviceInference(File imageFile) async { final inputBytes = await preprocessImage(imageFile, targetSize: 224); final interpreter = await Interpreter.fromAsset('models/mobilenet_v3_quant.tflite'); var outputBuffer = List<int>.filled(numClasses, 0).reshape([1, numClasses]); final stopwatch = Stopwatch()..start(); interpreter.run(inputBytes, outputBuffer); stopwatch.stop(); // Guaranteed < 50ms latency on mobile CPUs final topPrediction = parseTFLiteOutputs(outputBuffer); return DiagnosisResult(disease: topPrediction.label, latencyMs: stopwatch.elapsedMilliseconds); }
task_alt

// 05. TRADE-OFFS & HONEST REFLECTION

Quantizing to INT8 dropped precision by 2.8% on rare edge cases, but enabled instant offline inference without device overheating.

query_stats

// 06. CONCRETE OUTCOMES & VERIFIED METRICS

100%
Offline First
Zero network connection required
14 MB
Quantized TFLite Model
INT8 post-training compressed size
< 50ms
Inference Latency
Sub-second CPU execution on budget Android