
一个基于训练有素的YOLOv8模型用于检测作物叶片病害的全栈网页应用。
概览
一个基于训练有素的YOLOv8模型用于检测作物叶片病害的全栈网页应用。 功能- 上传叶子图片,并从训练好的模型中获取典型疾病标签。- 前端仪表盘,用于扫描历史、洞察和结果。- 后端 API,用于上传、推理和持久化。 技术栈- 前端:React 18 + TypeScript、Vite、Tailwind CSS、Radix UI(shadcn 风格组件)。- 后端:Node.js + TypeScript、Express、tsx,直接运行 TS。- 数据库:通过 Drizzle ORM 和 drizzle-kit 迁移的 PostgreSQL。- 机器学习:Python(Ultralytics YOLOv8,PyTorch,ONNX 运行时可选)。- 开发工具:Vite、TypeScript、tsx、tailwindcss、cross-env. 快速入门(开发) 前提条件 - Node 18+ 和 npm - Python 3.10+(用于机器学习工具)- PostgreSQL(或兼容的DATABASE_URL) 3. 配置环境 - 在项目根创建 .env,至少包含: 4. (可选)为机器学习准备 Python 环境 开发脚本运行 TypeScript 服务器(参见服务器/索引)。
概述(AI 翻译)
一个基于训练有素的YOLOv8模型用于检测作物叶片病害的全栈网页应用。
特色
- 上传叶片图像,并从训练好的模型中获取典型疾病标签。
- 前端仪表盘,用于扫描历史、洞察和结果。
- 后端 API,用于上传、推理和持久化。
技术栈
- 前端:React 18 + TypeScript、Vite、Tailwind CSS、Radix UI(shadcn 风格组件)。
- 后端:Node.js + TypeScript、Express、
tsx,用于直接运行TS。 - 数据库:通过 Drizzle ORM 和
drizzle-kit迁移的 PostgreSQL。 - 机器学习:Python(Ultralytics YOLOv8、PyTorch、ONNX 运行时可选)。
- 开发工具:Vite、TypeScript、tsx、tailwindcss、cross-env.
快速入门(开发) 前提条件
- 节点18+和npm
- Python 3.10+(机器学习工具)
- PostgreSQL(或兼容的
DATABASE_URL)
-
克隆仓库
-
安装节点依赖
-
配置环境
- 在项目根创建一个
.env,至少满足:
-
(可选)为机器学习准备 Python 环境
-
运行数据库迁移
-
启动开发中的应用
dev 脚本运行 TypeScript 服务器(参见 server/index.ts),该服务器在开发过程中也为客户端提供服务。
量产版本
本页由 AI 翻译,技术细节请以原文为准。
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,
tsxfor running TS directly. - Database: PostgreSQL via Drizzle ORM and
drizzle-kitmigrations. - 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)
- Clone the repo
git clone && cd MP
- Install Node dependencies
npm install
- Configure environment
- Create a
.envat the project root with at least:
DATABASE_URL=postgres://user:pass@host:port/dbname
SESSION_SECRET=your_session_secret
# Optional: OPENAI_API_KEY=...
- (Optional) Prepare Python environment for ML
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r ml/requirements.txt
- Run database migrations
npm run db:push
- 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 providedyolov8n.ptfor 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
.envor 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
- Server code: server/index.ts
- Frontend: client/src
- ML: ml (training, inference and requirements)
推荐工具
换一个关键词,或者移除筛选条件。
安装
npx skillfish add suchi173/ml-powered-tomato-crop-disease-identification-and-monitoring