We conducted several experiments to examine the problem from a different angle to help determine the best solution for the client. We tried using open-source data and a classifier based on embedding vectors, but the metrics were worse. Since there aren’t many open-source textural datasets, we decided to gather our own big datasets with specific textures.
Pinnacle provided panoramic images converted to a 2D view suitable for labeling purposes. SoftServe’s experts, in collaboration with the Pinnacle team, conducted the labeling workshop and developed image analytics to evaluate distribution, calculate statistics of coating damage and corrosion, etc. The labels for the datasets were:
- Corrosion segmentation: corrosion and stains.
- Texture classification: severe corrosion, light corrosion, paint defects, rust staining, and normal paint.
We split the dataset of images into three parts: training, validation, and testing for both corrosion segmentation and texture classification.
The texture classification solution uses the sliding window approach and classifies the crops of an image with the size of 128 px x 128px. This size showed the best result in our previous experiments compared to other tested sizes. During experiments with the supervised and unsupervised classification of the textures, we tested the most popular machine learning algorithms, such as XGBoost, K-NN, Centroid-based, SVC, plus others. We decided to use ResNet18 as a final model for texture classification because it gave the best data results.
For corrosion segmentation, we tested several fully convolutional networks with the UNet-like architectures. During the hyperparameter tuning process, we tested several parameters of the segmentation pipeline such as model architecture, model encoder, loss function, number of epochs, batch size, input size, and image input method. This allowed us to find the optimal configuration of the pipeline. In the final implementation, we used the PSPNet architecture and an EfficientNet encoder.