# 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 general principle of work of the whole computer vision system for asbestos productivity estimation in the open pit is shown in Figure 3.  
The scheme in Figure 3 assumes the following stages of the general measurement Algorithm 1. The Algorithm 1 requires preliminary graduations. The relation of the lens zoom to the ratio between rock chunk area and image area was taken in the laboratory condition to eliminate the non-linearity in the lens zoom parameters. The relation of the asbestos content estimation to the ratio between the veins areas and corresponding rock chunk areas is the subject of the investigation which is discussed below. Figure 2: Photo of the developed system (**a**); image of system at the open pit background (**b**) and scheme of the system (**c**). ```
0:
1:\(A_{I}=W_{I}\times H_{I}\); # \(A_{I}\) is the camera resolution;
2:\(z=f(a_{R}/A_{I})\); # graduation relation between rock chunks area (\(a_{R}\)) and required zoom of lens (z); grading relation taken with step of zoom 5%;
3:\(e=g(a_{v}/a_{R})\); # \(e\) is the grading relation for asbestos content estimation and the veins and rock chunks areas \(a_{v}\) and \(a_{R}\) correspondingly;
4:\(s_{conf}=0.7\); # \(s_{conf}\) is the confidence threshold for instance segmentation results;
5:\(K\); # \(K\) is the number of steps to fine search of rock chunks;
6: trained neural networks for instance and semantic segmentation. 7:Output:
8:\(e\); # is the estimation of the asbestos content in the open pit place. 9: Obtaining \(I_{p}\); # image of the open pit place. 10: Obtaining \(R=\{R_{i}\}_{i=0}^{N-1}\); # Instance segmentation results of \(I_{p}\); where \(R_{i}=\{x_{i},y_{i},w_{i},h_{i},s_{i},a_{i}\}\); and \(x_{i},y_{i}w_{i},h_{i}\) are the rock chunk coordinates, width and height correspondingly; \(s_{i}\) is the confidence score for rock chunk \(i\); \(a_{i}\) is the rock chunk area (in pixels); \(i=0,\ldots,N-1\), \(N\) is the amount of the detected rock chunks. 11:\(R^{\prime}=None\);
12:for\(i\) in \(N\)do:
13:if\(s_{i}>s_{conf}\)then
14:\(R^{\prime}.append(R_{i})\); # Rest only rock chunks with confidence higher than a threshold one. 15:endif
16:endfor
17: ; # Fetch the selected rock chunks images
18:for\(i\) in \(range(R^{\prime}.size)\)do:
19: moving the system platform to have \(x_{i},y_{i}\) in the center of image; # Coarse camera moving;
20:\(z=f(a_{i}/A_{I})\); # Calculate the required zoom of lens;
21: zoom of lens;
22:if\(w_{i}>h_{i}\)then: # Select direction of the fine search
23:\(d=horizon\);
24:else
25:\(d=vertical\);
26:endif
27:\(k_{max}=0\); # The best camera position for the rock chunk \(i\). 28:\(u_{max}=0\); # Auxiliary variable. 29: In the direction \(d\) do: # Search the best camera position
30:for\(k\) in \([-K;K]\)do:
31: move camera to the position \(k\); # To \(x_{i}+k\); or to \(y_{i}+k\) depends on the \(d\). 32: take image \(I_{R}\); # Image of the rock chunk. 33:\(u=sum(I_{R}*L)\); # \(*\) is the convolution operation;
34:\(\#\ L=[[0,1,0],[1,-4,1],[0,1,0]]\) is the \(2D\) Laplace operator. 35:if\(u>u_{\text{max}}\)then:
36:\(u_{max}=u\); \(k_{max}=k\);
37:endif
38:endfor
39: moving the system platform to the position \(x_{i}+k\) or to \(y_{i}+k\) depends on the \(d\);
40: taking image \(I_{v}\); # Image of the selected rock chunk \(i\);
41: obtaining \(a_{v}\) with semantic segmentation network; # \(a_{v}\) is the sum of veins area in the image \(I_{v}\). 42:endfor
43: calculating \(e=g(\sum_{i=0}^{N-1}(a_{v}/a_{R})_{i})\); # Asbestos content value calculated by the all selected rock chunks and asbestos veins inside them. ## 3 The Collected Datasets Description

The training and testing of the developed system were conducted by two datasets that were collected and partially labelled during the previous work [6] and 3 datasets that were collected specially for the presented work. All training data was labelled for the object detection and segmentation tasks. Figure 3: The scheme of the asbestos productivity estimation in the open pit.