Deep convolutional neural networks have been implemented in a variety of applications that include facial recognition, object detection, and advertising analysis. The objective of this project was to train a Convolutional Neural Network (CNN) model to classify images cracks from a fatigue test on an aerospace material based on a set of four categories: large, medium, small, and none.
No crack in material from fatigue test
Small crack in material from fatigue test
Large crack in material from fatigue test
The model was trained on data from existing fatigue tests, categorized into three distinct folders: training, validation, and testing. Each category of data provided a subfolder of one of the aforementioned classification labels. To prevent bias and overfitting, the model's training data was excluded from the validation process. However, overfitting can still occur. Although this model did not exhibit overfitting, it can arise due to factors such as using training data for validation or model memorization throttled by insufficient data.
The model was built using the Sequential class from the Keras library and trained for 50 epochs with multiple hidden layers. Data augmentation was applied prior to training to enhance the model's generalization, accuracy, and reduce the amount of data required. Augmentation techniques included translation, perspective distortion, rotation, and scaling of images, making the model more robust in its prediction capabilities. The model's performance was evaluated based on its accuracy and loss using the training and validation data.
Training & validation accuracy graph of the trained model
Training & validation loss of the trained model
The loss function represented how well the developed neural network was able to classify the images by evaluating the weights of the model, thus generating a loss value. The loss function used for the developed model was the categorical crossentropy function, known as softmax. It was used for multiclass categorization where the labels are one-hot encoded meaning that for a class of four labels, there are four parameters that must be included. The optimizer was used to modify the training weights and biases to improve the performance of the model.
For the developed model, the optimizer Adam, a branch of gradient descent adapted from RMS propagation, was implemented. It was capable of adjusting the learning rate of the model and tracking the moving average of the gradient to capitalize on performance gains and ultimately improve the accuracy of the model. Using both the loss function and optimizer, the model’s performance over each epoch was evaluated to outline further refinements to be implemented for the model.
Untrained model prediction for the medium label
Untrained model prediction for the large label
Trained model prediction for the medium label
Untrained model prediction for the large label
In summary, this project aimed to develop a deep convolutional neural network capable of classifying fatigue test crack images based on predefined labels. The model was successfully trained, demonstrating increasing accuracy and decreasing loss over 50 epochs. Both the training and validation data showed consistent trends in accuracy and loss, meeting the criteria for a successful model. Additionally, two images from the test dataset were used for label prediction, both achieving 100% accuracy.
Check out my project repository for project 2 on GitHub for code samples.