This project is an intelligent crop disease detection system that leverages the powerful YOLO (You Only Look Once) algorithm for real-time object detection. It is built with a modern, decoupled, full-stack architecture, assisted by the DeepSeek AI model for code generation and project insights. The system provides an end-to-end solution for identifying crop diseases from images, videos, and live camera feeds, aiming to offer an efficient and accurate tool for agricultural producers and researchers.
- Multi-source Detection: Supports disease detection from static images, video files, and real-time camera streams.
- High-Performance Backend: A microservices architecture featuring a Flask server for handling AI model inferences and a Spring Boot server for business logic, data management, and user interactions.
- Modern Frontend: A responsive and user-friendly web interface built with Vue 3, Vite, and Element Plus.
- Real-time Communication: Utilizes WebSocket for instant feedback during video processing and ECharts for rich data visualization of detection results.
- Scalable & Decoupled: The clear separation of frontend, business logic, and AI services allows for independent development, scaling, and maintenance.
- Frontend:
Vue 3,Vite,Element Plus,Axios,ECharts,Socket.io-client - Backend (Business Logic):
Java 1.8,Spring Boot,MyBatis-Plus,MySQL/MariaDB,Maven - Backend (AI Model):
Python,Flask,Ultralytics (YOLO),OpenCV,Flask-SocketIO
- Smart Agriculture: Assists farmers in quickly identifying crop diseases for timely intervention.
- Agricultural Research: Provides researchers with a tool for automated data collection and analysis of plant pathology.
- Educational Tool: Serves as a comprehensive full-stack project for developers to learn about integrating AI models with web applications.
Prerequisites:
Node.js>= 16.0Python>= 3.8Java>= 1.8MavenMySQLorMariaDB
Backend Setup (Spring Boot):
- Navigate to the
backenddirectory. - Create a database and import the
database/schema.sqlfile. - Modify the database connection settings in
src/main/resources/application.properties. - Run the application:
mvn spring-boot:run
Backend Setup (Flask AI):
- Navigate to the
inferencedirectory. - Install Python dependencies:
(Note: A
pip install -r requirements.txt
requirements.txtfile should be created with libraries likeultralytics,flask,opencv-python,requests,flask-socketio) - Download the pre-trained YOLO model weights (e.g.,
yolo11n.pt) and place them in theweightsfolder. - Run the AI service:
python main.py
Frontend Setup (Vue):
- Navigate to the
frontenddirectory. - Install dependencies:
npm install
- Start the development server:
npm run dev
- Access the application at the address provided (e.g.,
http://localhost:3000).
Contributions are welcome! Please feel free to submit a Pull Request or open an Issue to report bugs or suggest new features.
- Fork the repository.
- Create your feature branch (
git checkout -b feature/AmazingFeature). - Commit your changes (
git commit -m 'Add some AmazingFeature'). - Push to the branch (
git push origin feature/AmazingFeature). - Open a Pull Request.
This project is licensed under the MIT License. See the LICENSE file for details.