NutriRipe AI is an automated system designed to detect nuts in images and classify their ripeness levels. Using a combination of YOLOv8 for precise object detection and MobileNet for accurate classification, the system identifies whether nuts are Raw, Semi-Ripe, or Ripe, providing a harvest-readiness verdict.
- Object Detection: Uses YOLOv8 to locate nuts within complex images.
- Background Removal: Employs GrabCut to isolate nuts for better classification.
- Ripeness Classification: Classifies each detected nut into one of three categories (Raw, Semi-Ripe, Ripe).
- Interactive Dashboard: A modern React-based frontend for uploading images and viewing real-time results.
- Harvest Verdict: Automatically determines if a crop is ready for harvest based on the majority ripeness.
- Navigate to the repository: https://github.com/Riwasthapa/Detection_nuts
- Click the green Code button.
- Select Download ZIP.
- Extract the ZIP file to a folder on your computer.
Follow these steps to get the system running locally.
- Python 3.10 or higher
- Node.js (with npm)
- A virtual environment (recommended)
- Open your terminal and navigate to the backend directory:
cd nutripe-ai-backend - (Optional) Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
- Install the required Python packages:
pip install flask flask-cors opencv-python numpy ultralytics torch torchvision
- Run the Flask server:
The backend will start at
python app.py
http://127.0.0.1:5000.
- Open a new terminal window and navigate to the frontend directory:
cd react-frontend - Install the Node dependencies:
npm install
- Start the development server:
The frontend will be available at the URL shown in your terminal (usually
npm run dev
http://localhost:5173).
- Open the frontend URL in your browser.
- Upload an image of nuts.
- Wait for the processing to complete.
- View the detected nuts, their ripeness breakdown, and the final harvest verdict.