Okuafo CassavaGuard Edge v1.0
An offline, two-stage TensorFlow Lite research model for cassava image screening. Stage 1 rejects non-cassava or unclear images. Stage 2 screens accepted images for bacterial blight, brown leaf spot, green mite damage, healthy, mosaic disease, or whitefly pressure. The locked policy abstains when confidence is below its validation-calibrated thresholds.
Release status
This package passed its internal, leakage-audited held-out test gates and is ready to publish for independent review. Agronomist review, prospective field validation, geographic robustness testing, and production approval are still pending. It is not a substitute for a plant-health professional and must not be used alone for pesticide or treatment decisions.
Locked held-out test results
- Joint accepted precision: 96.48%
- Accepted precision 95% Wilson lower bound: 95.35%
- Relevant-image coverage: 91.51%
- Wrong-crop rejection: 99.40%
- Stage-1 macro F1: 98.93%
- Stage-2 macro F1: 93.84%
- Stage-1 ECE after calibration: 0.0037
- Stage-2 ECE after calibration: 0.0064
| Stage-2 class | Raw recall | Selective coverage | Accepted accuracy | Test images |
|---|---|---|---|---|
| bacterial blight | 91.24% | 90.40% | 94.38% | 354 |
| brown leaf spot | 88.73% | 80.39% | 94.51% | 204 |
| green mite damage | 91.49% | 85.11% | 96.67% | 141 |
| healthy | 96.47% | 92.35% | 99.36% | 170 |
| mosaic disease | 94.87% | 91.03% | 96.48% | 156 |
| whitefly pressure | 100.00% | 99.76% | 100.00% | 423 |
The test set was evaluated once after seed selection, temperature calibration, and confidence thresholds were locked on validation data.
Data and leakage controls
The prepared dataset contains 21,993 unique retained images: 12,289 train, 6,598 validation, and 3,106 test. Exact decoded-pixel hashes, perceptual groups, and capture groups were kept split-disjoint. Unresolved near-duplicate review items were quarantined before training.
The first held-out audit was preserved after narrowly missing one conservative
confidence-bound gate. For the final refit, a fresh test set was selected
without reading image pixels or model outputs from whole duplicate-safe groups
in the former training pool. Those samples had appeared in earlier
recipe-development training, but were excluded from every final from-scratch
refit and had no per-record outcomes inspected before the policy lock. The
full disclosure and deterministic selection protocol are included under
provenance/.
Sources:
- Dataset for Crop Pest and Disease Detection (Ghana CCMT), CC BY 4.0, DOI 10.17632/bwh3zbpkpv.1
- Cassava Whitefly Dataset (Uganda), CC BY 4.0, DOI 10.17632/5g38399z9p.2
- DeepWeeds open-set negatives, CC BY 4.0, DOI 10.5281/zenodo.7939060
No dataset images are redistributed in this model repository.
Reproducibility
Three independently seeded candidates were trained per stage. The selected
stage-1 seed is 1501 and the selected
stage-2 seed is 1517. Selection first
required at least 85% validation recall for every class, then used validation
macro F1; test data were not used. Detailed seed, calibration, test, provenance,
duplicate-audit, and TFLite parity reports are included under reports/ and
provenance/.
Offline inference
python -m pip install -r requirements.txt
python inference/verify_bundle.py
python inference/predict.py path/to/cassava_image.jpg
The runtime verifies the policy and FP16 model checksums before inference.
It returns not_cassava_or_unclear, uncertain, or an accepted screening
label. Raw RGB input is resized to 320 by 320 pixels.
Limitations
- The source data are dominated by Ghana and Uganda and do not establish performance in other locations, seasons, devices, cultivars, or severities.
- Whitefly pressure is a visual screening label, not a laboratory count or causal diagnosis.
- Multiple simultaneous conditions and symptoms outside the six-class contract may be forced into an available class or rejected.
- Capture-quality, adversarial, prospective field, and agronomist audits are not complete.
Intended use
Research, offline field-trial support, and user-led validation. Do not use the output as the sole basis for treatment, pesticide, financial, or regulatory decisions.
- Downloads last month
- 35
