DEV Community

Lalit Mohan Oli
Lalit Mohan Oli

Posted on

PlantGuard AI: Open-Source Plant Disease Detection That Gets You Outside to Touch Grass 🌿

Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass Submission 🌿

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass.

🌿 PlantGuard AI: Open-Source Plant Disease Detection & Garden Care Companion

GitHub Repository: PlantGuard AI on GitHub

Live Demo: Try PlantGuard AI

What I Built

🌿 The Vision: Reconnecting Digital Minds with Living Earth

In an age where developers and tech workers spend 8 to 10 hours a day glued to glowing screens, our connection with the physical, living world can easily deteriorate. When a beloved balcony tomato plant develops yellow halos or an apple tree shows olive-green spots, our modern reflex is to grab a phone, search endlessly, and sink deeper into screen fatigue.

Existing commercial plant identification apps can make this experience even more frustrating:

  1. Aggressive Subscription Walls: Essential plant health screening may be locked behind recurring subscriptions.
  2. Privacy Concerns: Personal garden photos, images of living spaces, and location data may be uploaded to remote servers.
  3. Passive Screen Traps: Users can get stuck scrolling through diagnosis pages, forum discussions, and pesticide advertisements instead of stepping outside to inspect their plants.

PlantGuard AI was built to offer a different approach.

Created for the Hacktoberfest Open-Source AI Challenge Week 1: β€œTouch Grass,” PlantGuard AI is an open-source plant disease screening tool and garden care companion designed to run locally.

It uses open-weight computer vision not to keep you glued to your screen, but to help you step away from your desk, get some sunlight, and reconnect with your garden.

🌱 Explore the project: GitHub Repository


πŸ‘₯ Who Is It For?

  • Urban and Balcony Gardeners: Apartment dwellers growing herbs, cherry tomatoes, and peppers in containers who need help identifying potential plant health problems.
  • Backyard Homesteaders and Community Growers: Gardeners managing vegetable patches and fruit trees who want accessible crop screening without recurring subscription fees.
  • Beginner Plant Parents: Enthusiasts looking for practical, cautious care guidance without unnecessary pressure to use synthetic chemicals.
  • Open-Source and Privacy Advocates: Users who want plant image analysis and garden records to remain on their own devices when using the local application.

✨ Core Features Breakdown

1. πŸ”¬ Open-Weight AI Screening (38 Classes Across 14 Crops)

PlantGuard AI uses a MobileNetV2 architecture fine-tuned on the PlantVillage dataset to identify visual patterns associated with plant diseases and healthy leaves.

  • Lightweight Model (~8.9 MB weights): Designed for CPU inference without requiring a dedicated GPU.
  • Validation Accuracy: Reports 95.41% accuracy across 38 classes in the project's validation benchmark.
  • Supported Crops:
    • Fruits and Orchards: Apple, Blueberry, Cherry, Grape, Orange, Peach, Raspberry, Strawberry.
    • Vegetables and Field Crops: Bell Pepper, Potato, Tomato, Squash, Corn (Maize), Soybean.

These results represent the project's reported benchmark performance, not a guarantee of accuracy for every real-world garden condition.

2. πŸ“Š Transparent Statistical Confidence and Low-Confidence Warnings

PlantGuard AI treats AI predictions as probabilistic screening aids, not definitive diagnoses.

  • Clearly labels prediction scores as Model Statistical Confidence.
  • Displays the top five alternative predictions with percentage bars.
  • Triggers a low-confidence warning when the top prediction falls below 60%.
  • Encourages users to consider environmental stress, lighting conditions, and unsupported plant species before taking action.

3. 🩺 Transparent, Practical Gardening Guidance

Each of the 38 classes includes a human-reviewed care profile designed to help users understand symptoms and choose sensible next steps.

Profiles include:

  • Symptom Manifestations: Visual descriptions of lesions, pustules, chlorosis, and stippling.
  • Immediate Practical Actions: Cleaning pruning tools, removing severely affected foliage when appropriate, and adjusting watering practices.
  • Preventative Cultural Practices: Mulching, drip irrigation, improving airflow, and crop rotation where applicable.

Recommendations are intended as general gardening guidance. Treatments should be selected according to the plant, likely cause, and local growing conditions.

4. 🌱 Dedicated β€œTouch Grass Mode”

This is the heart of PlantGuard AI.

Instead of ending with an AI prediction, the application gives users a customized checklist that encourages them to inspect their plants outdoors.

  • 🧀 The 2-Inch Soil Finger Test: Check soil moisture below the surface before deciding whether to water.
  • πŸ” Underside Leaf Examination: Inspect leaves in natural light for fungal signs, pest activity, and beneficial insects.
  • πŸ’¨ Canopy Airflow Check: Look for overcrowding and improve air circulation where appropriate.
  • βœ‚οΈ Sanitized Pruning: Remove affected foliage when appropriate and clean pruning tools between plants.

Interactive Milestone Rewards: After completing the outdoor inspection, users can click β€œMark Outdoor Inspection Complete” to record their garden visit and celebrate time spent caring for living plants.

The goal is simple: use AI as a bridge to real-world action, not as another reason to stay indoors.

5. πŸ“– Local SQLite Plant Care Journal

The desktop application stores scan history, prediction confidence, personal notes, and outdoor follow-up statuses in a local SQLite database:

data/journal.db

Features include:

  • Reviewing historical observations and plant health progression.
  • Tracking follow-up statuses such as Pending Outdoor Check, Grass Touched: Inspected Outdoors, and Recovering.
  • Keeping garden notes and records locally when using the desktop application.

Privacy by design: The local desktop workflow is designed to keep plant photos, notes, and inference on the user's machine rather than uploading them to third-party servers.

The browser-based showcase uses browser localStorage for its client-side journal, which is separate from the desktop application's SQLite database.


πŸš€ Demo and Source Code

Experience PlantGuard AI in two ways.

1. 🌐 Live Web Showcase

Try it here: Open the Interactive GitHub Pages Demo

You can explore the interactive showcase from a phone, tablet, or desktop browser.

What you can do:

  • Instant Sample Testing: Explore sample profiles for:
    • πŸ… Healthy Tomato Leaf
    • πŸ₯€ Tomato Early Blight
    • 🍏 Apple Scab
  • Drag-and-Drop Image Ingestion: Upload a JPG or PNG leaf image to explore the demo's image-analysis interface.
  • Interactive Touch Grass Checklist: Check off real-world gardening tasks and track your progress.
  • Client-Side Plant Journal: Add, view, and manage observation logs stored in browser localStorage.
  • One-Click Code Snippets: Copy commands for running the Python application locally.

Note: The browser showcase and the full local desktop application are separate experiences. Check the repository documentation for the implementation details and capabilities of each.

2. πŸ’» Full Local Desktop Dashboard (Gradio + PyTorch)

Run the Python application locally to explore the complete desktop workflow.

Prerequisites

  • Python 3.10, 3.11, 3.12, or 3.13
  • Git

Quickstart Commands

# 1. Clone the repository
git clone https://github.com/lalit-oli-mohan-479/PlantGuard-AI---Open-Source-Plant-Disease-Detector.git

# 2. Enter the project directory
cd PlantGuard-AI---Open-Source-Plant-Disease-Detector

# 3. Install dependencies
pip install -r requirements.txt

# 4. Launch the local application
python app.py
Enter fullscreen mode Exit fullscreen mode

Get the code: View the PlantGuard AI GitHub Repository


🌍 Why PlantGuard AI Matters

PlantGuard AI is built around a simple idea: technology should help us engage more meaningfully with the world around us.

By combining accessible computer vision, transparent prediction confidence, local data storage, and practical gardening checklists, the project aims to make plant health screening more approachable while encouraging users to spend less time scrolling and more time caring for their plants.

It is not about replacing hands-on gardening expertise. It is about using AI to help people ask better questions, inspect their plants more carefully, and take informed next steps.

🀝 Explore, Use, and Contribute

PlantGuard AI is an open-source project, and contributions are welcome.

🌱 GitHub: Star the repository, explore the code, or contribute

🌐 Live Demo: Try PlantGuard AI

Built for Hacktoberfest. Inspired by nature. Designed to bring people back to their gardens.

Touch grass. Inspect a leaf. Let AI help you take the next step. 🌿

Top comments (0)