# End-to-End Object Detection with Enhanced Positive Sample Filter
## 3 Method
### Enhanced Positive Sample Filter
#### 3.3.2 Disentangled Max Pooling Filter  
In addition to performing positive sample selection based on richer features, we also need to make full use of these features to generate adaptive predictions in different local regions. Our goal was to select only one positive sample for each GT instance. Concretely, the selected positive sample should achieve a higher classification score than the other samples involved with the same GT instance, where the larger score gap is better. In this work, we aim to produce a selection mask to adjust classification scores generated by the classification branch, which was trained with one-to-many assignment strategy. It is challenging for a fully convolutional network since convolutional is a linear operation with a transitional invariance property and tends to produce similar features for predictions related to the same GT instance. The 3 DMF module [12] has made an attempt to utilize a rank-based non-linear 3D max filter to compensate for the discriminability of convolutions in the local region. Similar solutions were also used in [27; 28]. In detail, it [12] enhances features in each level via performing 3D max pooling on multi-scale adjacent features, whose key idea is searching for the maximum value in a range of local regions across adjacent levels to update the value in the current location. Although it has been proved to be effective, it suffers from at least two drawbacks: (1) Locations in feature maps with the local maximum values may be false positives. These errors may be broadcast via the max pooling operation, which may lead to more false positives; (2) Some true positives with lower responses than false positives cannot be concerned by the max pooling operation. However, it can provide correct information in local regions. To handle the above-mentioned drawbacks, we proposed a Disentangled Max Pooling filter (DeMF) as presented in Figure 3. The pipeline of DeMF contains three disentangled streams: residual, first max pooling and second max pooling streams. The predicted positive sample selection mask \(M_{\textit{epsf}}\) can be obtained by:  
\[M_{\textit{epsf}}=\text{Sigmoid}(\text{Conv}(\text{ReLU}(\text{GN}(F_{\textit{ res}}+\text{MP}_{1 st}+\text{MP}_{2 nd})))),\]  
where \(F_{\textit{res}}\), \(\text{MP}_{1 st}\) and \(\text{MP}_{2 nd}\) denote the above-mentioned three streams, respectively, which are combined by an element-wise addition and several operations (i.e., Group Normalization, ReLU function and a convolutional layer, and the Sigmoid function). Next, we will introduce three streams in detail. The residual stream keeps the original information learned by the backbone convolutional neural network. It is a necessary component that maintains the chances for all samples to contribute to the optimization of the model in the fully end-to-end training pipeline. The first max pooling stream leverages local maximum values to enhance the distinction of corresponding local regions. We have mentioned that local maximum values are sometimes not reliable due to the existence of outliers, noises or some other false positives. To revise the potential errors to some extent, the second max pooling stream introduces the local secondary-maximum values so as to provide additional references to activations in local regions. Moreover, since samples with secondary-maximum values are also likely to be true positives, they should be focused on more during training. The ensemble of three streams provides more reliable and robust feature representations that help with more confident positive sample selection. Concretely, the residual stream was constructed by a shortcut connection from the input feature \(X_{L}\) (features in \(L\)th level of FPN). As for the first max pooling stream, we firstly applied a convolution layer to generate \(x_{l}\) (the index \(l\) represents in the \(l\)th level) from the original feature.