File size: 2,110 Bytes
5a580da
 
0a58998
 
 
 
 
 
 
 
 
5a580da
a165d52
 
0a58998
a165d52
0a58998
a165d52
0a58998
a165d52
0a58998
a165d52
0a58998
a165d52
0a58998
a165d52
0a58998
a165d52
0a58998
a165d52
0a58998
 
 
 
 
 
 
 
a165d52
 
0a58998
 
 
 
 
 
 
 
 
 
 
a165d52
0a58998
 
 
 
 
 
 
a165d52
0a58998
a165d52
0a58998
a165d52
0a58998
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
---
license: wtfpl
language:
- en
- ur
tags:
- facial
- recognization
- face
- ML
- Ai
---
Facial Recognition Model

Model Information

Name: Facial Means

Type: Convolutional Neural Network (CNN)

Framework: TensorFlow

Dataset: Celebrity Faces Dataset

Dataset Path: /content/drive/MyDrive/beard_dataset/celb_dataset/

Model Save Path: /content/drive/MyDrive/beard_dataset/celebrity_model.h5

Image Dimensions: 224 x 224 pixels

Batch Size: 32
Data Augmentation
Rescale: 1./255
Shear Range: 0.2
Zoom Range: 0.2
Horizontal Flip: True
Validation Split: 20%
Model Architecture
Layer (type)
Output Shape              Param #
===============================================================
conv2d (Conv2D)               (None, 222, 222, 32)      896
max_pooling2d (MaxPooling2D)  (None, 111, 111, 32)      0
conv2d_1 (Conv2D)             (None, 109, 109, 64)      18496
max_pooling2d_1 (MaxPooling2D)(None, 54, 54, 64)        0
conv2d_2 (Conv2D)             (None, 52, 52, 128)       73856
max_pooling2d_2 (MaxPooling2D)(None, 26, 26, 128)       0
flatten (Flatten)             (None, 86528)             0
dense (Dense)                 (None, 128)               11075712
dense_1 (Dense)               (None, 6)                 774
===============================================================

Total params: 11,170,734
Trainable params: 11,170,734
Non-trainable params: 0
Model Compilation
Optimizer: Adam
Loss Function: Categorical Crossentropy
Metrics: Accuracy

Training

Epochs: 10

Steps per Epoch: Calculated based on the training dataset size and batch size.
Validation Steps: Calculated based on the validation dataset size and batch size.
Model Save
The trained model is saved at /content/drive/MyDrive/beard_dataset/celebrity_model.h5.
Conclusion
The facial recognition model has been trained on a celebrity faces dataset using TensorFlow. The model architecture includes convolutional and pooling layers, followed by fully connected layers for classification. The training process involves data augmentation and achieves satisfactory accuracy.

Model training code provided by Muhammad Sajjad Rasool.