# Small-Scale Zero-Shot Collision Localization for Robots Using RL-CNN
## 4 Proposed Two-Stage Collision Localization Method
### Proposed RL-CNN Method  
Figure 4 shows the proposed RL-CNN. After collecting data from IMU, the data will be segmented as described in Section 3, and then the segmented data will be normalized to \([0,1]\). After the above preprocessing, we use the RL-CNN to perform the zero-shot collision point localization. In the root and leaf stages, the structures are similar. Their common parts consist of two convolutional layers, two max pooling layers, and three fully connected layers. The output of each convolutional layer will be batch normalized and then activated using the ReLU function. The purpose of using batch normalization in such a shallow network is to suppress the network's over-understanding of visible data and improve the network's ability to classify zero-shot data. For the same reason, a dropout layer is stacked after the first max pooling layer, and the rate is set to 0.5. In the root stage, the network is mainly used to distinguish whether the contact occurs in the upper region or the lower region of the charger. According to the output of the root stage, which leaf stage should be subsequently activated is determined. The only difference between the network used in the leaf stage and that used in the root stage is that the last layer in the network in the leaf stage uses a four-node fully connected layer with a softmax activation function. The leaf stages are mainly designed to estimate where the zero-shot collision point occurs in the finely divided region. For more details, the parameters of each layer are shown in Table 3. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Layer** & **Size** & **Channel** & **Parameter** \\ \hline Input & 400 \(\times\) 6 & 1 & - \\ Convolutional layer1 & 3 \(\times\) 3 & 64 & 640 \\ Max pooling1 & 2 \(\times\) 2 & 64 & - \\ Convolutional layer2 & 3 \(\times\) 3 & 64 & 36,928 \\ Max pooling2 & 2 \(\times\) 2 & 64 & - \\ Fully connected layer1 & 12,800 \(\times\) 1024 & - & 13,108,224 \\ Fully connected layer2 & 1024 \(\times\) 10 & - & 10,250 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The structure of the baseline. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Layer** & **Size** & **Channel** & **Parameter** \\ \hline Root-stage & - & - & - \\ Input & 400 \(\times\) 6 & 1 & - \\ Convolutional layer1 & 3 \(\times\) 3 & 64 & 640 \\ Batch normalization1 & - & - & 256 \\ Max pooling1 & 2 \(\times\) 2 & 64 & - \\ Convolutional layer2 & 3 \(\times\) 3 & 64 & 36,928 \\ Batch normalization2 & - & - & 256 \\ Max pooling2 & 2 \(\times\) 2 & 64 & - \\ Fully connected layer1 & 12,800 \(\times\) 1024 & - & 13,108,224 \\ Fully connected layer2 & 1024 \(\times\) 128 & - & 131,200 \\ Fully connected layer3 & 128 \(\times\) 1 & - & 129 \\ Leaf-stage & - & - & - \\ Input & 400 \(\times\) 6 & 1 & - \\ Convolutional layer1 & 3 \(\times\) 3 & 64 & 640 \\ Batch normalization1 & - & - & 256 \\ Max pooling1 & 2 \(\times\) 2 & 64 & - \\ Convolutional layer2 & 3 \(\times\) 3 & 64 & 36,928 \\ Batch normalization2 & - & - & 256 \\ Max pooling2 & 2 \(\times\) 2 & 64 & - \\ Fully connected layer1 & 12,800 \(\times\) 1024 & - & 13,108,224 \\ Fully connected layer2 & 1024 \(\times\) 4 & - & 4100 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: The structure of the proposed RL-CNN. Figure 4: The pipeline of the proposed zero-shot collision localization method. In order to provide a more general understanding of RL-CNN, we present the mathematical analysis of RL-CNN. Since the two stages of RL-CNN are highly similar, for the sake of clarity, we focus on one of the stages here.