Team Ai
Modelpublic

Mariden/ComputerVisionF5

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes13downloads
Readme.md280 linesDownload Raw Back to root
1---2license: apache-2.03base_model: ultralytics/yolov8m4tags:5- computer-vision6- object-detection7- yolov88- logo-detection9- ultralytics10- roboflow11pipeline_tag: object-detection12library_name: ultralytics13datasets:14- roboflow15---16 17# Logo Detection Model - ComputerVisionF518 19This 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.20 21## Model Details22 23### Model Description24 25This 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.26 27- **Developed by:** Mariden28- **Model type:** Object Detection (Logo Recognition)29- **License:** Apache-2.0  30- **Base model:** ultralytics/yolov8m31- **Dataset:** Custom dataset created with Roboflow32- **Classes:** 6 logo categories33 34### Model Sources35 36- **Repository:** https://huggingface.co/Mariden/ComputerVisionF537- **Base Model:** https://github.com/ultralytics/ultralytics38- **Dataset Platform:** https://roboflow.com39 40## Uses41 42### Direct Use43 44The model is designed for:45- **Brand monitoring** and recognition systems46- **Content analysis** and automated tagging47- **Marketing analytics** and logo tracking48- **Educational projects** for computer vision49 50### Downstream Use51 52Can be integrated into:53- Brand monitoring and social media analysis tools54- Content management and digital asset systems  55- Marketing analytics dashboards56- Automated image classification pipelines57- Real-time logo detection applications58 59### Out-of-Scope Use60 61- General object detection (optimized specifically for these 6 logos)62- Real-time video processing without adequate hardware63- Detection of logos not present in the training dataset64- Commercial use without proper attribution65 66## How to Get Started with the Model67 68### Using Hugging Face Transformers (Recommended)69 70```python71from transformers import pipeline72from PIL import Image73 74# Load the detection pipeline75detector = pipeline("object-detection", model="Mariden/ComputerVisionF5")76 77# Load and process an image78image = Image.open("path/to/your/image.jpg")79results = detector(image)80 81# Display results82for result in results:83    print(f"Logo: {result['label']}")84    print(f"Confidence: {result['score']:.3f}")85    print(f"Bounding box: {result['box']}")86    print("---")87```88 89### Using Ultralytics YOLO90 91```python92from ultralytics import YOLO93from PIL import Image94 95# Load the model96model = YOLO('Mariden/ComputerVisionF5')97 98# Run inference99results = model("path/to/your/image.jpg")100 101# Display results102results[0].show()103 104# Get detailed predictions105for result in results:106    boxes = result.boxes107    for box in boxes:108        class_name = model.names[int(box.cls)]109        confidence = box.conf.item()110        print(f"Detected: {class_name} ({confidence:.3f})")111```112 113### Using Inference API114 115```python116import requests117from PIL import Image118import io119 120API_URL = "https://api-inference.huggingface.co/models/Mariden/ComputerVisionF5"121headers = {"Authorization": "Bearer YOUR_HF_TOKEN"}122 123def detect_logos(image_path):124    # Load and prepare image125    with open(image_path, "rb") as f:126        data = f.read()127    128    # Make API request129    response = requests.post(API_URL, headers=headers, data=data)130    return response.json()131 132# Use the function133results = detect_logos("path/to/your/image.jpg")134print(results)135```136 137### Batch Processing138 139```python140from transformers import pipeline141import os142 143detector = pipeline("object-detection", model="Mariden/ComputerVisionF5")144 145def process_images_folder(folder_path):146    results = {}147    for filename in os.listdir(folder_path):148        if filename.lower().endswith(('.png', '.jpg', '.jpeg')):149            image_path = os.path.join(folder_path, filename)150            detections = detector(image_path)151            results[filename] = detections152    return results153 154# Process all images in a folder155batch_results = process_images_folder("path/to/images/")156```157 158## Detected Logo Classes159 160| Class ID | Logo Name | Description |161|----------|-----------|-------------|162| 0 | **F5** | Technology and networking company |163| 1 | **Factoria** | Educational technology institution |  164| 2 | **FemCoders** | Women in tech coding bootcamp |165| 3 | **Fundacion Orange** | Digital inclusion foundation |166| 4 | **Microsoft** | Global technology corporation |167| 5 | **SomosF5** | Educational platform and community |168 169## Model Performance170 171### Key Features172- **Input Size:** 640x640 pixels (automatically resized)173- **Output:** Bounding boxes with confidence scores174- **Multi-detection:** Can detect multiple logos in single image175- **Real-time capable:** Optimized for fast inference176- **Format Support:** JPEG, PNG, WebP, and other common formats177 178### Usage Tips1791. **Image Quality:** Works best with clear, well-lit images1802. **Logo Size:** Optimal performance with logos >32x32 pixels1813. **Confidence Threshold:** Default 0.5, adjust based on use case1824. **Multiple Logos:** Efficiently handles multiple logo detections1835. **Aspect Ratios:** Automatically handles different image proportions184 185## Training Details186 187### Training Data188- **Source:** Custom dataset created using Roboflow platform189- **Annotation:** Manual bounding box annotation for all 6 logo classes190- **Augmentation:** Applied through Roboflow (rotation, scaling, brightness, etc.)191- **Quality Control:** Manually reviewed and validated annotations192 193### Training Process194- **Base Model:** YOLOv8m pretrained on COCO dataset  195- **Fine-tuning:** Transfer learning on custom logo dataset196- **Framework:** Ultralytics YOLOv8 training pipeline197- **Optimization:** Mixed precision training for efficiency198 199### Technical Specifications200 201#### Architecture202- **Model:** YOLOv8m (Medium variant)203- **Backbone:** CSPDarknet with PANet neck204- **Head:** YOLO detection head with anchor-free design205- **Parameters:** ~25M parameters206- **Input:** RGB images, 640x640 resolution207- **Output:** Bounding boxes, class probabilities, confidence scores208 209#### Performance Characteristics210- **Speed:** ~50-100 FPS on GPU (depending on hardware)211- **Memory:** ~4GB VRAM for inference212- **Formats:** PyTorch (.pt), ONNX (.onnx) available213- **Deployment:** CPU/GPU compatible214 215## Model Formats and Files216 217### Available Formats218- **PyTorch:** `pytorch_model.bin` - Main format for Hugging Face integration219- **ONNX:** `model.onnx` - Optimized for cross-platform deployment220- **Config:** `config.json` - Model configuration and class mappings221- **Preprocessor:** `preprocessor_config.json` - Image preprocessing parameters222 223### File Structure224```225Mariden/ComputerVisionF5/226├── model.pt                   # Main PyTorch model227├── model.onnx                 # ONNX optimized version  228├── config.json                # Model configuration229├── preprocessor_config.json   # Image preprocessing config230└── README.md                  # This documentation231```232 233## Limitations and Considerations234 235### Current Limitations236- **Scope:** Only detects the specific 6 trained logo classes237- **Variations:** Performance may vary with logo design changes238- **Size Constraints:** Very small logos (<32px) may not be detected reliably239- **Occlusion:** Partially hidden logos might be missed240- **Lighting:** Extreme lighting conditions may affect accuracy241 242### Best Practices243- Use high-resolution images when possible244- Ensure good lighting and contrast245- Avoid heavily compressed images246- Test confidence thresholds for your specific use case247- Consider image preprocessing for challenging conditions248 249## Ethical Considerations250 251This model is designed for educational and research purposes. When using for commercial applications:252- Ensure proper licensing and attribution253- Respect trademark and copyright policies254- Consider privacy implications when processing user-generated content255- Use responsibly for brand monitoring and analysis256 257## Citation and Attribution258 259If you use this model in your research or applications, please cite:260 261```bibtex262@model{mariden2024logodetection,263  title={Logo Detection Model - ComputerVisionF5},264  author={Mariden},265  year={2024},266  publisher={Hugging Face},267  journal={Hugging Face Model Hub},268  howpublished={\url{https://huggingface.co/Mariden/ComputerVisionF5}}269}270```271 272## Support and Contact273 274- **Issues:** Please report issues in the Hugging Face model repository275- **Questions:** Use the Community tab for questions and discussions276- **Updates:** Follow the repository for model updates and improvements277 278---279 280**License:** Apache-2.0 | **Framework:** Ultralytics YOLOv8 | **Platform:** Hugging Face 🤗