File size: 2,744 Bytes
b75960c
 
 
7ea6746
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a7a4603
7ea6746
a7a4603
7ea6746
a7a4603
7ea6746
 
 
a7a4603
 
 
 
7ea6746
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a7a4603
 
 
 
 
7ea6746
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
---
license: unknown
---

# Age estimation in supermarkets
The model analyzed in this card estimates someone's age. This project has been done for the master Applied Artificial Intelligence and is about estimating ages in supermarkets when a person wants to buy alcohol. This model's goal is to only estimate ages in an image. It will not cover ethnicities or gender. 

## Model description
**Used dataset:** UTKFace images
- This dataset contains roughly 24K face images.
- The age of a person on the picture is labeled in the filename of that image. 
- Since we do not have use for baby images, we decided to cut these out of the dataset, so there are 21K images left.

**Model input:** Facial images

**Model output:** For a face in a picture, the model will return the estimated age of that person. The model output also gives a confidence score for the estimation.

**Model architecture:** A Convolutional Neural Network. This CNN will perform a regression analysis to estimates the ages. 

## Performance 

To determine the performance of the model, the following metrics have been used:
- MSE, this metric measures how close the regression line is to the data points.
<br> &ensp; - *Our model's MSE:* 60.9
- RMSE, this metric measures the mean error that can be made.
<br> &ensp; - *Our model's RMSE:* 7.8
- MAE, this is a measure for model accuracy. The MAE is the average error that the model's predictions have in comparison with their corresponding actual targets.
<br> &ensp; - *Our model's MAE:* 5.2

Ideally, the RMSE and the MAE should be close to each other. When there is a big difference in these two numbers, it is an indication of variance in the individually errors.

Our results show that the prediction model can be around 8 years off of the actual age of a person.

We also looked at how the model performs in different age, gender and race classes. It seemed the model predicted the ages of people between 20 and 30 better than the rest. The model could also predict the ages of females better than males. The race that the model can predict the best is East Asian.


## Limitations
- **Lighting**
<br> When the lighting is poor, the age estimation can be poor as well
- **Occlusion**
<br> Partially hidden or obstructed faces might not be detected. (e.g. face masks)
- **UTKFace** 
<br> The ages in this dataset are in itself estimation from a previous model. Since we do not know the exact ages of the people in the images, our model will not be the most reliable. 


## Training and evaluation data

Train data: 70%
Test data: 30%

Our model has been made by trial and error. The following architecture is the outcome:
- Hidden layers: 7
- Batch size: 128
- Epochs: 65
- Optimizer: adam
- Activation: ReLu & Linear