# Faster RCNN Target Detection Algorithm Integrating CBAM and FPN
## 3 Model Design and Implementation  
### Faster RCNN Model Design  
Faster RCNN is a classic network proposed by [PERSON] in 2015 [PERSON] (2015). It consists of four modules, namely the feature extraction network module (Conv layers) [PERSON] (2015), Region Proposal Network (RPN) [PERSON] et al. (2018); [PERSON] et al. (2018) module, ROI Pooling [PERSON] et al. (2018) module, and Classification and Regression [PERSON] et al. (2018) module. The frame diagram of Faster RCNN is shown in Figure 1.  
After the original image is input, the shared convolution layer computes it. The results can be shared with the RPN. RPN makes region suggestions (about 300) on the feature map after convolutional neural network (CNN) convolution, extracts feature maps according to the region suggestions generated by RPN, performs ROI pooling on the extracted features, then classifies and regresses the processed data through the full connection layer. The feature extraction network module [PERSON] (2015) is an important part of the Fast RCNN algorithm. The flow of the feature extraction module is shown in Figure 2.  
Figure 1: Schematic diagram of Fast RCNN algorithm framework. Figure 2: Feature extraction flow chart. After normalization, the prepared dataset is divided into the training set and the test set. When the training set is trained by the Support Vector Machine (SVM) [24] model, better parameters are obtained by iteration, and finally, the SVM model meeting the requirements is obtained. The test dataset is input into the optimized SVM model, and the output result is finally obtained. VGG16 is used as the feature extraction network in Faster RCNN. To break through the bottleneck of region selection in the predecessor target detection model, the new Fast RCNN algorithm model innovatively proposes the RPN algorithm, replacing the selective search (SS) [25] algorithm model used in Fast RCNN and RCNN, that is, the Faster RCNN algorithm can be understood as RPN + Fast RCNN. The SS algorithm is a simple image processing without a training function. RPN is a fully convolutional network, and its first several convolutional layers are the same as the first five layers of Faster R-CNN, so RPN can share the calculation results of convolutional layers to reduce the time consumption of region suggestions. The RPN module is used to replace the candidate region selection mode of the original SS algorithm, thus greatly reducing the time cost. RPN selects candidate regions according to image color, shape, and size, and usually selects 2000 candidate boxes that may contain identification objects. When the detected image is input to the feature extraction network module, the feature image is generated after the module convolution operation, and it is input to the RPN module to select candidate regions. This module uses the center point of the sliding window as the anchor. All the pixels in the feature picture correspond to k anchor points, generating 128-, 256-, 512-pixel areas and 1:1, 1:2, and 2:1 scale windows, respectively. The combined result is a total of 9 windows, as shown in Figure 3.  
The generated candidate area and convolution layer feature map are input to the ROI Pooling module. ROI Pooling pools feature maps of different sizes into a uniform size, which facilitates their input to the next layer. Following the ROI Pooling module, the target classification and position regression module processes the data output from the ROI Pooling layer to obtain the object category of the candidate area and the modified image block diagram, and its processing formula can be expressed by Formula (1). \[ \begin{array}{l}\hat{G}_{x}=P_{w}d_{x}(P)+P_{x}\\ \hat{G}_{y}=P_{h}d_{y}(P)+P_{y}\\ \hat{G}_{w}=P_{w}\exp(d_{w}(P))\\ \hat{G}_{h}=P_{h}\exp(d_{h}(P))\end{array}  \tag{1}\]  
Figure 3: RPN structure diagram.