SM

suchi173/ml-powered-tomato-crop-disease-identification-and-monitoring

Developer tools
0 stars Quality 36 Trend 8

A full-stack web application for crop leaf disease detection using a trained YOLOv8 model.

Overview

A full-stack web application for crop leaf disease detection using a trained YOLOv8 model. Features - Upload leaf images and get a canonical disease label from the trained model. - Frontend dashboard for scan history, insights and results. - Backend API for uploads, inference and persistence. Tech stack - Frontend: React 18 + TypeScript, Vite, Tailwind CSS, Radix UI (shadcn-style components). - Backend: Node.js + TypeScript, Express, tsx for running TS directly. - Database: PostgreSQL via Drizzle ORM and drizzle-kit migrations. - Machine learning: Python (Ultralytics YOLOv8, PyTorch, ONNX Runtime optional). - Dev tools: Vite, TypeScript, tsx, tailwindcss, cross-env. Quickstart (development) Prerequisites - Node 18+ and npm - Python 3.10+ (for ML tooling) - PostgreSQL (or a compatible DATABASE_URL) 3. Configure environment - Create a .env at the project root with at least: 4. (Optional) Prepare Python environment for ML The dev script runs the TypeScript server (see server/index.

README

ML-POWERED TOMATO CROP DISEASE IDENTIFICATION AND MONITORING

A full-stack web application for crop leaf disease detection using a trained YOLOv8 model.

Features

  • Upload leaf images and get a canonical disease label from the trained model.
  • Frontend dashboard for scan history, insights and results.
  • Backend API for uploads, inference and persistence.

Tech stack

  • Frontend: React 18 + TypeScript, Vite, Tailwind CSS, Radix UI (shadcn-style components).
  • Backend: Node.js + TypeScript, Express, tsx for running TS directly.
  • Database: PostgreSQL via Drizzle ORM and drizzle-kit migrations.
  • Machine learning: Python (Ultralytics YOLOv8, PyTorch, ONNX Runtime optional).
  • Dev tools: Vite, TypeScript, tsx, tailwindcss, cross-env.

Quickstart (development) Prerequisites

  • Node 18+ and npm
  • Python 3.10+ (for ML tooling)
  • PostgreSQL (or a compatible DATABASE_URL)
  1. Clone the repo
git clone  && cd MP
  1. Install Node dependencies
npm install
  1. Configure environment
  • Create a .env at the project root with at least:
DATABASE_URL=postgres://user:pass@host:port/dbname
SESSION_SECRET=your_session_secret
# Optional: OPENAI_API_KEY=...
  1. (Optional) Prepare Python environment for ML
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r ml/requirements.txt
  1. Run database migrations
npm run db:push
  1. Start the app in development
npm run dev

The dev script runs the TypeScript server (see server/index.ts) which also serves the client during development.

Production build

npm run build
npm start

Machine learning / inference

  • The trained model expected by the server is at ml/models/best.pt (or the provided yolov8n.pt for experiments).
  • To run a quick inference locally:
python ml/predict.py path/to/image.jpg
  • To evaluate the dataset splits:
python ml/predict.py --eval test [limit]

Troubleshooting

  • If you see “DATABASE_URL, ensure the database is provisioned” the .env or PostgreSQL connection is not configured correctly.
  • Model errors will indicate missing ml/models/best.pt — ensure the file exists before running inference.

Where to look in the repo

View this README on GitHub

Recommended Tools

Try a different keyword or remove a filter.

Install

npx skillfish add suchi173/ml-powered-tomato-crop-disease-identification-and-monitoring