How its-kumar-yash/tomato-plant-disease-detection-model works
Project type and purpose
• This is a TinyML-based machine-learning pipeline for real-time tomato plant disease detection on edge devices.
• Offline components: data preprocessing, augmentation, model training and conversion (TensorFlow → TensorFlow Lite).
• Online/inference components: Edge Impulse integration, edge device (mobile/embedded) running the TFLite model, user interface for on-site diagnosis.
File structure
• Top-level artifacts:
– README.md (project overview, tech stack, usage)
– Tomato Plant Disease Detection.pdf (design doc or paper)
• “disease-prediction” and “health-prediction” folders each contain a Jupyter notebook (model.ipynb) representing separate model-development workflows.
• “model/1” holds a versioned TensorFlow SavedModel (saved_model.pb, fingerprint.pb, metadata).
• Root TFLite artifacts: tf_lite_model.tflite and tf_lite_quantized_model.tflite – the edge deployable models.
Insights from the README
• Data source: Plant Village dataset (16,011 images, 10 disease classes).
• Pipeline stages: data preprocessing → model development → conversion (TFLite & quantized) → deployment (Edge Impulse) → evaluation on edge.
• Real-world deployment: Edge Impulse app on mobile devices.
a. Main components
1. Data Storage & Preprocessing
– Raw image dataset repository (local or cloud storage).
– Preprocessing & augmentation notebook (disease-prediction/model.ipynb and health-prediction/model.ipynb).
2. Training & Validation Environment
– Python/TensorFlow training cluster or local GPU.
3. Model Artifact Repository
– Versioned SavedModel in “model/1”.
4. Model Conversion
– TensorFlow → TensorFlow Lite conversion, quantization steps producing tf_lite_model.tflite and tf_lite_quantized_model.tflite.
5. Edge Impulse Cloud Service
– Model upload, build, test harness.
6. Inference Runtime (Edge Device)
– Mobile or embedded device running TFLite engine.
– Input: camera or sensor feed.
7. User Interface
– Edge Impulse mobile app or custom UI for real-time predictions.
b. Relationships and data flows
c. Architectural patterns & design principles
– Pipeline architecture segregating offline (training) from online (inference).
– Versioned artifact management (SavedModel versioning).
– Modular conversion step enabling multiple target formats (TFLite, quantized).
– Cloud-edge integration pattern (Edge Impulse as CI/CD for TinyML).
d. Key technologies & frameworks
– Python, Jupyter Notebooks
– TensorFlow (training)
– TensorFlow Lite (inference, quantization)
– Edge Impulse (model management, deployment)