An advanced computer vision system that analyzes banana ripeness using multiple image processing techniques and machine learning algorithms.
-
Multi-Stage Analysis
- Color Analysis (HSV & LAB Color Spaces)
- Texture Analysis (SIFT Features)
- Shape Analysis (Contour Detection)
- Segmentation (Watershed Algorithm)
-
Comprehensive Visualization
- Original Image Processing
- Edge Detection Results
- Feature Point Mapping
- Contour Visualization
- Ripeness Distribution Charts
-
Advanced Detection
- Three-stage ripeness classification
- Percentage-based analysis
- Confidence scoring
- Dark spot detection
opencv-python>=4.5.0
numpy>=1.19.0
scikit-learn>=0.24.0
matplotlib>=3.3.0
- Clone the repository:
git clone https://github.com/notsuperganang/Banana-Ripeness-Detection
cd banana-ripeness-detection
- Create and activate virtual environment (optional but recommended):
python -m venv venv
source venv/bin/activate # Linux/Mac
.\venv\Scripts\activate # Windows
- Install dependencies:
pip install -r requirements.txt
from banana_detector import BananaRipenessDetector
# Initialize detector
detector = BananaRipenessDetector()
# Analyze image
results = detector.detect_ripeness('path/to/banana.jpg')
# Visualize results
detector.visualize_results('path/to/banana.jpg', results)
We provide a comprehensive Jupyter notebook demonstrating the system's capabilities:
jupyter notebook Banana_Ripeness_Analysis.ipynb
Results:
Ripeness Level: Ripe
Percentages:
- Unripe: 5.97%
- Ripe: 19.07%
- Overripe: 8.42%
- Unripe: H(25-35), S(50-255), V(50-255)
- Ripe: H(20-30), S(100-255), V(100-255)
- Overripe: H(0-20), S(50-255), V(20-255)
- Image Preprocessing
- Edge Detection
- Feature Extraction
- Segmentation
- Ripeness Analysis
- Visualization
banana-ripeness-detection/
βββ examples/
β βββ input/
| | βββ pisang.jpg
β βββ results/
| βββ output.png
βββ notebooks/
β βββ Banana_Ripeness_Analysis.ipynb
βββ requirements.txt
βββ LICENSE
βββ README.md
Contributions are welcome! Please feel free to submit a Pull Request.
- 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.
- Computer Vision course at Syiah Kuala University
- OpenCV documentation and community
- scikit-learn documentation and community
Ganang Setyo Hadi - @notsuperganang - ganangsetyohadi@gmail.com
Project Link: https://github.com/notsuperganang/Banana-Ripeness-Detection
If you use this project in your research, please cite:
@software{banana_ripeness_detection,
author = {Ganang Setyo Hadi},
title = {Banana Ripeness Detection System},
year = {2024},
url = {https://github.com/notsuperganang/Banana-Ripeness-Detection}
}
Made with β€οΈ for π