title: Arabic2English
colorFrom: blue
colorTo: purple
sdk: gradio
license: mit
language:
- en
- ar
pipeline_tag: translation
metrics:
- accuracy
library_name: transformers
Model Card
Overview
- Model name: Arabic2English Translation
- Model description: Translates between Arabic and English.
- Authors: Alif Al Hasan
- Repository link: https://huggingface.co/spaces/alifalhasan/arabic2english/tree/main
- License: MIT
- Contact information: [email protected]
Arabic2English Translation
A simple and well designed web app to translate between Arabic and English.
Requirements
- gradio
- torch>=1.6
- torchtext==0.6
- transformers
- nltk
- pandas
- spacy
- https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.7.1/en_core_web_sm-3.7.1-py3-none-any.whl
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:
Convolutional Layer:
- 32 filters, each of size 3x3
- ReLU activation function
- Input shape: 224x224x3 (RGB images)
- Extracts spatial features from input images.
Max Pooling Layer:
- Pool size: 2x2
- Reduces spatial dimensions for capturing more global features.
Flattening Layer:
- Flattens the 2D feature maps into a 1D vector for input to dense layers.
Dense Layer 1:
- 64 neurons
- ReLU activation function
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 - [email protected]
Project Link: https://huggingface.co/spaces/alifalhasan/epl-top5-emblem-classifier