File size: 8,759 Bytes
dad9379 26a93c1 dad9379 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 |
---
license: apache-2.0
base_model: ultralytics/yolov8m
tags:
- computer-vision
- object-detection
- yolov8
- logo-detection
- ultralytics
- roboflow
pipeline_tag: object-detection
library_name: ultralytics
datasets:
- roboflow
---
# Logo Detection Model - ComputerVisionF5
This model detects and localizes 6 specific logos in images: **F5**, **Factoria**, **FemCoders**, **Fundacion Orange**, **Microsoft**, and **SomosF5**. Built on YOLOv8m architecture for real-time object detection with high accuracy.
## Model Details
### Model Description
This is a fine-tuned YOLOv8m model specialized for logo detection and recognition. The model can identify and locate 6 different organizational logos within images, providing bounding boxes with confidence scores for each detection.
- **Developed by:** Mariden
- **Model type:** Object Detection (Logo Recognition)
- **License:** Apache-2.0
- **Base model:** ultralytics/yolov8m
- **Dataset:** Custom dataset created with Roboflow
- **Classes:** 6 logo categories
### Model Sources
- **Repository:** https://huggingface.co/Mariden/ComputerVisionF5
- **Base Model:** https://github.com/ultralytics/ultralytics
- **Dataset Platform:** https://roboflow.com
## Uses
### Direct Use
The model is designed for:
- **Brand monitoring** and recognition systems
- **Content analysis** and automated tagging
- **Marketing analytics** and logo tracking
- **Educational projects** for computer vision
### Downstream Use
Can be integrated into:
- Brand monitoring and social media analysis tools
- Content management and digital asset systems
- Marketing analytics dashboards
- Automated image classification pipelines
- Real-time logo detection applications
### Out-of-Scope Use
- General object detection (optimized specifically for these 6 logos)
- Real-time video processing without adequate hardware
- Detection of logos not present in the training dataset
- Commercial use without proper attribution
## How to Get Started with the Model
### Using Hugging Face Transformers (Recommended)
```python
from transformers import pipeline
from PIL import Image
# Load the detection pipeline
detector = pipeline("object-detection", model="Mariden/ComputerVisionF5")
# Load and process an image
image = Image.open("path/to/your/image.jpg")
results = detector(image)
# Display results
for result in results:
print(f"Logo: {result['label']}")
print(f"Confidence: {result['score']:.3f}")
print(f"Bounding box: {result['box']}")
print("---")
```
### Using Ultralytics YOLO
```python
from ultralytics import YOLO
from PIL import Image
# Load the model
model = YOLO('Mariden/ComputerVisionF5')
# Run inference
results = model("path/to/your/image.jpg")
# Display results
results[0].show()
# Get detailed predictions
for result in results:
boxes = result.boxes
for box in boxes:
class_name = model.names[int(box.cls)]
confidence = box.conf.item()
print(f"Detected: {class_name} ({confidence:.3f})")
```
### Using Inference API
```python
import requests
from PIL import Image
import io
API_URL = "https://api-inference.huggingface.co/models/Mariden/ComputerVisionF5"
headers = {"Authorization": "Bearer YOUR_HF_TOKEN"}
def detect_logos(image_path):
# Load and prepare image
with open(image_path, "rb") as f:
data = f.read()
# Make API request
response = requests.post(API_URL, headers=headers, data=data)
return response.json()
# Use the function
results = detect_logos("path/to/your/image.jpg")
print(results)
```
### Batch Processing
```python
from transformers import pipeline
import os
detector = pipeline("object-detection", model="Mariden/ComputerVisionF5")
def process_images_folder(folder_path):
results = {}
for filename in os.listdir(folder_path):
if filename.lower().endswith(('.png', '.jpg', '.jpeg')):
image_path = os.path.join(folder_path, filename)
detections = detector(image_path)
results[filename] = detections
return results
# Process all images in a folder
batch_results = process_images_folder("path/to/images/")
```
## Detected Logo Classes
| Class ID | Logo Name | Description |
|----------|-----------|-------------|
| 0 | **F5** | Technology and networking company |
| 1 | **Factoria** | Educational technology institution |
| 2 | **FemCoders** | Women in tech coding bootcamp |
| 3 | **Fundacion Orange** | Digital inclusion foundation |
| 4 | **Microsoft** | Global technology corporation |
| 5 | **SomosF5** | Educational platform and community |
## Model Performance
### Key Features
- **Input Size:** 640x640 pixels (automatically resized)
- **Output:** Bounding boxes with confidence scores
- **Multi-detection:** Can detect multiple logos in single image
- **Real-time capable:** Optimized for fast inference
- **Format Support:** JPEG, PNG, WebP, and other common formats
### Usage Tips
1. **Image Quality:** Works best with clear, well-lit images
2. **Logo Size:** Optimal performance with logos >32x32 pixels
3. **Confidence Threshold:** Default 0.5, adjust based on use case
4. **Multiple Logos:** Efficiently handles multiple logo detections
5. **Aspect Ratios:** Automatically handles different image proportions
## Training Details
### Training Data
- **Source:** Custom dataset created using Roboflow platform
- **Annotation:** Manual bounding box annotation for all 6 logo classes
- **Augmentation:** Applied through Roboflow (rotation, scaling, brightness, etc.)
- **Quality Control:** Manually reviewed and validated annotations
### Training Process
- **Base Model:** YOLOv8m pretrained on COCO dataset
- **Fine-tuning:** Transfer learning on custom logo dataset
- **Framework:** Ultralytics YOLOv8 training pipeline
- **Optimization:** Mixed precision training for efficiency
### Technical Specifications
#### Architecture
- **Model:** YOLOv8m (Medium variant)
- **Backbone:** CSPDarknet with PANet neck
- **Head:** YOLO detection head with anchor-free design
- **Parameters:** ~25M parameters
- **Input:** RGB images, 640x640 resolution
- **Output:** Bounding boxes, class probabilities, confidence scores
#### Performance Characteristics
- **Speed:** ~50-100 FPS on GPU (depending on hardware)
- **Memory:** ~4GB VRAM for inference
- **Formats:** PyTorch (.pt), ONNX (.onnx) available
- **Deployment:** CPU/GPU compatible
## Model Formats and Files
### Available Formats
- **PyTorch:** `pytorch_model.bin` - Main format for Hugging Face integration
- **ONNX:** `model.onnx` - Optimized for cross-platform deployment
- **Config:** `config.json` - Model configuration and class mappings
- **Preprocessor:** `preprocessor_config.json` - Image preprocessing parameters
### File Structure
```
Mariden/ComputerVisionF5/
βββ model.pt # Main PyTorch model
βββ model.onnx # ONNX optimized version
βββ config.json # Model configuration
βββ preprocessor_config.json # Image preprocessing config
βββ README.md # This documentation
```
## Limitations and Considerations
### Current Limitations
- **Scope:** Only detects the specific 6 trained logo classes
- **Variations:** Performance may vary with logo design changes
- **Size Constraints:** Very small logos (<32px) may not be detected reliably
- **Occlusion:** Partially hidden logos might be missed
- **Lighting:** Extreme lighting conditions may affect accuracy
### Best Practices
- Use high-resolution images when possible
- Ensure good lighting and contrast
- Avoid heavily compressed images
- Test confidence thresholds for your specific use case
- Consider image preprocessing for challenging conditions
## Ethical Considerations
This model is designed for educational and research purposes. When using for commercial applications:
- Ensure proper licensing and attribution
- Respect trademark and copyright policies
- Consider privacy implications when processing user-generated content
- Use responsibly for brand monitoring and analysis
## Citation and Attribution
If you use this model in your research or applications, please cite:
```bibtex
@model{mariden2024logodetection,
title={Logo Detection Model - ComputerVisionF5},
author={Mariden},
year={2024},
publisher={Hugging Face},
journal={Hugging Face Model Hub},
howpublished={\url{https://huggingface.co/Mariden/ComputerVisionF5}}
}
```
## Support and Contact
- **Issues:** Please report issues in the Hugging Face model repository
- **Questions:** Use the Community tab for questions and discussions
- **Updates:** Follow the repository for model updates and improvements
---
**License:** Apache-2.0 | **Framework:** Ultralytics YOLOv8 | **Platform:** Hugging Face π€ |