# LNSNet: Lightweight Navigable Space Segmentation for Autonomous Robots on Construction Sites
## 4 Method
### Model Architecture
#### 4.1.1 Factorized Convolution Block  
To optimize the amount of parameters in a CNN model while maintaining its performance, cut down the model sizes, and run the model faster, Depthwise Separable Convolution from MobileNet [50] is applied. Depthwise Separable Convolution is a form of factorized convolutions which factorizes a standard convolution into two separate operations--a depthwise convolution and a point-wise convolution. While the standard convolution operates over every channel of the input feature map, Depthwise Separable Convolution applies a single filter on every channel and use a point-wise convolution, (\(1\times 1\)) kernel convolution, and linearly combines the outputs. For a standard convolution layer whose kernel size is \(K\), it takes a feature map of size \(H_{in}\times W_{in}\times C_{in}\) as input where \(H_{in}\), \(W_{in}\)  
Figure 2: An overview of the proposed method for real-time navigable space segmentation.  
\(C_{in}\) are height, width, and channels respectively, and outputs a feature map of size \(H_{out}\times W_{out}\times C_{out}\). The computational cost is computed using Equation (1).  
\[K\times K\times C_{in}\times C_{out}\times H_{in}\times W_{in} \tag{1}\]  
Equation (2), shows the computational cost for separable depthwise convolution, considering the same feature map.  
\[K\times K\times C_{in}\times H_{in}\times W_{in}+C_{in}\times C_{out}\times H _{in}\times W_{in} \tag{2}\]  
By transforming the original convolution operation into depthwise separable convolution, the reduction in computation cost is calculated by Equation (3)  
\[\frac{K\times K\times C_{in}\times H_{in}\times W_{in}+C_{in}\times C_{out} \times H_{in}\times W_{in}}{K\times K\times C_{in}\times C_{out}\times H_{in} \times W_{in}}=\frac{1}{C_{out}}+\frac{1}{K^{2}} \tag{3}\]  
In the proposed method, depthwise separable convolutional layers replace the standard convolution layers in a CNN model. This replacement reduces computational cost. For instance, a convolutional layer with \(3\times 3\) filters is substituted with depthwise separable convolutional layer. The reduced computational cost is 0.13 which means that the model uses almost 8 times less computation than standard computations which means that the model uses almost 8 times less computation than standard computations (see Equation (4)).  
\[\frac{1}{C_{out}}+\frac{1}{K^{2}}=\frac{1}{64}+\frac{1}{9}=0.13 \tag{4}\]  
By utilizing the strength of depthwise separable convolution, we proposed a new residual block based on the traditional residual block. The block has two branches. One branch consists of two \(1\times 1\) convolutional layers (the first one is for projection and reducing the dimensionality which is located before the depthwise separable convolution layer and the second one is placed afterward which is for expansion), a depthwise convolutional layer, and a batch normalization layer at the end. The other one is a shortcut branch which outputs an identical feature map as its input. If the type of the block is Downsample, a MaxPooling layer is added to the shortcut branch. At the end of the block, the outputs from the two branches are element-wise added. The structure of the block is shown in Figure 3.