IsokoLink / README.md
Ingabireee's picture
Update README.md
1cdbaca verified
---
license: gemma
library_name: big_vision
base_model: google/paligemma-3b-pt-224
tags:
- ⁠agricultural-ai
- ⁠vlm
- ⁠paligemma
- ⁠crop-disease-detection
- ⁠rwanda
- ⁠d2p-agri-platform
metrics:
- ⁠accuracy
pipeline_tag: image-to-text
---
# IsokoLink: VLM Crop Disease Diagnostic Module
*IsokoLink* is a fine-tuned vision-language model (VLM) specialized for identifying and localizing diseases in staple crops (*Maize and Beans) within smallholder farming systems in **Rwanda*.
Developed as the core AI engine for the *Digital-to-Physical (D2P) Agri-Platform*, this model transforms visual field data into verifiable quality scores that anchor financial transactions and fair trade for farmers.
## Model Details
- ⁠*Model Type:* Vision-Language Model (VLM)
- ⁠*Base Model:* [Google PaliGemma 3B (224px)](https://huggingface.co/google/paligemma-3b-pt-224)
- ⁠*Language(s):* English
- ⁠*Fine-tuning Method:* Parameter-Efficient Fine-Tuning (PEFT) targeting attention layers only.
## Intended Use
### Direct Use
IsokoLink is designed to be used by farmers,hub operators and extension officers at *aggregation hubs* (e.g., Nyabugogo) to:
1.⁠ ⁠Identify specific crop diseases from mobile imagery.
2.⁠ ⁠Localize disease clusters using bounding boxes.
3.⁠ ⁠Generate an objective "Quality Certificate" for crop batches.
## Training Data & Methodology
### Dataset
The model was trained on a hybrid dataset:
•⁠ ⁠*PlantVillage:* Baseline labels for common agricultural diseases.
•⁠ ⁠*Musanze Field Dataset:* Locally collected images from smallholder farms in Rwanda’s Northern Province to account for regional environmental variations and lighting.
### Target Classes
•⁠ ⁠⁠ maize streak virus ⁠
•⁠ ⁠⁠ maize stalk borer ⁠
•⁠ ⁠⁠ bean leaf disease ⁠
•⁠ ⁠⁠ healthy ⁠
### Training Hyperparameters
•⁠ ⁠*Batch Size:* 8
•⁠ ⁠*Learning Rate:* 0.005 (Cosine schedule with 10% warmup)
•⁠ ⁠*Training Steps:* 64
•⁠ ⁠*Sequence Length:* 128 tokens
•⁠ ⁠*Hardware:* NVIDIA T4 GPU
## Performance & Limitations
### Accuracy Target
The model is optimized to achieve a classification accuracy of *≥ 85%* for the target crops.
### Limitations
•⁠ ⁠*Resolution:* As a 224px model, it may struggle with very small, microscopic symptoms (e.g., early-stage fungal spores) without close-up photography.
•⁠ ⁠*Scope:* Currently limited to Maize and Beans; performance on other Rwandan staples like Irish potatoes or Cassava is not guaranteed.
•⁠ ⁠*Hallucination:* Like all VLMs, the model may occasionally generate bounding boxes for non-existent symptoms in extremely noisy backgrounds.
## Ethical Considerations
IsokoLink was built to address the *structural trust deficit* between farmers and middlemen. By providing objective evidence of crop health, the model aims to prevent under-pricing of healthy yields. Users are advised that AI diagnostics should supplement, not entirely replace, the expertise of agricultural agronomists in critical food security decisions.
## How to Get Started
To run inference in JAX/big_vision, load the ⁠ paligemma-3b-pt-224.f16.npz ⁠ weights and use the prompt:
⁠ detect maize streak virus ; maize stalk borer ; bean leaf disease ; healthy ⁠
---
*Project Context:* This module is part of the D2P Agri-Platform, aiming to modernize Rwandan agriculture through transparent, AI-backed market linkages.