# Iae-km3D a 3D Object Detection Method Based on an Improved KM3D Network
## 2 Methodology
### IAE-KM3D: Improved Algorithm for KM3D
#### 2.2.3. Simam Attention Mechanism  
Simam is a conceptually simple but effective attention module for convolutional neural networks. In contrast to existing channel and spatial attention modules, this module does not need to add parameters to the original network, but rather infers the 3D attention weights of the feature map in one layer. Specifically, based on some well-known neuroscience theories, Simam proposes to optimize an energy function to discover the importance of each neuron. Furthermore, it derives a fast closed-form solution of the energy function and implements the solution in less than ten lines of code. Another advantage of this module is that most of the operators are chosen based on the solution of the defined energy function, avoiding spending too much effort on structural tuning. The flexibility and effectiveness of the module are demonstrated through quantitative evaluations of various visual tasks, improving the expressive power of many convolutional networks.  
Simam is an attention module with uniform weights. To better realize attention, [PERSON] evaluates the importance of each neuron. In neuroscience, information-rich neurons usually exhibit different firing patterns than surrounding neurons. Moreover, activated neurons usually inhibit surrounding neurons, i.e., null-space inhibition. In other words, neurons with a null-space inhibitory effect should be more critical. The simplest way to find essential neurons is to measure the linear divisibility between neurons. Thus, [PERSON] defines the following energy Equation (1):  
\[e_{t}(w_{t},b_{t},y,x_{i})=(y_{t}-\overset{\wedge}{t})^{2}+\frac{1}{M-1}\sum_{ i=1}^{M-1}{(y_{o}-\overset{\wedge}{x_{i}})}^{2} \tag{1}\]  
Minimizing the above Equation is equivalent to training linear separability between neurons and other neurons in the same channel. For simplicity, binary labeling is used, regular terms are added, and the final energy function is defined as follows in Equation (2):  
\[e_{t}(w_{t},b_{t},y,x_{i})=\frac{1}{M-1}\sum_{i=1}^{M-1}{(-1-(w_{t}x_{i}+b_{t}) )^{2}+(1-(w_{t}x_{i}+b_{t}))^{2}+\lambda w_{t}^{2}} \tag{2}\]  
The analytic solution of the above equation is Equation (3):  
\[\begin{split} w_{t}=-\frac{2(t-\mu_{t})}{(t-\mu_{t})^{2}+2\sigma_ {t}^{2}+2\lambda}\\ b_{t}=-\frac{1}{2}(t+\mu_{t})w_{t}\end{split} \tag{3}\]  
Since all neurons on each channel follow the same distribution, the mean and variance can be computed first for the input features in both H and W dimensions to avoid repeated computations. Equation (4):  
\[e_{t}{}^{*}=-\frac{4(\sigma_{t}^{2}+\lambda_{t})}{\left(t-\mu_{t}\right)^{2}+2 \sigma_{t}^{2}+2\lambda} \tag{4}\]  
The whole process can be represented as Equation (5):  
\[\widetilde{X}=sigmoid(\frac{1}{E})\odot X \tag{5}\]  
Adding the Simam attention mechanism to the KM3D network allows the network to focus on more critical features, as shown in Figure 5.  
By analyzing the contrasting heat map in Figure 5, it can be seen that the feature map, before the addition of [PERSON]'s attention, focused on too many useless regions, and the vehicle on the far left was not attended to at all. The improved feature map focuses only on the target objects that need attention, and the leftmost ve