# Automatic Asbestos Control Using Deep Learning Based Computer Vision System +
## 2 Description of the Experimental System and Algorithm of Its Work
### Algorithm of the System Work
The Mask-R-CNN network was trained with dataset N5 (rock chunks detection and instance segmentation), which was divided into the training part with 50 images and the validation part with 6 images. All images were resized to \(1333\times 800\). During the inference, the ruck chunks selection was performed with the confidence threshold of 0.75. The typical result of the rock chunks in the open pit detection with obtained masks is shown in Figure 2:0 The obtained instance masks correspond to the ground truth one that is shown in Figure 2:1 There is an interesting detail that in the obtained mask there are more detected chunks than in the ground truth mask. This is due to the similarity between the rock chunks form (and features) in different images which allows the network to select such regular instances everywhere. This phenomenon also could be considered as an indicator of well-training (the lack of overfitting). \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Dataset** & **Samples** & **Specificity** & **Weather Conditions** & **Aim** \\
**Part** & & & & \\ \hline
1 & 46 & Alone & laboratory condition & Pretraining, semantic segmentation \\  & & & & & of veins. \\
2 & 134 & 10–20 & Conveyor & Pretraining, semantic segmentation \\  & & & rock chunks. & & segmentation of veins. \\  & & & & \\
3 & 69 & & & 6 open pit, & Test, semantic \\  & & & open pit & sunny weather & segmentation \\  & & & with the & in autumn. & of veins. \\  & & & & \\  & & & animala & & \\
4 & 984 & & & 12 open pits & Train, \\  & & & in the & (22 parts), sunny, & test semantic \\  & & & open pit & cloudy, rainy, & segmentation \\  & & & with auto & and snowy & of veins. \\  & & & & \\  & & & aiming. & & \\
5 & 56 & & & & \\  & & & & \\  & & & & & \\ \end{tabular}
\end{table} 
Table 1: Datasets description. ### Asbestos Veins Segmentation

The U-Net-based semantic segmentation artificial neural network architecture [11] was applied to the evaluation of the asbestos content for each chunk (stage 32 of the Algorithm 1). The U-Net architecture was trained only for the segmentation of veins inside the aimed rock chunks. It is necessary to note that training rock area and veins segmentation could dramatically reduce the accuracy. We suppose that it is due to the specificity of the collected data. In the typical image, there are some vein instances much large than the number of rock chunks and the typical sum area of all veins for one chunk is only 1-4% of its area. Due to this, each stone area was determined using the Mask-RCNN (on the open pit image) as was mentioned above. The U-Net architecture is shown in Figure 10.

The standard U-Net scheme consists of the encoder part (convolution part) and decoder part (deconvolution part). At the same time, each block of the decoder of the U-Net network is implemented from the so-called pairwise convolutional layers with joint activation [11]. This provides (in contrast to the feedforward-based architectures) features to transfer from the encoder block to the corresponding decoder block. Moreover, there

Figure 10: The U-Net architecture (\(X_{\alpha n}\) is the encoder block, \(X_{de}\) is the decoder block). Figure 9: The typical result of the rock chunks in the open pit detection with obtained masks. The result corresponds to the ground truth one in Figure 8.

is no loss of small reconstructed (segmented) objects details in the decoder part. In the carried-out investigation, the standard encoder block was replaced with the EfficientNet-B3 block which implementation was taken the same as in the original paper [25]. Note that the initial weights of the EfficientNet-B3 block were taken as weights obtained by its pre-training on the ImageNet dataset [26]. For the training routine, the Adam optimizer was taken [27] with the learning rate of \(10^{-5}\) and betas parameters \((0.99,0.99)\). The loss function was the binary-cross-entropy [10]. The \(Dice\) coefficient was used as a quality metric in the training for the model evaluation [10].