# FE-P Net: An Image-Enhanced Parallel Density Estimation Network for Meat Duck Counting
## 2 Materials and Methods
### Detail-Enhanced Parallel Density Estimation Model Architecture
#### 2.3.2 Density Branch Based on Convolutional Networks  
CNNs employ fixed-size kernels to capture local semantic information [22], excelling in extracting detailed local features. However, the similarity in color and texture between the background and objects in our dataset necessitates the EBM to differentiate their features. Convolution operations can introduce redundancy by indiscriminately extracting features across both spatial and channel dimensions [23], potentially impacting final predictions. To address this redundancy, this section integrates a Spatial Reconstruction Unit (SRU) and Channel Reconstruction Unit (CRU) into the convolution branch [24]. The structure of the density branch, based on convolutions, is illustrated in Figure 6.  
The input features first undergo two sequential \(3\times 3\) convolutions to compress the channel dimensions. These features are then refined by SRU and CRU modules to reduce redundancy. Finally, the processed features are used for counting loss calculation and feature fusion in the regression branch. The final expression is  
\[f_{sc}=F_{1}(F_{2}(CRU(SRU(f_{in})))) \tag{7}\]  
Notably, the convolutional branch incorporates both an SRU and CRU in addition to convolution operations to address information redundancy. The SRU primarily comprises separation and reconstruction stages. The separation stage identifies feature maps rich in spatial information from those with less spatial detail. This is achieved using weight factors from group normalization (GN) layers [25] to evaluate the richness of the feature maps. The GN formula is  
\[f_{out}=GN(f_{in})=\gamma\frac{X-\mu}{\sqrt{\sigma^{2}+\epsilon}}+\beta \tag{8}\]  
where \(\mu\) and \(\sigma\) are the mean and variance of the features in the group, \(\gamma\) is a trainable factor that evaluates the richness of the feature mapping, \(\beta\) is a bias parameter, and \(\epsilon\) is a small positive number to avoid division by zero. To unify the sample distribution and accelerate network convergence, normalization layers process the trainable parameter \(\gamma\in\mathbb{R}^{C}\), yielding the normalized weights \(W_{\gamma}\). The expression is as follows:  
\[W_{\gamma}=\{w_{i}\}=\frac{\gamma_{i}}{\sum_{j=1}^{C}\gamma_{j}},\quad i,j=1,2,\dots,C \tag{9}\]  
Figure 6: The structure of the density branch based on convolutions. After obtaining the normalized weights, the _sigmoid_ function processes the weight vector to amplify differences between rich features and coefficient features. The gating unit then inputs the processed weight vectors into two directions. Based on a set threshold \(\theta\), elements greater than \(\theta\) are set to \(1\) (\(W_{1}\)), and those less than or equal to \(\theta\) are set to \(0\) (\(W_{2}\)). The expression for \(W_{i}\in 1,2\) is as follows:  
\[W_{i}=\textit{Threshold}(\textit{Sigmoid}(W_{\gamma})) \tag{10}\]  
The threshold operation generates two weight vectors, which are then multiplied by the input features to generate \(X_{1}\) and \(X_{2}\). \(X_{1}\) contains richer feature information, while \(X_{2}\) contains less semantic information. To eliminate redundancy while preserving features, a spatial reconstruction module is designed to restructure the features. Traditional convolution operations, which use fixed-size kernels for feature extraction along each channel, can introduce channel redundancy. To address this, the CRU module employs a separation and fusion strategy. Specifically, the input features are grouped, and \(1\times 1\) convolutions are applied to compress the channels of these groups, thereby reducing computational costs. The key components GWC [26] and PWC [27] minimize channel redundancy: GWC applies \(k\times k\) convolutions to the grouped feature maps, while PWC uses \(1\times 1\) convolutions to enhance inter-channel communication.