This repo contains code for the assignment.
Approach doc link :- link
Assuming you have Python installed in your system. If not use
For Linux:-
sudo apt install python3For Mac:-
brew install pythonFor Windows
choco install pythonAfter installation:-
-
Clone this repository:
git clone https://github.com/siddham-jain/logo-detection-model cd logo-detection-model -
Create a virtual environment and install the dependencies
python3 -m venv <your_env_name> source <your_env_name>/bin/activate pip install -r requirements.txt
- Run the pipeline using
python3 main.py <path_to_your_video_file>- Output file will be generated as
output.jsonin the directory
{
"Pepsi_pts": [
{
"timestamp": 0.2,
"distance_from_center": 193.478,
"size": {
"width": 79.146,
"height": 75.144
}
// rest of the detected frames
],
"CocaCola_pts": [
{
"timestamp": 0.2,
"distance_from_center": 180.646,
"size": {
"width": 89.274,
"height": 252.274
}
},
// rest of the detected frames
]
}If your IDE is crashing while trying to run this script try trimming your video according to your system requirements