How rahul270903/cocoa-disease-detection works
Cocoa Disease Detection is a Flask web application for farmers to identify cocoa diseases from uploaded images and receive localized care advice. Its main workflow accepts an image, processes it for CNN inference, presents a class and confidence, selects disease-specific recommendations, and supports translation. The README also describes registration/login and a dashboard; the sampled app code shows MySQL-backed authentication and notification handling. The source excerpts are partial, so several documented UI and database links are shown only where the README or excerpt supports them; the JavaScript core files include general site behavior and browser utilities.
Main entry points: app.py Flask routes · dashboard.html Dashboard UI · model.keras CNN classifier · schema.sql MySQL records
Components 17
Web experience
- Dashboard UI
templates/admin/dashboard.html - Site pages
templates/index.html - Page interactions
static/js/main.js - Feature detection
static/js/modernizr.js - Browser plugins
static/js/plugins.js
Disease detection
- Flask routes
app.py - Image upload
app.py - Image processing
app.py - CNN classifier
model.keras - Care recommendations
app.py - Prediction result
result.html
Accounts and notifications
- Registration and login
app.py - MySQL records
database/schema.sql - Admin notifications
app.py
Localization
- Result translation
app.py
Other components
- Farmer
- Translation API
Connections 16
- Farmer → Dashboard UI: uses
README.md - Farmer → Site pages: visits
README.md - Farmer → Flask routes: submits image
app.py - Flask routes → Image upload: routes upload
app.py - Image upload → Image processing: processes image
app.py - Image processing → CNN classifier: predicts
app.py - CNN classifier → Care recommendations: returns class
app.py - Care recommendations → Prediction result: presents advice
README.md - Farmer → Registration and login: registers or logs in
README.md - Registration and login → MySQL records: queries accounts
app.py - Flask routes → Admin notifications: dispatches alerts
app.py - Admin notifications → MySQL records: stores and reads
app.py - Farmer → Result translation: requests language
app.py - Result translation → Translation API: translates HTML
app.py - Dashboard UI → Result translation: requests translation
- Page interactions → Browser plugins: initializes widgets
static/js/main.js