Detection, localization and classification of surface defects on a steel sheet using CNN. Using libraries Keras and sklearn.
The production of flat steel isn't a very perfect process. It can lead to a number of different categories of defects on its surface. The code localizes and classifies the various defects by training and testing on images from high frequency cameras.
https://www.kaggle.com/c/severstal-steel-defect-detection/data
https://www.kaggle.com/paulorzp/rle-functions-run-lenght-encode-decode
We can visualize a sample image and its masks using this part of code.
The model is inspired from https://www.kaggle.com/jesperdramsch/intro-chest-xray-dicom-viz-u-nets-full-data. This is a bit different as it predicts all four masks at the same time rather than one by one.
We use Dice loss is used as a measure of loss. In general, dice loss works better on images than on single pixels.