ComputerVisionF5 / Readme.md
Mariden's picture
Update Readme.md
26a93c1 verified
metadata
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

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)

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

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

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

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:

@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 πŸ€—