Convolutional Neural Network

We used CNN as our model. We applied transfer learning with resnet50 by taking the first 14 layers and fixing their weights. Then, we concatenated them with our self-defined layers. We preprocessed the training images by resizing it to 224 x 224 x 3 and applied the resnet_v2 input preprocessing function and adding random augmentation to our training data.

Model Parameters

The parameters for training are listed as follows: batch size = 128, learning rate = 0.008, optimizer = Nadam, loss = categorical cross entropy. The learning rate will iteratively decrease if the validation loss does not decrease for 10 consecutive epochs. The early stopping would be triggered if the validation loss does not decrease for 30 consecutive epochs.

Training Progress and Result

The plots below show the training progress of three models: race, age, and gender. From the plots, we can observe that the validation accuracy of gender is the highest, followed by race and gender. Considering the number of categories inside each class, the results are expected.

Race Model(7 classes with 66% accuracy)

Biased Race Model(7 classes with 38% accuracy)

Age Model(9 classes with 55% accuracy)

Gender Model(2 classes with 91% accuracy)