Multi-Class Image Classification Deep Learning Model for Textile Defect Detection Using TensorFlow Take 3

Template Credit: Adapted from a template made available by Dr. Jason Brownlee of Machine Learning Mastery.

SUMMARY: This project aims to construct a predictive model using a TensorFlow convolutional neural network (CNN) and document the end-to-end steps using a template. The Textile Defect Detection dataset is a multi-class classification situation where we attempt to predict one of several (more than two) possible outcomes.

INTRODUCTION: This dataset from Kaggle contains 96,000 patches of the textile image with different quality problems. The goal of the exercise is to detect the quality issue for a patch of textile during production. The greyscale photos are part of the public dataset made available by the MVTec Company and referred by the research paper from Paul Bergmann, Michael Fauser, David Sattlegger, Carsten Steger. MVTec AD – A Comprehensive Real-World Dataset for Unsupervised Anomaly Detection; in: IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019.

From iteration Take1, we constructed a CNN model using a simple three-block VGG architecture and tested the model’s performance using a separate test dataset.

From iteration Take2, we constructed a CNN model using the DenseNet201 architecture and tested the model’s performance using a separate test dataset.

In this Take3 iteration, we will construct a CNN model using the ResNet50V2 architecture and test the model’s performance using a separate test dataset.

ANALYSIS: From iteration Take1, the baseline model’s performance achieved an accuracy score of 97.07% on the validation dataset after 15 epochs. Furthermore, the final model’s performance achieved an accuracy score of 68.03% on the test dataset after 15 epochs.

From iteration Take2, the DenseNet201 model’s performance achieved an accuracy score of 98.93% on the validation dataset after 15 epochs. Furthermore, the final model’s performance achieved an accuracy score of 53.69% on the test dataset after 15 epochs.

In this Take3 iteration, the ResNet50V2 model’s performance achieved an accuracy score of 94.88% on the validation dataset after 15 epochs. Furthermore, the final model’s performance achieved an accuracy score of 59.12% on the test dataset after 15 epochs.

CONCLUSION: In this iteration, the ResNet50V2 CNN model did not appear suitable for modeling this dataset due to a high-variance problem. We should consider experimenting with more or different data for further modeling.

Dataset Used: Textile Defect Detection

Dataset ML Model: Multi-class image classification with numerical attributes

Dataset Reference: https://www.kaggle.com/belkhirnacim/textiledefectdetection

A potential source of performance benchmarks: https://www.kaggle.com/belkhirnacim/textiledefectdetection

The HTML formatted report can be found here on GitHub.