Skip to content

Commit e56d86b

Browse files
Merge pull request #6 from Nandann018-ux/main
Add system architecture documentation
2 parents 3f52358 + e716e49 commit e56d86b

2 files changed

Lines changed: 18 additions & 8 deletions

File tree

README.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,32 +25,42 @@ Farmers and agricultural workers, particularly those in rural or low-connectivit
2525

2626
## 2. Problem Understanding & Approach
2727

28-
### Root Cause Analysis
29-
### Solution Strategy
28+
**Root Cause Analysis**
29+
The main technical hurdle in agricultural AI is the clash between computational complexity and real-world connectivity. High-accuracy models typically require powerful cloud servers, rendering them useless in rural, offline environments running on standard consumer hardware.
3030

31-
---
31+
**Solution Strategy**
32+
Our approach solves this by bringing cloud-level processing directly to the user's device. We train state-of-the-art deep learning models (specifically Swin Transformers and CNNs) in PyTorch, and then convert their computation graphs into the highly optimized ONNX format. By embedding these lightweight models inside an Electron desktop app, we can tap directly into the user's local hardware (GPU/NPU) for acceleration. This allows us to run fast, highly accurate inference entirely offline, bypassing the need for an internet connection.
3233

33-
## 3. Proposed Solution
34+
---
35+
### 3. Proposed Solution
3436

3537
### Solution Overview
3638
An Electron-based desktop application providing an automated, offline pipeline for plant disease diagnosis.
3739

38-
### Core Idea
39-
40-
### Key Features
40+
**Key Features**
41+
* **100% Offline Operation:** All disease diagnosis, severity calculation, and treatment lookups happen entirely on the user's local hardware.
42+
* **SOTA AI Classification:** Leverages the global context understanding of Transformers (like Swin Transformer V2) for highly accurate disease identification.
43+
* **User-Guided Filtering:** Users select the crop species first, narrowing the AI's focus to ensure highly specialized and accurate results.
44+
* **Damage Severity Assessment:** Uses pixel-precise semantic segmentation to calculate the exact percentage of diseased versus healthy tissue on the leaf.
45+
* **Pre-Inference Quality Control:** Automatically detects and rejects blurry images (using Laplacian variance) before they hit the model, saving compute power and preventing false diagnoses.
46+
* **Test-Time Augmentation (TTA):** The system slightly alters the input image (flips, rotations) on the fly and averages the predictions to guarantee a stable, highly confident result.
47+
* **Embedded Treatment Database:** A local SQLite database instantly provides symptom breakdowns and actionable treatment strategies (cultural, chemical, and biological).
4148

4249
---
4350

4451
## 4. System Architecture
4552

4653
### High-Level Flow
54+
4755
User $\rightarrow$ Frontend GUI (React) $\rightarrow$ Image Pre-filtering (Laplacian Variance Check in Main Process) $\rightarrow$ AI Models (Local ONNX Runtime Engine) $\rightarrow$ Model Aggregation (Classification + Severity %) $\rightarrow$ Database Lookup (SQLite) $\rightarrow$ Formatted Response on UI.
4856

4957
### Architecture Description
58+
5059
The application uses an Electron-based architecture that cleanly separates the responsive user interface (Frontend Renderer process) from the intense computational load and hardware binding (Backend Main process).
5160

5261
### Architecture Diagram
53-
(Add system architecture diagram image here)
62+
63+
![Offline-First Crop Disease Identifier Architecture](assets/image.png)
5464

5565
---
5666

assets/image.png

464 KB
Loading

0 commit comments

Comments
 (0)