Sweet Pepper Segmentation & Classification
Multi-algorithm ML pipeline for pepper detection comparing LogReg, KNN, SVM, GMM, and Gradient Boosting approaches.

Gallery


Problem
Automated detection and classification of sweet peppers in images requires robust segmentation that handles varying lighting, occlusion, and color variations (red vs yellow peppers).
Approach
Implemented and compared multiple ML approaches: custom logistic regression with gradient descent, KNN (k=3), SVM with RBF kernel and grid search, Gaussian Mixture Models, and Histogram Gradient Boosting with PCA. Evaluated different color spaces (RGB, LAB, HSV) and feature extractors (LBP texture features).
Data
Sweet pepper images with pixel-level ground truth masks for training and validation.
Validation
Precision-recall curves, F1 scores, and visual segmentation quality assessment. LAB color space consistently outperformed RGB for segmentation tasks.
Results
Best segmentation: KNN with LAB features (fast training, high precision). Best classification: SVM with HSV+LBP features. Modular codebase with reusable utility libraries.
My Role
Sole developer. Implemented all algorithms, ran hyperparameter optimization, wrote evaluation framework.
Next Steps
Deep learning comparison (U-Net); real-time inference optimization; extend to other crop species.
Key Outcomes
- 6 ML algorithm implementations
- Systematic color space comparison
- Reusable ML utility libraries