⚙️ How FarmGuard Works
From photo to action plan in four simple steps — and an honest explanation of what the AI can and cannot do.
1. Take or upload a photo
Use your phone camera in the field or upload a photo from your gallery (JPG, PNG, WEBP). On desktop you can drag drop.
2. Automatic quality check
FarmGuard checks the photo for blur, bad lighting and whether a plant is visible — so you never get a result from a bad photo.
3. AI analysis
The image goes through the crop-analysis service, which examines leaf patterns and compares disease characteristics to return a structured diagnosis.
4. Clear action plan
You get the likely disease, a confidence score, severity level, symptoms in simple language, treatment steps and prevention advice.
How the AI pipeline is built
🔌 Pluggable AI model
The app calls one clean function — analyzeCropImage(image) — so any crop-disease model or API can be connected without rebuilding the screens. Credentials live in server-side configuration, never in the app code.
🧪 Honest demo mode
Until a real model is connected, the app runs in a clearly labeled demo mode that returns sample assessments for testing the full experience. Demo results are always marked and never presented as real diagnoses.
What FarmGuard will and won't do
✅ Will do
- Give an AI-assisted assessment with a confidence score
- Explain symptoms in simple language
- Suggest practical treatment and prevention steps
- Warn you when confidence is low
- Connect you to human experts for hard cases
🚫 Won't do
- Claim 100% certainty — results are assessments, not guarantees
- Replace an extension officer for serious outbreaks
- Recommend specific chemical brands or dosages beyond label guidance
- Work well from blurry or dark photos (it will ask you to retake)