Alif Al Hasan commited on
Commit
b3c1899
β€’
1 Parent(s): 1424103

[Task] Add README

Browse files

[Description] Added readme file and performed some minor fixes.
[Author]

@alifalhasan

.github/workflows/cml.yml DELETED
File without changes
Makefile DELETED
@@ -1,13 +0,0 @@
1
- PROJECT = "Deep Learning Project 1"
2
- AUTHOR = "Alif Al Hasan"
3
- RELEASE = "0.0.1"
4
-
5
- .SILENT:
6
- .ONESHELL:
7
-
8
- docs:
9
- echo "Generating docs..." && \
10
- cd docs && \
11
- sphinx-quickstart -q -p ${PROJECT} -a ${AUTHOR} -r ${RELEASE} --ext-viewcode --ext-todo --ext-autodoc
12
-
13
- .PHONY: docs
 
 
 
 
 
 
 
 
 
 
 
 
 
 
README.md CHANGED
@@ -10,4 +10,126 @@ pinned: false
10
  license: mit
11
  ---
12
 
13
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  license: mit
11
  ---
12
 
13
+ # Top 5 EPL Teams' Emblem Identifier
14
+ 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**.
15
+
16
+
17
+ ### Requirements
18
+ - [Python 3.11](https://python.org/)
19
+ - [NumPy](https://numpy.org/)
20
+ - [SciPy](https://scipy.org/)
21
+ - [Gradio](https://www.gradio.app/)
22
+ - [Tensorflow](https://tensorflow.org/)
23
+
24
+
25
+ ### Table Of Contents
26
+ - [Introduction](#introduction)
27
+ - [Model Architecture](#model-architecture)
28
+ - [Project Architecture](#project-architecture)
29
+ - [How To Run](#how-to-run)
30
+ - [License](#license)
31
+ - [Contributor](#contributor)
32
+
33
+
34
+ ### Introduction
35
+ 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.
36
+
37
+
38
+ ### Model Architecture
39
+ The model utilizes a straightforward convolutional neural network (CNN) architecture, comprising the following layers:
40
+
41
+ 1. **Convolutional Layer:**
42
+ - 32 filters, each of size 3x3
43
+ - ReLU activation function
44
+ - Input shape: 224x224x3 (RGB images)
45
+ - Extracts spatial features from input images.
46
+
47
+ 2. **Max Pooling Layer:**
48
+ - Pool size: 2x2
49
+ - Reduces spatial dimensions for capturing more global features.
50
+
51
+ 3. **Flattening Layer:**
52
+ - Flattens the 2D feature maps into a 1D vector for input to dense layers.
53
+
54
+ 4. **Dense Layer 1:**
55
+ - 64 neurons
56
+ - ReLU activation function
57
+
58
+ 5. **Output Layer (Dense Layer 2):**
59
+ - 5 neurons (matching the number of classes)
60
+ - Softmax activation to produce probability scores for each class.
61
+
62
+ **Key Points:**
63
+ - Input image size: 224x224 pixels
64
+ - Optimizer: Adam with a learning rate of 0.001
65
+ - Loss function: Categorical crossentropy
66
+ - Performance metric: Accuracy
67
+
68
+ **Visual Representation:**
69
+ [Input image (224x224x3)] --> [Conv2D] --> [MaxPooling2D] --> [Flatten] --> [Dense 1] --> [Output Layer (Dense 2)] --> [Predicted class]
70
+
71
+
72
+ ### Prject Architecture
73
+ ```
74
+ β”œβ”€β”€ data
75
+ β”‚ └── arsenal - images of arsenal's emblem.
76
+ β”‚ └── chelsea - images of chelsea's emblem.
77
+ β”‚ └── liverpool - images of liverpool's emblem.
78
+ β”‚ └── manchester-city - images of manchester-city's emblem.
79
+ β”‚ └── manchester-united - images of united's emblem.
80
+ β”‚
81
+ β”‚
82
+ β”œβ”€β”€ model
83
+ β”‚ └── football_logo_model.h5 - generated model.
84
+ β”‚
85
+ β”‚
86
+ β”œβ”€β”€ src
87
+ β”‚ └── classify
88
+ β”‚ └── classify.py - this module classifies the emblem from input image.
89
+ β”‚ └── train
90
+ β”‚ └── trainer.py - this module trains the model.
91
+ β”‚
92
+ β”‚
93
+ β”œβ”€β”€ app.py - this module starts the app interface.
94
+ β”‚
95
+ β”‚
96
+ β”œβ”€β”€ LICENSE - license file of this project.
97
+ β”‚
98
+ β”‚
99
+ β”œβ”€β”€ README.md - readme file of this project.
100
+ β”‚
101
+ β”‚
102
+ β”œβ”€β”€ requirements.txt - list of required packages.
103
+ ```
104
+
105
+ ### How To Run
106
+ First, install dependencies
107
+ ```bash
108
+ # clone project
109
+ git clone https://huggingface.co/spaces/alifalhasan/deep-learning-1
110
+
111
+ # install project
112
+ cd deep-learning-1
113
+ pip install -r requirements.txt
114
+ ```
115
+
116
+ Next, download the dataset from [here](https://drive.google.com/file/d/1O5Mm-86AlUf5fUYf1NS8J_t22h7h_UbQ/view?usp=sharing). First unzip the folder. **dataset** folder contains **five** more folders. Copy them and paste into the **data** directory of this project folder.
117
+
118
+ Now train the model using this command:
119
+ ```bash
120
+ python src/train/trainer.py
121
+ ```
122
+
123
+ Finally, deploy the model using this command:
124
+ ```bash
125
+ python app.py
126
+ ```
127
+
128
+ ### License
129
+ Distributed under the MIT License. See `LICENSE` for more information.
130
+
131
+
132
+ ### Contributor
133
+ Alif Al Hasan - [@alifalhasan](https://huggingface.co/alifalhasan) - alif.stu2017@juniv.edu
134
+
135
+ Project Link: [https://huggingface.co/spaces/alifalhasan/deep-learning-1](https://huggingface.co/spaces/alifalhasan/deep-learning-1)
docs/.gitkeep DELETED
File without changes
notebooks/.gitkeep DELETED
File without changes
references/.gitkeep DELETED
File without changes
reports/.gitkeep DELETED
File without changes
reports/figures/.gitkeep DELETED
File without changes