🌿 AgriVision AI
MobileNetV2 INT8 · Coral Edge TPU · Raspberry Pi
Offline binary plant-health classification for a Raspberry Pi 4 + Google Coral USB Accelerator school/research prototype
Primary developer / project author: Isis Saritha Swapin
Contributor: Swapin Vidya · Publisher: PeachBot AI
Source code · PeachBot · Model files
Release at a glance
| Item | Release |
|---|---|
| Task | Binary plant-health classification |
| Labels | healthy, problem |
| Architecture | MobileNetV2, α = 0.35 |
| Input | 224 × 224 RGB |
| Training initialization | Scratch |
| Dataset | PlantVillage Full |
| Dataset revision | v0.1.0 |
| Quantization | Full-integer UINT8 TFLite |
| Deployment target | Raspberry Pi 4 + Coral USB Accelerator |
| Edge TPU compiler | 16.0.384591198 |
| Compiler mapping | 69 / 69 operators mapped to Edge TPU |
| CPU fallback in compiler report | 0 operators |
| Hardware validation | Pending physical Raspberry Pi + Coral run |
Important: the reported accuracy is held-out evaluation on PlantVillage imagery. It is not a field-accuracy claim and does not establish performance across real farms, lighting conditions, cultivars, camera positions, or all plant diseases/stressors.
What this model does
AgriVision AI classifies a leaf image into one of two exhibition-friendly categories:
healthy— the image resembles healthy PlantVillage examples.problem— the image resembles a PlantVillage example containing a disease/problem class.
The binary design is intentional. It supports a simple, explainable school smart-agriculture demonstration while soil moisture is measured independently using a real sensor rather than inventing unsupported visual “water stress” labels.
This model is designed to be used inside the open-source AgriVision AI Raspberry Pi project, where it works alongside soil-moisture sensing, BME280 environmental sensing, safe low-voltage irrigation control, LEDs/buzzer and a local Flask dashboard.
Evaluation
Held-out test performance
| Model | Accuracy | Balanced accuracy | Macro-F1 |
|---|---|---|---|
| FLOAT | 98.66% | 98.24% | 98.31% |
| INT8 TFLite | 98.58% | 98.10% | 98.20% |
The deployable INT8 model achieved:
98.58% held-out INT8 test accuracy on the PlantVillage dataset.
INT8 confusion matrix
Rows = true labels, columns = predicted labels.
| Predicted healthy | Predicted problem | |
|---|---|---|
| True healthy | 2,898 | 88 |
| True problem | 68 | 7,894 |
The release gate also verified that both classes were predicted and that the classifier did not collapse to a single output class.
Edge TPU compilation
The INT8 model was compiled using:
Edge TPU Compiler version 16.0.384591198
Compiler operator mapping:
| Operator | Count | Status |
|---|---|---|
CONV_2D | 35 | Mapped to Edge TPU |
DEPTHWISE_CONV_2D | 17 | Mapped to Edge TPU |
ADD | 11 | Mapped to Edge TPU |
QUANTIZE | 2 | Mapped to Edge TPU |
SOFTMAX | 1 | Mapped to Edge TPU |
MEAN | 1 | Mapped to Edge TPU |
FULLY_CONNECTED | 1 | Mapped to Edge TPU |
MUL | 1 | Mapped to Edge TPU |
| Total | 69 | 69 mapped to Edge TPU |
This confirms successful compiler mapping. It does not by itself prove physical USB Accelerator execution; hardware validation remains pending until the model is run on the actual Raspberry Pi + Coral device.
Model artifacts
| File | Purpose |
|---|---|
plant_health_edgetpu.tflite | Coral Edge TPU compiled deployment model |
plant_health_int8.tflite | Full-integer UINT8 TFLite model before Edge TPU compilation |
labels.txt | Output label mapping |
model_manifest.json | Training lineage, metrics and release metadata |
training_history.json | Training history |
Download for Raspberry Pi deployment
Using the Hugging Face CLI:
mkdir -p models
hf download peachbotAI/agrivision-mobilenetv2-edge-tpu \
plant_health_edgetpu.tflite \
plant_health_int8.tflite \
labels.txt \
model_manifest.json \
--local-dir models
No Hugging Face token is required for this public repository.
For the complete application, use the project repository:
git clone https://github.com/swapins/agrivision-ai-pi.git
cd agrivision-ai-pi
The project deployment scripts place/use the Coral model at:
models/plant_health_edgetpu.tflite
Reproducible training lineage
The official release uses the following fixed lineage:
Dataset geraldmc/plantvillage-full
Revision v0.1.0
Dataset license CC0-1.0
Task binary: healthy / problem
Architecture MobileNetV2
Width multiplier 0.35
Input 224 × 224 RGB
Initialization scratch
Quantization full-integer UINT8
Target TensorFlow Lite / LiteRT
Accelerator target Google Coral Edge TPU
Training and evaluation code is maintained in:
https://github.com/swapins/agrivision-ai-pi
The normal source repository does not store generated .tflite binaries; validated model artifacts are released here on Hugging Face.
Intended use
Appropriate uses include:
- school science and technology exhibitions;
- Raspberry Pi / Coral Edge TPU demonstrations;
- edge-AI education;
- local/offline image-classification experiments;
- smart-agriculture prototypes;
- learning about model quantization and accelerator deployment.
Not intended for
This release is not intended to provide:
- professional agricultural diagnosis;
- pesticide or treatment recommendations;
- claims of general field accuracy;
- safety-critical crop-management decisions;
- replacement for agronomists, plant pathologists or laboratory testing.
Limitations
- Controlled-background dataset. PlantVillage imagery does not represent the full visual variability of farms and outdoor environments.
- Binary output.
problemdoes not identify a specific disease or cause. - Domain shift. Lighting, camera angle, blur, background clutter, cultivar and unseen conditions can reduce performance.
- Dataset grouping. Some PlantVillage classes use synthetic leaf identifiers; the release manifest records the split policy.
- Hardware validation pending. The Edge TPU compiler mapped all listed operators, but physical Raspberry Pi + Coral runtime validation must still be completed.
- Educational prototype. This model is part of a school/research system and should not be represented as a certified agricultural diagnostic product.
System context
Raspberry Pi Camera
│
▼
Raspberry Pi 4 ─────────────► Coral USB Edge TPU
│ │
│ └─ AgriVision AI inference
│
├─ ADS1115 ◄─ capacitive soil-moisture sensor
├─ BME280 ◄─ temperature / humidity
├─ MOSFET ─► 5 V irrigation pump
├─ LEDs + buzzer
└─ local Flask dashboard
After installation and model download, inference is designed to run locally without sending every leaf image to a cloud inference service.
Project authorship
Isis Saritha Swapin — Primary Developer / Project Author
AgriVision AI is developed as a student STEM project by Isis Saritha Swapin, with a focus on Raspberry Pi, edge AI and smart agriculture.
PeachBot author profile:
https://peachbot.in/people/4
Swapin Vidya — Contributor
Technical architecture, engineering review, documentation and implementation guidance.
PeachBot AI — Publisher
Model artifacts and project release infrastructure.
Citation
If you use the model or project in educational material, demonstrations or derivative work, please cite the source repository and this Hugging Face release.
@software{agrivision_ai_2026,
title = {AgriVision AI: MobileNetV2 INT8 + Coral Edge TPU Plant-Health Classifier},
author = {Isis Saritha Swapin and Swapin Vidya},
year = {2026},
publisher = {PeachBot AI},
url = {https://huggingface.co/peachbotAI/agrivision-mobilenetv2-edge-tpu}
}
License
Model repository: Apache-2.0
Training dataset: PlantVillage Full, CC0-1.0
Application source code: see the license in the AgriVision AI GitHub repository.
AgriVision AI
Edge AI for a practical student smart-agriculture working model
Raspberry Pi · Coral Edge TPU · TensorFlow Lite / LiteRT · PlantVillage · PeachBot AI