How furiousfoe/farmwise works
Main Components
• Data Management & Dataset Storage:
• The “Cotton Disease” directory contains sub-folders (train, test, val) with labeled images of diseased and fresh cotton plants/leaves. This represents the raw input data used for training, validation, and testing the ML model.
• The “uploads” directory includes ML scripts, a pre-trained model (including the H5 file and Jupyter Notebook), and potentially user-uploaded images.
• Machine Learning Module:
• This includes the machine learning script (ml_script.py) and the ResNet-based model saved under uploads/model. This component is responsible for image preprocessing (using OpenCV as per the README) and prediction.
• Backend (Web Application):
• The “src” folder with files like config.js and index.js indicates a Node.js/Express backend.
• User authentication, integration with the ML module (for inference on uploaded images), and possibly interfacing with both SQL and Google Cloud for data storage.
• Frontend (Web Views):
• The “views” folder (with EJS templates for pages like home, landing-page, login, signup, upload, and result) forms the presentation layer for the web application.
• The “public” folder (containing stylesheets and images) supports the frontend with static assets.
• Mobile Application:
• Database / External Services:
• As described in the README, this project uses SQL and Google Cloud for user data and result storage. This should be represented as a persistent storage/back-end service.
• Submissions & Documentation:
• The “Submissions” folder contains presentation documents, which although not part of the runtime architecture, indicate additional project artifacts that might help you understand the overall design and external interactions.
Relationships and Interactions
• Data Flow from the “Cotton Disease” dataset → ML Training Module → Model files.
• User Initiation: Web/Mobile App sends image upload requests to the Backend → Backend calls ML Module for prediction → Response sent back to Web/Mobile frontends.
• The backend then manages data persistence by logging results in the SQL/Google Cloud database.
• Authentication flows between the user interfaces (login/signup pages) and backend.
Architectural Patterns and Technologies
• This is a full-stack architecture employing separation of concerns:
• Client-side components (web views, mobile interface) are distinctly separated from the server-side logic (Node.js/Express APIs).
• The system utilizes an MVC-like pattern with clearly defined views (EJS in “views”) and controller logic in “src/index.js”.
• Integration of machine learning into the application can be highlighted as a microservice or separate module.
• Relevant Technologies:
• Programming: Node.js, Express, EJS.
• Machine Learning: Python scripts (ml_script.py), ResNet, possibly VGG16.
• Image Processing: OpenCV.
• Databases: SQL databases and Google Cloud storage.
• Mobile Development: Flutter (Android).
• Deployment and static assets handling via “public” and configuration files in “src”.