YOLO Overlay Detection Model - Optimized
This model was trained to detect and segment overlay elements in images/videos using YOLOv8 segmentation with optimized hyperparameters.
Model Details
- Model Type: YOLOv8 Instance Segmentation
- Architecture: auto
- Framework: Ultralytics YOLO
- Training Date: 2025-11-07
- Task: Instance Segmentation
- Classes: Overlay elements
- Image Size: 800px (optimized for detail)
Performance Metrics
| Metric | Value |
|---|---|
| Box [email protected] | 0.9038 |
| Box [email protected]:0.95 | 0.7171 |
| Mask [email protected] | 0.3981 |
| Mask [email protected]:0.95 | 0.1520 |
Key Optimizations
This model includes several optimizations over the baseline:
- โ Mosaic Augmentation enabled (1.0) - Critical for YOLO performance
- โ Copy-Paste Augmentation (0.3) - Essential for segmentation tasks
- โ Larger Image Size (800px) - Better detail capture
- โ Cosine LR Scheduler - Smoother convergence
- โ Multi-Scale Training - Better scale invariance
- โ Enhanced Augmentations - Rotation (10ยฐ), Scale (0.5), Perspective
- โ Optimized Batch Size (32) - Better gradient estimates on dual GPUs
Usage
Installation
pip install ultralytics
Inference
from ultralytics import YOLO
from huggingface_hub import hf_hub_download
# Download model
model_path = hf_hub_download(
repo_id="farazv2/overlay-model-yolo",
filename="best.pt"
)
# Load model
model = YOLO(model_path)
# Run inference
results = model('image.jpg')
# Process results
for result in results:
boxes = result.boxes # Bounding boxes
masks = result.masks # Segmentation masks
# Visualize
result.show()
# Save
result.save('output.jpg')
Batch Inference
# Process multiple images
results = model(['image1.jpg', 'image2.jpg', 'image3.jpg'])
# Process video
results = model('video.mp4', save=True)
Training Configuration
| Parameter | Value | Notes |
|---|---|---|
| Epochs | 10 | |
| Image Size | 800 | Increased from 640 |
| Batch Size | 16 | Optimized for dual T4 |
| Optimizer | AdamW | |
| Initial LR | 0.0005 | With cosine scheduler |
| Mosaic | 1.0 | Re-enabled (critical!) |
| Copy-Paste | 0.3 | New addition |
| Multi-Scale | True | Enabled |
| Mixed Precision | True | Enabled |
| Patience | 25 |
Model Export
The model can be exported to various formats:
from ultralytics import YOLO
model = YOLO('best.pt')
# Export to ONNX
model.export(format='onnx')
# Export to TensorRT
model.export(format='engine')
# Export to CoreML
model.export(format='coreml')
Citation
If you use this model, please cite:
@software{overlay_yolo_model,
author = {farazv2},
title = {YOLO Overlay Detection Model - Optimized},
year = {2025},
publisher = {HuggingFace},
url = {https://huggingface.co/farazv2/overlay-model-yolo}
}
License
This model is released under the AGPL-3.0 license, following Ultralytics YOLOv8 licensing.
Acknowledgments
- Built with Ultralytics YOLOv8
- Trained on Kaggle with GPU acceleration
- Optimized with best practices for segmentation tasks
- Downloads last month
- 3
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
๐
Ask for provider support