Edit model card

Model Card

Overview

Performance

  • Metrics: Accuracy (100%)
  • Dataset: Approximately 5,000 images of EPL team emblems, balanced across classes. Sources and preprocessing steps described in detail further below.

Data

  • Training data:
  • Potential biases: Currently unknown biases in the dataset.

Inference

Ethics

  • Potential biases: The model may inherit biases from the training data, such as over- or under-representation of certain team emblems.
  • Mitigation strategies: Further exploration of dataset biases and potential augmentation techniques to address them.
  • Ethical considerations:
    • Awareness of potential biases and limitations in the model's predictions.
    • Responsible use of the model, avoiding harmful generalizations or discrimination.
    • Respect for the rights and privacy of individuals and organizations associated with the EPL teams.

Top 5 EPL Teams' Emblem Identifier

A simple and well designed web app to identify the emblem of the top 5 teams of EPL(English Premier League) namely Arsenal, Chelsea, Liverpool, Manchester City and Manchester United.

Requirements

Table Of Contents

Introduction

A simple and well designed web app to identify the emblem of the top 5 teams of EPL. This model has been trained with a balanced dataset which contains almost 5k images of the emblems of the teams.

Model Architecture

The model utilizes a straightforward convolutional neural network (CNN) architecture, comprising the following layers:

  1. Convolutional Layer:

    • 32 filters, each of size 3x3
    • ReLU activation function
    • Input shape: 224x224x3 (RGB images)
    • Extracts spatial features from input images.
  2. Max Pooling Layer:

    • Pool size: 2x2
    • Reduces spatial dimensions for capturing more global features.
  3. Flattening Layer:

    • Flattens the 2D feature maps into a 1D vector for input to dense layers.
  4. Dense Layer 1:

    • 64 neurons
    • ReLU activation function
  5. Output Layer (Dense Layer 2):

    • 5 neurons (matching the number of classes)
    • Softmax activation to produce probability scores for each class.

Key Points:

  • Input image size: 224x224 pixels
  • Optimizer: Adam with a learning rate of 0.001
  • Loss function: Categorical crossentropy
  • Performance metric: Accuracy

Visual Representation: [Input image (224x224x3)] --> [Conv2D] --> [MaxPooling2D] --> [Flatten] --> [Dense 1] --> [Output Layer (Dense 2)] --> [Predicted class]

Prject Architecture

β”œβ”€β”€  data
β”‚    └── arsenal  - images of arsenal's emblem.
β”‚    └── chelsea  - images of chelsea's emblem.
β”‚    └── liverpool  - images of liverpool's emblem.
β”‚    └── manchester-city  - images of manchester-city's emblem.
β”‚    └── manchester-united  - images of united's emblem.
β”‚
β”‚
β”œβ”€β”€  model  
β”‚    └── football_logo_model.h5  - generated model.
β”‚ 
β”‚
β”œβ”€β”€  src
β”‚    └── classify
β”‚        └── classify.py  - this module classifies the emblem from input image.
β”‚    └── train
β”‚        └── trainer.py  - this module trains the model.
β”‚
β”‚
β”œβ”€β”€  app.py - this module starts the app interface.
β”‚
β”‚
β”œβ”€β”€  LICENSE - license file of this project.
β”‚
β”‚
β”œβ”€β”€  README.md - readme file of this project.
β”‚
β”‚
β”œβ”€β”€  requirements.txt - list of required packages.

How To Run

First, install dependencies

# clone project   
git clone https://huggingface.co/spaces/alifalhasan/epl-top5-emblem-classifier

# install project   
cd epl-top5-emblem-classifier 
pip install -r requirements.txt

Next, download the dataset from here. First unzip the folder. dataset folder contains five more folders. Copy them and paste into the data directory of this project folder.

Now train the model using this command:

python src/train/trainer.py    

Finally, deploy the model using this command:

python app.py    

License

Distributed under the MIT License. See LICENSE for more information.

Contributor

Alif Al Hasan - @alifalhasan - alif.stu2017@juniv.edu

Project Link: https://huggingface.co/spaces/alifalhasan/epl-top5-emblem-classifier

Downloads last month
8
Inference API (serverless) does not yet support tf-keras models for this pipeline type.