Giter Site home page Giter Site logo

brand_recognition's Introduction

Brand Recognition Tool

Project Demo


Overview

Welcome to the Brand Detection Tool repository! This computer vision project focuses on the detection of various commercial brands in videos. The goal is to develop an AI tool capable of identifying brands, extracting relevant information such as the label name, confidence percentage, duration on screen, and size.

The collected information is stored in a database, and a text file report is generated. This data is particularly useful in product placement campaigns to verify contractual conditions, conduct A/B tests, and assess the campaign's impact for further improvements.


Dataset

We have curated a dataset with over 1000 manually selected and labeled images. Subsequently, we trained the YOLOv8 model using this dataset for 200 epochs.


YOLOv8 Model

The YOLOv8 model demonstrates high precision in detecting brands in videos, even in varied positions, perspectives, or when the brand is partially visible, blurred, or in a small size. The model has been trained with our custom dataset, resulting in the 'best.pt' model file.


Project Structure

  • main.py: Execute this script to process a video using the retrained YOLOv8 model. It generates a new video with detections, a report named 'detections.txt,' and stores the data in the database.

  • model/: Folder containing YOLOv8 model-related files.

    • yolov8_training.ipynb: Google Colab notebook used for training the YOLOv8 model with our custom dataset.

    • best.pt: YOLOv8 model trained with our data and optimized weights.

    • predict_video.py: is a Python script designed as an alternative to main.py for scenarios where database interaction is not required. This script processes a specified video using the retrained YOLOv8 model, generating a new video with brand detections and a detailed report ('detections.txt'). It proves particularly useful for conducting tests and experiments without the need for database operations.

  • database/: Folder containing database-related scripts.

    • database.py: Script for managing the database.
    • brands_logos.sql: SQL file with the database table structure.

Getting Started

1. Clone the Repository: Begin by cloning this repository to your local machine:

https://github.com/PalomaGGC/Brand_Recognition.git
cd Brand_Recognition

2. Install Dependencies: Ensure you have the necessary dependencies installed by running:

pip install -r requirements.txt

3. Create a Videos Folder: Create a folder named "videos" and place the videos you want to process inside it. Currently, the tool detects Coca-Cola, HBO, and Renault.

4. Run the Tool: Execute main.py to process the videos, saving the results in the database, or run predict_video.py to process the videos without using the database.

5. Explore Results: Check the generated video, report (detections.txt), and database entries for valuable insights.

Feel free to reach out if you have any questions or suggestions! Happy brand detecting!

brand_recognition's People

Contributors

palomaggc avatar josequijado avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.