# 3D Object Detection Using Frustums and Attention Modules for Images and Point Clouds
## 3 Frustum ConvNet with Attention (FCAM)
### The Improved CBAM Attention Model for Point Cloud Detection  
The original CBAM attention model is shown in Figure 2a, and our improved CBAM attention model is shown in Figure 2b. In this section, we briefly introduce the original CBAM and then explain the improvement of our proposed attention model. The original CBAM attention module consists of the channel attention and the spatial attention blocks. In the channel attention block, the input feature \(\mathbf{F_{1}}\) passes max pooling and average pooling and then through the MLP with a reduction ratio \(r_{1}=16\). They are followed by sigmoid activation to generate the final channel attention feature map. In the spatial attention block, channel-based global max pooling and global average pooling are connected on the input feature \(\mathbf{F_{2}}\), and then \(\mathbf{F_{2}}\) through a convolution layer with \(7\times 7\) kernel size. After a convolution layer, the dimension is reduced to one channel. Finally, the attention features are generated after calculation by the sigmoid function. Figure 2: The architecture of attention modules. (**a**) The architecture of the original CBAM attention module [4]; (**b**) the architecture of our improved CBAM. The challenge of 3D object detection using PointNet [3,4] is the feature missing problem, especially when the characteristics are quite different. In the whole Frustum ConvNet [1], when a 2D proposal is converted into a 1D vector, some feature information may be lost to some extent. To solve this problem, we designed a new kind of attention module to improve the detection capability of our proposed 3D object detector. If an input falls into the region where x < 0, the gradient of the neuron becomes 0. This phenomenon is called the Dead ReLU problem [22]. It causes the regression of the model not to converge. To solve the Dead ReLU problem of the ReLU function and enhance the feature extraction ability of attention modules, the tanh function is used as an auxiliary optimization function in our new structure. Based on the FCN [24] and the thought of the U-net [25] fusion, we added a parallel Multilayer Perceptron (MLP) architecture to the CBAM attention module and used the tanh activation function to enhance the contrast between the object and background. Multilayer Perceptron (MLP) can better fit the nonlinear region and performs well when dealing with deep networks and large amounts of information. To prevent overfitting due to too many parameters, we used different reduction ratios in two MLPs to reduce the input and output channels. Here, the reduction ratios are \(r_{1}=16\) and \(r_{2}=32\). Furthermore, the tanh function can alleviate the mean deviation problem in the ReLU function in [-1, 1], and the tanh function performs better when the feature values are quite different. However, the tanh function shows the gradient disappearance outside of [-1, 1], as shown in Figure 2(a). The gradient disappearance problem can be solved by the ReLU function when x > 0, as shown in Figure 2(b). To exploit the advantages of the two activation functions in the attention modules, we fused the two average pooling vectors by element-wise summation in the final step, as shown in Figure 2(b). Because the sigmoid function has the scope of [0, 1], we used the sigmoid function as the output layer activation function to represent the prediction probability. It is used to filter the unimportant part and retain the important part feature information. In our improved CBAM attention module, feature maps of channel attention are obtained by using max pooling and average pooling. The feature map then passes through two MLPs consisting of two fully connected layers that use the ReLU activation function and tanh activation function, as shown in the channel attention block of Figure 1(b).