This project aims to enhance the performance of the YOLOv11 object detection model by modifying input image properties (e.g., saturation, hue, brightness) based on confidence and IoU scores. The approach leverages Support Vector Machine (SVM) to optimize image adjustments, improving the overall model scores.
- Utilizes YOLOv11 for object detection.
- Extracts confidence and IoU scores for analysis.
- Implements an SVM-based model to optimize image parameters such as:
- Saturation
- Hue
- Brightness
- Contrast
- Dynamically adjusts image properties to achieve better detection scores.
- Python 3.8
- CUDA-compatible GPU (recommended)
- Installed dependencies (e.g.,
ultralytics
,torch
,scikit-learn
)
-
Clone the repository:
git clone https://github.com/yourusername/yolo-confidence-enhancement.git cd yolo-confidence-enhancement
-
Install required dependencies:
pip install -r requirements.txt
-
Verify CUDA setup for faster computations:
import torch print(torch.cuda.is_available())
-
Prepare Dataset: Ensure you have a labeled dataset for YOLOv11 object detection.
-
Run YOLO Inference: Use YOLOv11 to extract confidence and IoU scores for the images in the dataset.
-
Train SVM: Train the SVM model using the extracted scores and image properties to learn the optimal modifications.
from sklearn.svm import SVR svr = SVR(kernel='rbf') svr.fit(X_train, y_train) # X_train: image properties, y_train: model scores
- Test the enhanced images with YOLOv11 and observe improved confidence and IoU scores.
- Analyze the results using metrics such as mAP (mean Average Precision).
- Extend the model to other YOLO versions (e.g., YOLOv5, YOLOv8).
- Explore other machine learning techniques for image optimization.
Contributions are welcome! Please open an issue or submit a pull request for any feature suggestions or bug fixes.
- YOLO by Ultralytics
- Scikit-learn for SVM implementation.
- OpenCV and PIL for image processing.