# Human Action Representation Learning Using an Attention-Driven Residual 3 DCNN Network
## 3 Proposed DA-R3 DCNN Human Activity Recognition Framework
### Dual Channel-Spatial Attention Module
#### 3.3.1 Channel Attention  
In the context of image/object recognition problems, the contribution of each color channel is crucial in achieving accurate pattern recognition. CNN models leverage this information by constructing feature maps from the input image data and extracting deep discriminative features over multiple convolutional layers. However, certain color channels may be more important than others in the recognition process, and often the object recognition model takes this into account during training. This approach allows an object recognition model to capture the most important visual features of the input images and improve recognition accuracy. Prior attention-based approaches in video analysis utilized either global max pooling or global average pooling layers. However, the proposed DA-R3 DCNN model surpasses this limitation and combines both pooling methods to extract more effective features. The global max pooling layer selects the maximum value from the receptive field, emphasizing highly activated values, while the global average pooling layer estimates equally weighted feature maps for each channel. By leveraging the strengths of both pooling techniques, the model can capture and highlight the most important and discriminative features in videos. This results in an improved performance in various video analysis tasks, including action recognition and spatio-temporal localization.  
Once the feature maps have been computed, they are fed into a shared multilayer perceptron (MLP), which comprises two fully connected layers, each with 512 nodes. The MLP leverages a rectified linear unit (ReLU) activation function to learn the non-linearity between the two fully connected layers. The MLP then produces two distinct feature vectors--\(V_{\text{C}-max}^{1\times 1\times C}\) and \(V_{\text{C}-avg}^{1\times 1\times C}\)--through global max pooling and global average pooling, respectively. These feature vectors play a critical role in capturing the most salient and essential information present in the feature maps. This approach can significantly enhance the performance of the model across various video analysis tasks. After computing feature vectors from global max pooling and global average pooling, they are fused through elementwise addition and passed through a sigmoid activation function \(\sigma\) to obtain intermediate channel attention features \(\mathcal{A}_{\text{C}}^{1\times 1\times C}\). These features are then fused with the input feature maps \(F_{M}^{H\times W\times C}\) through a residual skip connection using element-wise multiplication operation, resulting in the final channel attention feature maps \(Att_{C}^{H\times W\times C}\). Figure 4 provides a visual representation of this process. Mathematically, the channel attention and its key components can be formulated as follows:  
\[V_{\text{C}-max}^{1\times 1\times C}=fc2(R_{eLU}(fc1(maxpool(F_{M}^{H\times W \times C})))), \tag{5}\]  
Figure 3: The visual overview of the dual channel-spatial attention module.  
\[V_{\text{C}-avg}^{1\times 1\times C}=fc2(R_{eLU}(fc1(avgpool(F_{M}^{H\times W \times C})))), \tag{6}\]  
\[\mathcal{A}_{\text{C}}^{1\times 1\times C}=\sigma(V_{\text{C}-max}^{1\times 1 \times C}\oplus V_{\text{C}-avg}^{1\times 1\times C}), \tag{7}\]  
\[Att_{\text{C}}^{H\times W\times C}=\mathcal{A}_{\text{C}}^{1\times 1\times C} \otimes F_{M}^{H\times W\times C}, \tag{8}\]  
where \(fc1\) and \(fc2\) denote the first and the second fully connected layer, respectively.