jerrychen76/fruit-ripeness-recognition
0
Fruit Ripeness Recognition
This Space is a fruit ripeness recognition demo built with a trained YOLO model. Users can upload an image, and the system will detect the fruit and predict its ripeness level with annotated output.
Overview
This project recognizes 5 types of fruits, and each fruit is divided into 3 ripeness levels:
- Unripe
- Ripe
- Overripe
That gives a total of 15 classes.
Fruit Categories
The model supports the following fruits:
- Orange
- Apple
- Mango
- Banana
- Tomato
Classes
The 15 classes in this project are:
- orange_unripe
- orange_ripe
- orange_overripe
- apple_unripe
- apple_ripe
- apple_overripe
- mango_unripe
- mango_ripe
- mango_overripe
- banana_unripe
- banana_ripe
- banana_overripe
- tomato_unripe
- tomato_ripe
- tomato_overripe
Features
- Upload an input image
- Detect fruits in the image
- Predict ripeness level for each detected fruit
- Return an annotated output image with bounding boxes and labels
- Display performance information such as inference time and FPS
Input
- One fruit image uploaded by the user
Output
- Annotated image with detection boxes
- Predicted fruit type
- Predicted ripeness level
- Inference time
- Total processing time
- FPS
Model
This demo uses a trained YOLO model stored as:
best.pt
Project Files
app.py— Gradio application for inferencerequirements.txt— required Python packagesbest.pt— trained model weightsREADME.md— project description for Hugging Face Space
Example Tasks
This model can help with tasks such as:
- Fruit ripeness inspection
- Agricultural product monitoring
- Smart food sorting
- Computer vision demonstration for ripeness classification
Notes
- This Space runs on Hugging Face Spaces.
- Performance may be slower on free CPU hardware.
- The displayed FPS depends on the current deployment environment.
Usage
- Upload a fruit image.
- Wait for the model to process the image.
- View the annotated result with fruit type and ripeness level.
