{"id":23089600,"url":"https://github.com/nullhawk/logo-detection","last_synced_at":"2025-10-07T13:58:51.344Z","repository":{"id":248593227,"uuid":"828753532","full_name":"nullHawk/logo-detection","owner":"nullHawk","description":"Coke and Pepsi logo detection ","archived":false,"fork":false,"pushed_at":"2024-07-15T19:38:29.000Z","size":13581,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T17:29:12.660Z","etag":null,"topics":["machine-learning","object-detection","pipeline"],"latest_commit_sha":null,"homepage":"https://huggingface.co/spaces/nullHawk/coke-pepsi-detection","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nullHawk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-15T04:10:12.000Z","updated_at":"2024-07-16T05:31:30.000Z","dependencies_parsed_at":"2024-07-16T01:24:28.480Z","dependency_job_id":null,"html_url":"https://github.com/nullHawk/logo-detection","commit_stats":null,"previous_names":["nullhawk/logo-detection"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nullHawk/logo-detection","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nullHawk%2Flogo-detection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nullHawk%2Flogo-detection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nullHawk%2Flogo-detection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nullHawk%2Flogo-detection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nullHawk","download_url":"https://codeload.github.com/nullHawk/logo-detection/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nullHawk%2Flogo-detection/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278786671,"owners_count":26045588,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["machine-learning","object-detection","pipeline"],"created_at":"2024-12-16T20:38:42.005Z","updated_at":"2025-10-07T13:58:51.293Z","avatar_url":"https://github.com/nullHawk.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Coke-Pepsi Logo Detection\n\nThis project aims to detect Pepsi and Coca-Cola logos in video files using the YOLOv8 object detection model. The pipeline extracts frames from the video, processes them using the YOLOv8 model, and outputs the timestamps of detected logos in a JSON format.\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Dependencies](#dependencies)\n\n## Installation\n\n### Setup the Codebase\n\n1. Clone the repository:\n\n    ```bash\n    git clone https://github.com/nullHawk/logo-detection\n    cd logo-detection\n    ```\n\n2. Install the dependencies using a virtual environment:\n\n    ```bash\n    python3 -m venv .venv\n    source .venv/bin/activate\n    pip install -r requirements.txt\n    ```\n\n\n## Usage\n\n### Run the Pipeline\n\nThe pipeline accepts a video file (MP4 format) and outputs a JSON file with the timestamps of detected Pepsi and Coca-Cola logos.\n\n1. Place your video file in the project directory.\n\n2. Run the pipeline:\n\n    ```bash\n    python main.py your_video_file.mp4\n    ```\n\n3. The output JSON file will be saved as `output.json` in the project directory.\n\n### Run using Gradio UI\n\n1. Run the following python script\n    ```bash\n    python app.py\n    ```\n2. Upload the video and click on sumbit button\n\n3. The output json will shown on the right side\n\n### Example Output\n\nThe output JSON format:\n\n```json\n{\n    \"Pepsi_pts\": [\n        \"00:01:23\",\n        \"00:02:34\",\n        \"00:03:45\"\n        // List of timestamps (HH:MM:SS) when Pepsi logos were detected\n    ],\n    \"CocaCola_pts\": [\n        \"00:05:12\",\n        \"00:07:20\",\n        \"00:08:45\"\n        // List of timestamps (HH:MM:SS) when CocaCola logos were detected\n    ],\n    \"Pepsi_details\": [\n        {\n            \"timestamp\": \"00:01:23\",\n            \"size\": {\n                \"width\": 50,\n                \"height\": 30\n            },\n            \"distance_from_center\": 15.3\n        }\n        // More Pepsi details\n    ],\n    \"CocaCola_details\": [\n        {\n            \"timestamp\": \"00:05:12\",\n            \"size\": {\n                \"width\": 60,\n                \"height\": 40\n            },\n            \"distance_from_center\": 10.0\n        }\n        // More CocaCola details\n    ]\n}\n```\n### Approach\n- **Extract Frames**: Using av library to extract frames from the video.\n- **YOLOv8 Detection**: Load the trained YOLOv8 model and run it on the extracted frames.\n- **Generate Output**: Collect timestamps of frames where logos are detected and save them in a JSON file.\n\n### Dependencies\n- Python 3.8+\n- av\n- ultralytics(YOLOv8)\n- gradio\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnullhawk%2Flogo-detection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnullhawk%2Flogo-detection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnullhawk%2Flogo-detection/lists"}