The goals of object detection are to accurately detect and locate objects of various sizes in digital images. Multi-scale processing technology can improve the detection accuracy of the detector. Feature pyramid networks (FPNs) have been proven to be effective in extracting multi-scaled features. However, most existing object detection methods recognize objects in isolation, without considering contextual information between objects. Moreover, for the sake of computational efficiency, a significant reduction in the channel dimension may lead to the loss of semantic information. This study explores the utilization of attention mechanisms to augment the representational power and efficiency of features, ultimately improving the accuracy and efficiency of object detection. The study proposed a novel hierarchical attention feature pyramid network (HA-FPN), which comprises two key components: transformer feature pyramid networks (TFPNs) and channel attention modules (CAMs). In TFPNs, multi-scaled convolutional features are embedded as tokens and self-attention is applied to across both the intra- and inter-scales to capture contextual information between the tokens. CAMs are employed to select the channels with rich channel information to alleviate massive channel information losses. By introducing contextual information and attention mechanisms, the HA-FPN significantly improves the accuracy of bounding box detection, leading to more precise identification and localization of target objects. Extensive experiments conducted on the challenging MS COCO dataset demonstrate that the proposed HA-FPN outperforms existing multi-object detection models, while incurring minimal computational overhead.
The inconsistency between classification and regression is a common problem in the field of object detection. Such inconsistency may lead to undetected objects, false detection, and regression boxes overlapping in the detection results. It has been determined that the inconsistency is mainly caused by feature coupling and the lack of information regarding the interactions between detection heads. In this study, the characteristics of spatial invariance were used, and the ability to fit the data distribution was enhanced by fully connected layers. A feature fusion module (FFM) was proposed in order to enhance the capabilities of the model’s feature extractions. This study also further considered the inconsistency between the loss functions and the proposed regression loss function (RMAE) based on mean absolute error (MAE) for the purpose of improving the location quality. Furthermore, in order to solve the problem of the lack of information regarding the interactions between detection heads, an inconsistency loss function (Lin) was added on the basis of the feature fusion module. Then, to evaluate the effectiveness of the proposed methods, the proposed feature fusion network (FMRNet) was trained based on RetinaNet. The experimental results demonstrated that this study’s proposed methods surpassed the accuracy of some existing detectors when FMRNet was adopted. It was confirmed that the proposed methods had the ability to solve the problems of undetected objects, false detection, and regression boxes overlapping.