Approach to solving the problem
The approach to solving the problem involved using a combination of various image processing algorithms as well as Deep Learning detection algorithms using a special apparatus designed by Ignitarium. Firstly, using a scanner we were able to retrieve a high resolution colour image of the raw material, then using complex image processing techniques, various preprocessing steps were carried out to ensure positional alignment.
For knowing more about positional alignment, the following links will be quite helpful:
- https://learnopencv.com/image-alignment-ecc-in-opencv-c-python/
- https://opencv-python tutroals.readthedocs.io/en/latest/py_tutorials/py_imgproc/py_geometric_transformations/py_geometric_transformations.html
Deep learning was utilised for the automatic detection of cuts and holes in the raw materials. Semantic segmentation was used for the same and a number of architectures exist for the same like ParseNet, U-Net, etc. The following link will be helpful to gain more insights regarding the same.
U-Net consists of an encoder (downsampler) and decoder (upsampler). In order to learn robust features, and reduce the number of trainable parameters, a pretrained model can be used as the encoder. Thus, the encoder for this task can be a pretrained model like MobileNetV2, whose intermediate outputs will be used, and the decoder will be the upsample block.
Unet Model
[Source: https://raw.githubusercontent.com/zhixuhao/unet/master/img/u-net-architecture.png]
The following links are helpful for exploring about Unet:
TensorRT optimization
Inorder to speed up the inference results we had carried out TensorRT optimization on our models. TensorRT is an Nvidia software solution for generating optimized models for production deployment of Deep Learning Models. This is achieved by restructuring the graph to perform the operations much faster and more efficiently without changes to the underlying computation in the graph. Detailed information on TensorRT can be found here.
Labelling
Labelling is an important part of any ML-based system. Ignitarium used its own in-house labelling application for the annotation tasks involved in identification of cuts along the footwear raw materials, thus generating the corresponding mask images for the images scanned.
Training
Using the mask images obtained from the inhouse labelling application and the original scan images, training was carried out. Several pretrained encoder-decoder networks like resnet50_segnet, mobilenet_unet, resnet50_unet etc. are available that can be used based on the requirement.
Accuracy
Our custom semantic segmentation network was able to correctly identify the cuts in the raw materials with an accuracy of over 98%.
Approach to using the application
The application requires the user to store templates of each type of raw material they intend to test. It is a one time process for each template. The template creation process involves selecting the positions of holes and drawing the positions of cuts with a mouse pointer as well as marking specific regions that may require custom threshold as compared to other regions as well as entering other details regarding the template like size, article number, left or right orientation etc.
Application Snapshots
Here are some of the snapshots of the application:
This image shows the overall layout of the application
Application screenshot showing an example case of how the raw material tested is non defective. It has verified the position of the holes, cuts as well as border outlines in the template for any mismatch.
The screenshot here shows a feature of the application that allows the user to actually check the measures in S.I system (millimetre) between any points of interest in the raw material using a mouse pointer, thus eradicating the need to physically use a measuring tape or scale.


