Training method, medium and device for image detection model based on feature pyramid
By building a triangular feature pyramid fusion network with multiple fusion paths, the problem of difficulty in fusion of multi-scale feature information in the prior art is solved, and the accuracy and efficiency of security image detection are improved.
Patent Information
- Application Number
- CN202011449545.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-09
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2040-12-09
AI Technical Summary
The existing target detection network is difficult to fuse multi-scale feature information in security images, resulting in low detection accuracy.
Using the training method of image detection model based on feature pyramids, a triangular feature pyramid fusion network with at least five different fusion paths is constructed to fuse feature maps of different scales, and retain more detailed information and original information.
It improves the detection accuracy of the model and improves the performance and efficiency of the detection network in the security inspection field.
Smart Images

Figure CN114612374B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of image processing technology, and in particular, relates to a training method for an image detection model based on a feature pyramid, a computer-readable storage medium, and a computer device. Background Art
[0002] X-ray security inspection technology is widely used for security control in public transportation places such as subways and airports. Its advantage is that it can detect whether dangerous goods are contained without touching the passenger's package, which well protects the privacy of passengers. In order to adapt to the increasing traffic throughput and severe security situation, security inspection work must have both high real-time and accuracy. However, in real life, the current mainstream working method is mainly for security personnel who have received certain professional training to conduct visual screening. The quality and efficiency of security inspection work are easily negatively affected by external factors such as work status, emotional fluctuations, and work intensity. In addition, the initial training expenses and high labor costs are also one of the inherent disadvantages that enterprises cannot ignore.
[0003] The object detection algorithm based on deep learning effectively overcomes the shortcomings of the existing methods discussed above, and shows great potential in the detection of dangerous goods in X-ray security inspection images. As an auxiliary detection method, the use of algorithms to automatically detect dangerous goods can maintain the vigilance of human operators to a certain extent, reduce the false detection rate and shorten the response time, and can also significantly reduce labor costs.
[0004] Due to its broad application prospects and market value, automatic detection of dangerous goods in X-ray security inspection images based on deep learning has always been one of the research hotspots in academia and industry. Generally speaking, target detection algorithms based on deep learning are mainly divided into anchor-based and anchor-free networks based on whether a pre-set anchor mechanism is used. Among the common target detection algorithms, networks such as Faster R-CNN, Mask R-CNN, and RetinaNet are anchor-based, while networks such as FCOS and CenterNet are anchor-free.
[0005] The object detection networks discussed above (Faster R-CNN, Mask R-CNN, RetinaNet, YOLOv3, etc.) have achieved impressive performance in the automatic detection of dangerous goods in public X-ray security inspection image datasets. However, the above networks all use the most basic feature fusion module FPN, which plays a role in fusing features of different scales to a certain extent, which can improve accuracy. However, the nature of security inspection images is very complex. Not only do they contain a large number of dangerous goods of varying sizes and shapes, but they are also affected by a lot of background information interference and potential problems such as occlusion and overlap. Ordinary simple feature fusion structures cannot further fuse multi-scale feature information and cannot extract more detailed information for the network for subsequent classification and positioning, making the overall performance unsatisfactory. Summary of the invention
[0006] (I) Technical Problems to be Solved by the Present Invention
[0007] How to integrate more scale features during the training process to obtain more detailed information to improve the classification prediction accuracy of the model.
[0008] (II) Technical solution adopted by the present invention
[0009] The present application discloses a training method for an image detection model based on a feature pyramid. The image detection model to be trained includes a feature extraction network, a triangular feature pyramid fusion network and a regression prediction network. The triangular feature pyramid fusion network includes a plurality of fusion units, and the triangular feature pyramid fusion network has at least five different fusion paths. The training method includes:
[0010] Inputting the acquired original detection image into the feature extraction network to obtain a plurality of hierarchical feature maps of different scales;
[0011] Inputting the hierarchical feature map into the triangular feature pyramid fusion network to obtain a plurality of fused feature maps of different scales;
[0012] Input several fused feature maps of different scales into the regression prediction network to obtain the predicted target value;
[0013] Update the loss function based on the predicted target value and the obtained true target value;
[0014] The network parameters of the image detection model to be trained are updated according to the updated loss function.
[0015] Preferably, the triangular feature pyramid fusion network includes at least three fusion layers, and the number of fusion layers decreases as the scale of the fusion layer decreases.
[0016] Preferably, the triangular feature pyramid fusion network has:
[0017] The first fusion path is used to fuse feature maps of different scales;
[0018] The second fusion path is used to shorten the distance from low-level features to high-level features;
[0019] The third fusion path is used to fuse feature information of the same scale;
[0020] A fourth fusion path is used to fuse data of fusion units located in two adjacent fusion layers and located in the first fusion path and the second fusion path;
[0021] The fifth fusion path is used to fuse the feature information of the input unit and the output unit of the same fusion layer.
[0022] Preferably, the triangular feature pyramid fusion network includes five fusion layers, and the numbers of fusion units in the five fusion layers are five, four, three, two and one respectively.
[0023] Preferably, the image detection model to be trained further includes a symmetric triangular feature pyramid fusion network, the symmetric triangular feature pyramid fusion network includes a plurality of fusion units, the symmetric triangular feature pyramid fusion network has at least five different fusion paths, and each fusion unit of the symmetric triangular feature pyramid fusion network is symmetrically distributed with each fusion unit of the triangular feature pyramid fusion network, wherein the training method further includes:
[0024] Inputting the hierarchical feature map into the symmetrical triangular feature pyramid fusion network to obtain a plurality of symmetrical fused feature maps of different scales;
[0025] Adding the fused feature map and the symmetrical fused feature map of the same scale to obtain a global feature map;
[0026] Inputting the global feature maps of different scales into the regression prediction network to obtain a global prediction target value;
[0027] Update the loss function based on the global predicted target value and the obtained true target value;
[0028] The network parameters of the image detection model to be trained are updated according to the updated loss function.
[0029] Preferably, the symmetrical triangular feature pyramid fusion network includes at least three fusion layers, and the number of fusion layers decreases as the scale of the fusion layer increases.
[0030] Preferably, the symmetric triangular feature pyramid fusion network has:
[0031] The sixth fusion path is used to fuse feature maps of different scales;
[0032] The seventh fusion path is used to shorten the distance from low-level features to high-level features;
[0033] The eighth fusion path is used to fuse feature information of the same scale;
[0034] A ninth fusion path, used to fuse fusion units located in two adjacent fusion layers and located in the first fusion path and the second fusion path;
[0035] The tenth fusion path is used to fuse the feature information of the input unit and the output unit of the same fusion layer.
[0036] Preferably, the symmetrical triangular feature pyramid fusion network includes five fusion layers, and the numbers of fusion units in the five fusion layers are five, four, three, two and one respectively.
[0037] The present invention also discloses a computer-readable storage medium, which stores a training program for an image detection model based on a feature pyramid. When the training program for an image detection model based on a feature pyramid is executed by a processor, the training method for an image detection model based on a feature pyramid is implemented.
[0038] The present invention also discloses a computer device, which includes a computer-readable storage medium, a processor, and a training program for an image detection model based on a feature pyramid stored in the computer-readable storage medium. When the training program for an image detection model based on a feature pyramid is executed by the processor, the training method for an image detection model based on a feature pyramid is implemented.
[0039] (III) Beneficial effects
[0040] The present invention discloses a training method for an image detection model based on a feature pyramid, which has the following technical effects compared with the traditional training method:
[0041] This application constructs a fusion network with at least five different fusion paths, so that feature maps of different scales are fully integrated, retaining more detailed information and original information, improving the detection accuracy of the model, and improving the performance and efficiency of the detection network in the security inspection field. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 This is a flow chart of a method for training an image detection model based on a feature pyramid according to Embodiment 1 of the present invention;
[0043] Figure 2 This is a framework diagram of an image detection model based on a feature pyramid according to the first embodiment of the present invention;
[0044] Figure 3 It is a structural schematic diagram of a triangular feature pyramid fusion network according to the first embodiment of the present invention;
[0045] Figure 4 It is a schematic diagram of the structure of a symmetrical triangular feature pyramid fusion network according to the second embodiment of the present invention;
[0046] Figure 5 This is a flow chart of a method for training an image detection model based on a feature pyramid according to Embodiment 2 of the present invention;
[0047] Figure 6 A functional block diagram of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0049] Before describing the various embodiments of the present application in detail, the inventive concept of the present application is first briefly described: the existing target detection network is based on the simplest feature fusion module FPN (feature pyramid network), which can only achieve simple feature fusion. Facing security inspection scenarios, the image properties are complex, and the simple feature fusion module cannot fuse more detailed feature information. The present application constructs a fusion network with at least five different fusion paths, so that feature maps of different scales are fully fused, retaining more detailed information and original information, and improving the detection accuracy of the model.
[0050] Specifically, Figure 1 and Figure 2 As shown, the image detection model to be trained in the first embodiment includes a feature extraction network, a triangular feature pyramid fusion network and a regression prediction network, wherein the triangular feature pyramid fusion network includes a plurality of fusion units, and the triangular feature pyramid fusion network has at least five different fusion paths. The training method of the image detection model based on the feature pyramid includes the following steps:
[0051] Step S10: inputting the acquired original detection image into the feature extraction network to obtain a plurality of hierarchical feature maps of different scales;
[0052] Step S20: inputting the hierarchical feature map into the triangular feature pyramid fusion network to obtain a plurality of fused feature maps of different scales;
[0053] Step S30: inputting a plurality of fused feature maps of different scales into a regression prediction network to obtain a predicted target value;
[0054] Step S40: updating the loss function according to the predicted target value and the acquired true target value;
[0055] Step S50: Update the network parameters of the image detection model to be trained according to the updated loss function.
[0056] Exemplarily, in step S10, the feature extraction network uses the C3-C5 layer of ResNet, and the acquired original detection image is input into the feature extraction network to obtain three hierarchical feature maps C3, C4 and C5 with increasing scales. In order to obtain hierarchical feature maps of more scales, they can be obtained by downsampling, for example, downsampling C5 to obtain C6 with a higher scale, downsampling C6 to obtain C7 with a higher scale, and so on. This embodiment 1 takes hierarchical feature maps of five scales as an example.
[0057] Furthermore, the triangular feature pyramid fusion network includes at least three fusion layers, and the number of fusion layers decreases as the scale of the fusion layer decreases. As a preferred embodiment, the triangular feature pyramid fusion network includes five fusion layers, namely, a first fusion layer R1, a second fusion layer R2, a third fusion layer R3, a fourth fusion layer R4, and a fifth fusion layer R5, and the number of fusion units in the five fusion layers is five, four, three, two, and one respectively. Figure 2 As shown, each blank circle represents a fusion unit. The triangular feature pyramid fusion network of the first embodiment includes 15 fusion units. The scales of the five fusion layers decrease from top to bottom, and the number of fusion units decreases from top to bottom. The fusion units in each fusion layer have the same scale as the hierarchical feature map of the corresponding layer. The last fusion unit in each fusion layer is called the output unit (P3-P7). The direction of the arrow represents the transmission direction of the data, that is, the fusion path.
[0058] As a preferred embodiment, the triangular feature pyramid fusion network has: a first fusion path 11, a second fusion path 12, a third fusion path 13, a fourth fusion path 14 and a fifth fusion path 15. Among them, the first fusion path 11 is from top to bottom, from a large-scale fusion unit to a small-scale fusion unit, and the first fusion path 11 is used to fuse feature maps of different scales. The second fusion path 12 is from bottom to top, from a small-scale fusion unit to a large-scale fusion unit, and the second fusion path 12 is used to shorten the distance from low-level features to high-level features. The third fusion path 13 horizontally connects the fusion units of the same layer to fuse feature information of the same scale. The fourth fusion path 14 diagonally connects two adjacent fusion units to fuse fusion units located in two adjacent fusion layers and located in the first fusion path and the second fusion path. The fifth fusion path 15 is used to fuse the feature information of the input unit and the output unit of the same fusion layer to retain more original information. It should be noted that when fusing features of different scales, the resolution of each feature needs to be adjusted to the same. Taking the input unit P5 as an example, since the higher the level of the feature, the lower the resolution, it needs to be enlarged, and the lower the level of the feature, the higher the resolution, it needs to be compressed. For example, the feature information transmitted from the fusion unit P4 of the fourth fusion layer R4 to P5 needs to be compressed 0.5 times, and the feature information transmitted from the fusion unit of the second fusion layer R2 to P5 needs to be enlarged 2 times.
[0059] Exemplarily, in step S20, the hierarchical feature maps C3-C7 of five scales are respectively input into the corresponding triangular feature pyramid fusion network mentioned above to obtain fused feature maps P of five different scales. 3 , P 4 , P 5 , P 6 , P 7 .
[0060] Further, in step S30, the fusion feature maps P of five different scales are 3 , P 4 , P 5 , P 6 , P 7 Input to the regression prediction network to obtain the predicted target value, where the target prediction value includes category and position. For example, the regression prediction network uses a first-order fully convolutional object detection network (Fully Convolutional One-Stage Object Detection, referred to as FCOS). The five heads in the figure represent five different scales, respectively detecting five different ranges of dangerous goods. For example, the input feature units of the five heads from bottom to top are P 3 , P 4 , P5 , P 6 , P 7 , the ranges of dangerous goods detected are [0, 64], [64, 128], [128, 256], [256, 512], [512, +∞]. Any samples exceeding this range or background samples will be considered negative samples. The pixel-by-pixel prediction method is adopted here, that is, each pixel is regarded as a key point and regression prediction positive samples are calculated. If a pixel falls into multiple real label areas in the same layer, the smallest area is used as the regression target. Repeat until the detection of the entire image is completed.
[0061] Further, in step S40 and step S50, the loss function is updated according to the predicted target value and the acquired real target value, and the network parameters of the image detection model to be trained are updated according to the updated loss function. Among them, the updating process of the loss function and the updating process of the network parameters are both prior arts, which are well known to those skilled in the art and will not be described in detail here.
[0062] The training method of the image detection model based on the feature pyramid provided in the first embodiment of the present invention, by constructing a fusion network with at least five different fusion paths, enables feature maps of different scales to be fully fused, retains more detail information and original information, improves the detection accuracy of the model, and enhances the performance and efficiency of the detection network in the security inspection field.
[0063] The training method of the image detection model based on the feature pyramid disclosed in the second embodiment adds a symmetric triangular feature pyramid fusion network on the basis of the first embodiment. The symmetric triangular feature pyramid fusion network includes a plurality of fusion units. The symmetric triangular feature pyramid fusion network has at least five different fusion paths, and the fusion units of the symmetric triangular feature pyramid fusion network are symmetrically distributed with the fusion units of the triangular feature pyramid fusion network.
[0064] The symmetrical triangular feature pyramid fusion network includes at least three fusion layers, and the number of fusion layers decreases as the scale of the fusion layer increases. The symmetrical triangular feature pyramid fusion network includes five fusion layers, namely the sixth fusion layer R6, the seventh fusion layer R7, the eighth fusion layer R8, the ninth fusion layer R9, and the tenth fusion layer R10. The number of fusion units in the five fusion layers is five, four, three, two, and one respectively. As shown in the figure, the symmetrical triangular feature pyramid fusion network of the second embodiment includes 15 fusion units, the scale of the five fusion layers decreases from top to bottom, and the number of fusion units increases from top to bottom. The fusion unit in each fusion layer is the same as the scale of the hierarchical feature map of the corresponding layer. The last fusion unit in each fusion layer is called the output unit (N3-N7). The direction of the arrow represents the transmission direction of the data, that is, the fusion path.
[0065] As a preferred embodiment, the triangular feature pyramid fusion network has: a sixth fusion path 16, a seventh fusion path 17, an eighth fusion path 18, a ninth fusion path 19 and a tenth fusion path 20. Among them, the sixth fusion path 16 is from top to bottom, from a large-scale fusion unit to a small-scale fusion unit, and the sixth fusion path 16 is used to fuse feature maps of different scales. The seventh fusion path 17 is from bottom to top, from a large-scale fusion unit to a small-scale fusion unit, and the seventh fusion path 17 is used to shorten the distance from high-level features to low-level features. The eighth fusion path 18 horizontally connects the fusion units of the same layer to fuse feature information of the same scale. The ninth fusion path 19 diagonally connects two adjacent fusion units to fuse fusion units located in two adjacent fusion layers and located in the seventh fusion path 17 and the eighth fusion path 18. The tenth fusion path 20 is used to fuse the feature information of the input unit and the output unit of the same fusion layer to retain more original information. It should be noted that when fusing features of different scales, the resolution of each feature needs to be adjusted to the same.
[0066] Furthermore, if Figure 5 As shown, the training method of the second embodiment also includes:
[0067] Step S20': inputting the hierarchical feature map into the symmetrical triangular feature pyramid fusion network to obtain a plurality of symmetrical fused feature maps of different scales;
[0068] Step S30': adding the fused feature map and the symmetrical fused feature map of the same scale to obtain a global feature map;
[0069] Step S40': inputting the global feature maps of different scales into the regression prediction network to obtain a global prediction target value;
[0070] Step S50': updating the loss function according to the global predicted target value and the acquired true target value;
[0071] Step S60': updating the network parameters of the image detection model to be trained according to the updated loss function.
[0072] Specifically, in step S20', the hierarchical feature maps C3-C7 of five scales are respectively input into the corresponding symmetrical triangular feature pyramid fusion network mentioned above to obtain five fused feature maps N of different scales. 3 、N 4 、N 5 、N 6 、N 7 .
[0073] In step S30′, the fused feature map and the symmetrical fused feature map of the same scale are added to obtain a global feature map, namely, P 3 +N 3 =M 3 , P 4 +N 4 =M 4 , P 5 +N 5 =M 5 , P 6 +N 6 =M 6 , P 7 +N 7 =M 7 , the global feature maps are M 3 、M 4 、M 5 、M 6 、M 7 In step S40', the fusion feature maps M of five different scales are 3 、M 4 、M 5 、M 6 、M 7 Input to the regression prediction network to obtain the predicted target value, where the target prediction value includes category and position. For example, the regression prediction network uses a first-order fully convolutional target detection network (Fully Convolutional One-Stage Object Detection, referred to as FCOS). The five heads in the figure represent five different scales, respectively detecting five different ranges of dangerous goods. For example, the input feature units of the five heads from bottom to top are M 3 、M 4 、M 5 、M 6 、M 7, the ranges of dangerous goods detected are [0, 64], [64, 128], [128, 256], [256, 512], [512, +∞]. Any samples exceeding this range or background samples will be considered negative samples. The pixel-by-pixel prediction method is adopted here, that is, each pixel is regarded as a key point and regression prediction positive samples are calculated. If a pixel falls into multiple real label areas in the same layer, the smallest area is used as the regression target. Repeat until the detection of the entire image is completed.
[0074] In step S50' and step S60', the loss function is updated according to the global predicted target value and the acquired true target value, and the network parameters of the image detection model to be trained are updated according to the updated loss function. Among them, the updating process of the loss function and the updating process of the network parameters are both prior arts, which are well known to those skilled in the art and will not be described in detail here.
[0075] The training method of the image detection model based on the feature pyramid provided in the second embodiment, on the basis of the first embodiment, constructs another symmetrical triangular feature pyramid fusion network with at least five different fusion paths, which is used in conjunction with the triangular feature pyramid fusion network to obtain a global feature map. The symmetrical structure can effectively supplement the global feature information, retain more detail information and original information, improve the detection accuracy of the model, and enhance the performance and efficiency of the detection network in the security inspection field.
[0076] Furthermore, the present embodiment discloses a computer-readable storage medium, which stores a training program for an image detection model based on a feature pyramid. When the training program for an image detection model based on a feature pyramid is executed by a processor, the training method for an image detection model based on a feature pyramid is implemented.
[0077] Furthermore, the present application also discloses a computer device, at the hardware level, such as Figure 6 As shown, the computer device includes a processor 20, an internal bus 30, a network interface 40, and a computer-readable storage medium 50. The processor 20 reads the corresponding computer program from the computer-readable storage medium and then runs it, forming a request processing device at the logical level. Of course, in addition to software implementations, one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logical unit, but can also be hardware or logic devices. The computer-readable storage medium 50 stores a training program for an image detection model based on a feature pyramid, and when the training program for an image detection model based on a feature pyramid is executed by the processor, the above-mentioned training method for an image detection model based on a feature pyramid is implemented.
[0078] Computer-readable storage media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, modules of programs or other data. Examples of computer-readable storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0079] In order to verify the effect of the image detection model obtained by the training method of Example 2, we selected 3130 gun images and 1953 knife images in the SIXray dataset as the evaluation dataset for our experiment. The proposed method is experimented with the Pytorch backend in Python 3.6. We scaled the image to 1333×800 as input and trained the model on an NVIDIA TITAN RTX with 24GB RAM. During the training phase, we used a stochastic gradient optimizer with a learning rate of 0.0001 and a weight decay of 0.001. All datasets were randomly divided into training sets (60%), validation sets (20%), and test sets (20%) so that each split had a similar distribution.
[0080] Different methods are used to detect guns and knives on SIXray data under the premise of consistent training parameters. The AP value of each category and the overall mAP results are shown in Table 1. The model (Ours) obtained by this training method has the best results among the listed methods in terms of the AP value of each category and the overall performance mAP results, which verifies the superiority of the model obtained by this training method in the automatic detection of dangerous goods in X-ray security inspection images.
[0081]
[0082] Table 1. Accuracy comparison of different methods on the SIXray dataset
[0083] The specific implementation methods of the present invention are described in detail above. Although some embodiments have been shown and described, those skilled in the art should understand that these embodiments can be modified and improved without departing from the principles and spirit of the present invention, the scope of which is defined by the claims and their equivalents. These modifications and improvements should also be within the scope of protection of the present invention.
Claims
1. A training method for an image detection model based on a feature pyramid, characterized in that: The image detection model to be trained includes a feature extraction network, a triangular feature pyramid fusion network and a regression prediction network, wherein the triangular feature pyramid fusion network includes a plurality of fusion units, and the triangular feature pyramid fusion network has at least five different fusion paths, and the training method includes: Inputting the acquired original detection image into the feature extraction network to obtain a plurality of hierarchical feature maps of different scales; Inputting the hierarchical feature map into the triangular feature pyramid fusion network to obtain a plurality of fused feature maps of different scales; Input several fused feature maps of different scales into the regression prediction network to obtain the predicted target value; Update the loss function based on the predicted target value and the obtained true target value; Update the network parameters of the image detection model to be trained according to the updated loss function; The triangular feature pyramid fusion network has: The first fusion path is used to fuse feature maps of different scales; The second fusion path is used to shorten the distance from low-level features to high-level features; The third fusion path is used to fuse feature information of the same scale; A fourth fusion path is used to fuse data of fusion units located in two adjacent fusion layers and located in the first fusion path and the second fusion path; The fifth fusion path is used to fuse the feature information of the input unit and the output unit of the same fusion layer.
2. The method for training an image detection model based on a feature pyramid according to claim 1, characterized in that: The triangular feature pyramid fusion network includes at least three fusion layers, and the number of fusion layers decreases as the scale of the fusion layer decreases.
3. The training method of the image detection model based on the feature pyramid according to claim 1, characterized in that: The triangular feature pyramid fusion network includes five fusion layers, and the number of fusion units in the five fusion layers is five, four, three, two and one respectively.
4. The training method of the image detection model based on the feature pyramid according to claim 1, characterized in that: The image detection model to be trained also includes a symmetric triangular feature pyramid fusion network, the symmetric triangular feature pyramid fusion network includes a plurality of fusion units, the symmetric triangular feature pyramid fusion network has at least five different fusion paths, and each fusion unit of the symmetric triangular feature pyramid fusion network is symmetrically distributed with each fusion unit of the triangular feature pyramid fusion network, wherein the training method further includes: Inputting the hierarchical feature map into the symmetrical triangular feature pyramid fusion network to obtain a plurality of symmetrical fused feature maps of different scales; Adding the fused feature map and the symmetrical fused feature map of the same scale to obtain a global feature map; Inputting the global feature maps of different scales into the regression prediction network to obtain a global prediction target value; Update the loss function based on the global predicted target value and the obtained true target value; The network parameters of the image detection model to be trained are updated according to the updated loss function.
5. The method for training an image detection model based on a feature pyramid according to claim 4, characterized in that: The symmetrical triangular feature pyramid fusion network includes at least three fusion layers, and the number of fusion layers decreases as the scale of the fusion layer increases.
6. The method for training an image detection model based on a feature pyramid according to claim 5, characterized in that: The symmetric triangular feature pyramid fusion network has: The sixth fusion path is used to fuse feature maps of different scales; The seventh fusion path is used to shorten the distance from low-level features to high-level features; The eighth fusion path is used to fuse feature information of the same scale; A ninth fusion path, used to fuse fusion units located in two adjacent fusion layers and located in the first fusion path and the second fusion path; The tenth fusion path is used to fuse the feature information of the input unit and the output unit of the same fusion layer.
7. The method for training an image detection model based on a feature pyramid according to claim 5, characterized in that: The symmetrical triangular feature pyramid fusion network includes five fusion layers, and the number of fusion units in the five fusion layers is five, four, three, two and one respectively.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a training program for an image detection model based on a feature pyramid, and when the training program for an image detection model based on a feature pyramid is executed by a processor, the training method for an image detection model based on a feature pyramid according to any one of claims 1 to 7 is implemented.
9. A computer device, characterized in that: The computer device includes a computer-readable storage medium, a processor, and a training program for an image detection model based on a feature pyramid stored in the computer-readable storage medium. When the training program for an image detection model based on a feature pyramid is executed by the processor, the training method for an image detection model based on a feature pyramid according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method for carrying out defect identification on overhead line system image of railway
CN111951212A
End-to-end recognition method for scene text in any shape
WO2019192397A1