WO2022120901A1 - Image detection model training method based on feature pyramid, medium, and device - Google Patents

Image detection model training method based on feature pyramid, medium, and device Download PDF

Info

Publication number
WO2022120901A1
WO2022120901A1 PCT/CN2020/136553 CN2020136553W WO2022120901A1 WO 2022120901 A1 WO2022120901 A1 WO 2022120901A1 CN 2020136553 W CN2020136553 W CN 2020136553W WO 2022120901 A1 WO2022120901 A1 WO 2022120901A1
Authority
WO
WIPO (PCT)
Prior art keywords
fusion
feature
network
feature pyramid
layers
Prior art date
Application number
PCT/CN2020/136553
Other languages
French (fr)
Chinese (zh)
Inventor
胡庆茂
张伟烽
Original Assignee
中国科学院深圳先进技术研究院
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中国科学院深圳先进技术研究院 filed Critical 中国科学院深圳先进技术研究院
Publication of WO2022120901A1 publication Critical patent/WO2022120901A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/80Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20016Hierarchical, coarse-to-fine, multiscale or multiresolution image processing; Pyramid transform
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging

Definitions

  • the invention belongs to the technical field of image processing, and in particular, relates to a training method of an image detection model based on a feature pyramid, a computer-readable storage medium, and a computer device.
  • X-ray security inspection technology is widely used in the safety control of public transportation places such as subways and airports.
  • security inspection In order to adapt to the ever-increasing traffic throughput and severe security situation, security inspection must have both high real-time and accuracy.
  • the current mainstream work methods are mainly screened by security staff who have undergone certain professional training.
  • the quality and efficiency of security inspections are easily negatively affected by external factors such as work status, mood swings, and work intensity.
  • the pre-training expenditure and high labor cost are also one of the inherent disadvantages of the enterprise that cannot be ignored.
  • the target detection algorithm based on deep learning effectively overcomes the shortcomings of the existing methods discussed above, and has shown great potential in the detection of dangerous goods in X-ray security images.
  • the use of algorithms to automatically detect dangerous goods can maintain the alertness of human operators to a certain extent, reduce the false detection rate and response time, and greatly reduce labor costs.
  • target detection algorithms based on deep learning are mainly divided into anchor-based and anchor-free networks according to whether a preset anchor mechanism is used.
  • target detection algorithms mainly divided into anchor-based and anchor-free networks according to whether a preset anchor mechanism is used.
  • Faster R-CNN, Mask R-CNN, RetinaNet and other networks are anchor-based mechanisms
  • FCOS, CenterNet and other networks are anchor-free mechanisms.
  • the object detection networks discussed above have achieved impressive performance in the automatic detection of dangerous goods in public X-ray security image datasets.
  • the above networks all use the most basic feature fusion module FPN, which to a certain extent plays the role of fusing features of different scales, which can improve the accuracy.
  • the security inspection image is very complex in nature, not only contains a large number of dangerous goods of varying sizes and shapes, but also has a lot of background information interference and potential problems such as occlusion and overlap.
  • Ordinary simple feature fusion structures cannot further integrate multi-scale The feature information and the inability to extract more detailed information for the network for subsequent classification and localization make the overall performance unsatisfactory.
  • 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, wherein the triangular feature pyramid fusion network includes several fusion units. And the triangular feature pyramid fusion network has at least five different fusion paths, and the training method includes:
  • the network parameters of the image detection model to be trained are updated according to the updated loss function.
  • 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 layers decreases.
  • the triangular feature pyramid fusion network has:
  • the first fusion path is used for fusion to form feature maps of different scales
  • the second fusion path is used to shorten the transmission distance from low-level features to high-level features
  • the third fusion path is used to fuse the feature information of the same scale
  • the fourth fusion path is used to fuse the data of the fusion units that are respectively located in the two adjacent fusion layers and are respectively 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.
  • 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.
  • the image detection model to be trained further includes a symmetrical triangular feature pyramid fusion network
  • the symmetrical triangular feature pyramid fusion network includes several fusion units
  • the symmetrical triangular feature pyramid fusion network has at least five different fusion paths.
  • each fusion unit of the symmetrical triangular feature pyramid fusion network and each fusion unit of the triangular feature pyramid fusion network are symmetrically distributed, wherein the training method further includes:
  • the network parameters of the image detection model to be trained are updated according to the updated loss function.
  • the symmetric triangular feature pyramid fusion network includes at least three fusion layers, and the number of fusion layers decreases as the scale of the fusion layers increases.
  • the symmetrical triangular feature pyramid fusion network has:
  • the sixth fusion path is used to fuse to form feature maps of different scales
  • the seventh fusion path is used to shorten the transmission distance from low-level features to high-level features
  • the eighth fusion path is used to fuse the feature information of the same scale
  • a ninth fusion path used to fuse fusion units that are respectively located in two adjacent fusion layers and are respectively 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.
  • 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.
  • the present invention also discloses a computer-readable storage medium, which stores a training program of the image detection model based on the feature pyramid, and when the training program of the image detection model based on the feature pyramid is executed by the processor.
  • the above-mentioned training method of the image detection model based on the feature pyramid is realized.
  • the present invention also discloses a computer device, which includes a computer-readable storage medium, a processor, and a training program for a feature pyramid-based image detection model stored in the computer-readable storage medium.
  • a computer device which includes a computer-readable storage medium, a processor, and a training program for a feature pyramid-based image detection model stored in the computer-readable storage medium.
  • the 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:
  • the application constructs a fusion network with at least five different fusion paths, so that the feature maps of different scales are fully fused, more detailed information and original information are retained, the detection accuracy of the model is improved, and the detection network in the field of security inspection is improved. performance and efficiency.
  • FIG. 1 is a flowchart of a training method for an image detection model based on a feature pyramid according to Embodiment 1 of the present invention
  • FIG. 2 is a frame diagram of an image detection model based on a feature pyramid according to Embodiment 1 of the present invention
  • FIG. 3 is a schematic structural diagram of a triangular feature pyramid fusion network according to Embodiment 1 of the present invention.
  • FIG. 4 is a schematic structural diagram of a symmetrical triangular feature pyramid fusion network according to Embodiment 2 of the present invention.
  • FIG. 5 is a flowchart of a method for training an image detection model based on a feature pyramid according to Embodiment 2 of the present invention
  • FIG. 6 is a schematic block diagram of a computer device according to an embodiment of the present invention.
  • the existing target detection network is based on the simplest feature fusion module FPN (Feature Pyramid Network), which can only achieve simple feature fusion, and faces security inspection. Scenes and images are complex in nature, and a simple feature fusion module cannot fuse more detailed feature information.
  • FPN Feature Pyramid Network
  • this application by constructing a fusion network with at least five different fusion paths, the feature maps of different scales are fully fused, and more features are preserved. Detailed information and original information to improve the detection accuracy of the model.
  • 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 several fusion units, And the triangular feature pyramid fusion network has at least five different fusion paths, and the training method of the image detection model based on the feature pyramid includes the following steps:
  • Step S10 Input the acquired original detection image into the feature extraction network to obtain several hierarchical feature maps of different scales;
  • Step S20 inputting the hierarchical feature map into the triangular feature pyramid fusion network to obtain fusion feature maps of several different scales;
  • Step S30 inputting several fusion feature maps of different scales into the regression prediction network to obtain the prediction target value
  • Step S40 Update the loss function according to the predicted target value and the obtained real target value
  • Step S50 Update the network parameters of the image detection model to be trained according to the updated loss function.
  • the feature extraction network adopts C3-C5 layers of ResNet, and the acquired original detection images are input into the feature extraction network to obtain three hierarchical feature maps C3, C4 and C5 with successively increasing scales.
  • the hierarchical feature map with more scales it can be obtained by downsampling, for example, downsampling C5 to obtain a higher-scale C6, downsampling C6 to obtain a higher-scale C7, and so on.
  • the first embodiment takes the hierarchical feature map of five scales as an example.
  • 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 layers decreases.
  • the triangular feature pyramid fusion network includes five fusion layers, which are the first fusion layer R1, the second fusion layer R2, the third fusion layer R3, the fourth fusion layer R4, and the fifth fusion layer R5, respectively.
  • the number of fusion units in the five fusion layers are five, four, three, two and one, respectively.
  • 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-layer fusion layers decrease sequentially from top to bottom.
  • the number of fusion units is Decrease from top to bottom.
  • the fusion unit in each fusion layer has 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.
  • 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 .
  • 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 for fusion to form 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 transmission distance from low-level features to high-level features.
  • the third fusion path 13 connects the fusion units of the same layer horizontally, and is used to fuse the feature information of the same scale.
  • the fourth fusion path 14 diagonally connects two adjacent fusion units, and is used for fusion of fusion units respectively located in two adjacent fusion layers and respectively 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 merging 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 resolution of a feature with a higher level is lower, it needs to be enlarged. The higher the resolution of the features of the level, the compression processing is required.
  • the feature information transmitted from the fusion unit P4 of the fourth fusion layer R4 to the P5 needs to be compressed by 0.5 times, and transmitted from the fusion unit of the second fusion layer R2 to P5.
  • the feature information of P5 needs to be enlarged by 2 times.
  • step S20 the hierarchical feature maps C3-C7 of five scales are respectively input into the corresponding triangular feature pyramid fusion network to obtain five fusion feature maps P3 , P4 , P 5 , P 6 , P 7 .
  • step S30 input the fused feature maps P 3 , P 4 , P 5 , P 6 , and P 7 of five different scales into the regression prediction network to obtain the predicted target value, where the target predicted value includes categories and Location.
  • the regression prediction network adopts a first-order fully convolutional one-stage object detection network (Fully Convolutional One-Stage Object Detection, FCOS for short). Dangerous Goods.
  • the input feature units of five heads from bottom to top are P 3 , P 4 , P 5 , P 6 , and P 7 respectively, and the range of dangerous goods detected is [0, 64], [64, 128], [ 128, 256], [256, 512], [512, + ⁇ ].
  • Samples that exceed this range or background samples will be considered negative samples.
  • the method of pixel-by-pixel prediction is used here, that is, each pixel is regarded as a key point and a positive sample for regression prediction is calculated. If a pixel falls into multiple ground-truth regions in the same layer, the smallest region is used as the regression target. Repeat until the entire image is detected.
  • the loss function is updated according to the predicted target value and the obtained real target value, and the network parameters of the image detection model to be trained are updated according to the updated loss function.
  • the updating process of the loss function and the updating process of the network parameters are both in the prior art and are well known to those skilled in the art, and will not be repeated here.
  • the training method for an image detection model based on a feature pyramid provided in the first embodiment by constructing a fusion network with at least five different fusion paths, enables the feature maps of different scales to be fully fused, and retains more detailed information and original information, improve the detection accuracy of the model, and improve the performance and efficiency of the detection network in the field of security inspection.
  • the training method for an image detection model based on a feature pyramid disclosed in the second embodiment adds a symmetrical triangular feature pyramid fusion network on the basis of the first embodiment, and the symmetrical triangular feature pyramid fusion network includes several fusion units.
  • the pyramid fusion network has at least five different fusion paths, and each fusion unit of the symmetrical triangular feature pyramid fusion network and each fusion unit of the triangular feature pyramid fusion network are symmetrically distributed.
  • the symmetric triangular feature pyramid fusion network includes at least three fusion layers, and the number of fusion layers decreases as the scale of the fusion layers increases.
  • the symmetrical triangular feature pyramid fusion network includes five fusion layers, which are respectively the sixth fusion layer R6, the seventh fusion layer R7, the eighth fusion layer R8, the ninth fusion layer R9, the tenth fusion layer R10 and the fifth fusion layer.
  • the number of fusion units is five, four, three, two and one, respectively.
  • the symmetrical triangular feature pyramid fusion network of the second embodiment includes 15 fusion units, the scale of the five-layer fusion layer decreases sequentially from top to bottom, and the number of fusion units increases sequentially from top to bottom.
  • the fusion unit in each fusion layer has 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 (N3-N7).
  • the direction of the arrow represents the transmission direction of the data, that is, the fusion path.
  • 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 .
  • 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 for fusion to form 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 transmission distance from high-level features to low-level features.
  • the eighth fusion path 18 connects the fusion units of the same layer horizontally, and is used to fuse the feature information of the same scale.
  • the ninth fusion path 19 diagonally connects two adjacent fusion units, and is used for fusion of fusion units respectively located in two adjacent fusion layers and respectively 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, so as 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.
  • the training method of the second embodiment further includes:
  • Step S20' input the hierarchical feature map into the symmetrical triangular feature pyramid fusion network to obtain symmetrical fusion feature maps of several different scales;
  • Step S30' adding the fusion feature map and the symmetrical fusion feature map of the same scale to obtain a global feature map;
  • Step S40' input the global feature maps of different scales into the regression prediction network to obtain a global prediction target value
  • Step S50' update the loss function according to the global predicted target value and the obtained real target value
  • Step S60' Update the network parameters of the image detection model to be trained according to the updated loss function.
  • step S20' the hierarchical feature maps C3-C7 of five scales are respectively input to the corresponding input to the above-mentioned symmetrical triangular feature pyramid fusion network, to obtain five different scales of fusion feature maps N 3 , N 4 , N 5 , N 6 , N 7 .
  • step S40 ′ input the fused feature maps M 3 , M 4 , M 5 , M 6 , and M 7 of five different scales into the regression prediction network to obtain the predicted target value, where the target predicted value includes category and location.
  • the regression prediction network adopts a first-order fully convolutional one-stage object detection network (Fully Convolutional One-Stage Object Detection, FCOS for short). Dangerous Goods.
  • the input feature units of the five heads from bottom to top are M 3 , M 4 , M 5 , M 6 , and M 7 , and the range of dangerous goods detected is [0, 64], [64, 128], [ 128, 256], [256, 512], [512, + ⁇ ]. Samples that exceed this range or background samples will be considered negative samples.
  • the method of pixel-by-pixel prediction is used here, that is, each pixel is regarded as a key point and a positive sample for regression prediction is calculated. If a pixel falls into multiple ground-truth regions in the same layer, the smallest region is used as the regression target. Repeat until the entire image is detected.
  • step S50' and step S60' the loss function is updated according to the global predicted target value and the obtained real target value, and the network parameters of the image detection model to be trained are updated according to the updated loss function.
  • the updating process of the loss function and the updating process of the network parameters are both in the prior art and are well known to those skilled in the art, and will not be repeated here.
  • the training method for an image detection model based on a feature pyramid provided in the second embodiment constructs another symmetrical triangular feature pyramid fusion network with at least five different fusion paths, which is mutually compatible with the triangular feature pyramid fusion network.
  • a global feature map can be obtained, and the symmetric structure can effectively supplement the global feature information, retain more detailed information and original information, improve the detection accuracy of the model, and improve the performance and efficiency of the detection network in the field of security inspection.
  • this embodiment discloses a computer-readable storage medium that stores a training program for an image detection model based on a feature pyramid, and the training program for the image detection model based on a feature pyramid is processed.
  • the above-mentioned training method of the image detection model based on the feature pyramid is realized when the processor is executed.
  • the present application also discloses a computer device.
  • 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 executes it, forming a request processing device on a logical level.
  • 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 to say, the execution subjects of the following processing procedures are not limited to each Logic unit, which can also be hardware or logic device.
  • the computer-readable storage medium 50 stores the training program of the image detection model based on the feature pyramid, and the training program of the image detection model based on the feature pyramid realizes the above-mentioned image detection model based on the feature pyramid when the training program is executed by the processor. training method.
  • Computer-readable storage media includes both persistent and non-permanent, removable and non-removable media, and storage of information can be implemented by any method or technology.
  • Information may 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 Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Flash Memory or other memory technology, Compact Disc Read Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage , magnetic cassettes, 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 computing devices.
  • PRAM phase-change memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • RAM random access memory
  • ROM read-only memory Memory

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Quality & Reliability (AREA)
  • Health & Medical Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Databases & Information Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

An image detection model training method based on a feature pyramid, a storage medium, and a device. The training method comprises: inputting an obtained original detection image into a feature extraction network to obtain multiple hierarchical feature maps of different scales (S10); inputting the hierarchical feature maps into a triangular feature pyramid fusion network to obtain multiple fusion feature maps of different scales (S20); inputting the multiple fusion feature maps of different scales into a regression prediction network to obtain a predicted target value (S30); updating a loss function according to the predicted target value and an obtained true target value (S40); and updating, according to the updated loss function, a network parameter of an image detection model to be trained (S50). In the scheme, a fusion network having at least five different fusion paths is constructed, such that the feature maps of different scales are fully fused, more detail information and original information are reserved, the detection accuracy of the model is improved, and the performance and efficiency of detection networks in the field of security check are improved.

Description

基于特征金字塔的图像检测模型的训练方法、介质和设备Training method, medium and device for image detection model based on feature pyramid 技术领域technical field
本发明属于图像处理技术领域,具体地讲,涉及基于特征金字塔的图像检测模型的训练方法、计算机可读存储介质、计算机设备。The invention belongs to the technical field of image processing, and in particular, relates to a training method of an image detection model based on a feature pyramid, a computer-readable storage medium, and a computer device.
背景技术Background technique
X射线安检技术被广泛用以地铁、机场等公共交通场所的安全管控,其优势在于能在不接触乘客包裹的情况下检测出是否包含危险品,很好地维护了乘客的隐私权。为了适应日益增长的交通吞吐量和严峻的安全形势,安检工作必须兼具较高的实时性以及准确性。然而在现实生活中,目前主流的工作方式主要由经过一定专业培训的安全工作人员进行肉眼筛选,安检工作的质量和效率很容易受到外部因素如工作状态、情绪波动以及工作强度等负面影响。除此之外,前期的培训支出和高额的人力成本同样是企业不可忽视的固有弊端之一。X-ray security inspection technology is widely used in the safety control of public transportation places such as subways and airports. In order to adapt to the ever-increasing traffic throughput and severe security situation, security inspection must have both high real-time and accuracy. However, in real life, the current mainstream work methods are mainly screened by security staff who have undergone certain professional training. The quality and efficiency of security inspections are easily negatively affected by external factors such as work status, mood swings, and work intensity. In addition, the pre-training expenditure and high labor cost are also one of the inherent disadvantages of the enterprise that cannot be ignored.
基于深度学习的目标检测算法有效克服了以上讨论的现有手段的不足,在X射线安检图像危险品的检测任务中表现出了巨大的潜力。作为一种辅助检测手段,使用算法自动检测危险品一定程度上能保持人类操作员的警觉性,降低误检率和缩短响应时间,还能大幅度降低人力成本。The target detection algorithm based on deep learning effectively overcomes the shortcomings of the existing methods discussed above, and has shown great potential in the detection of dangerous goods in X-ray security images. As an auxiliary detection method, the use of algorithms to automatically detect dangerous goods can maintain the alertness of human operators to a certain extent, reduce the false detection rate and response time, and greatly reduce labor costs.
由于广泛的应用前景和市场价值,基于深度学习的X射线安检图像危险品的自动检测一直是学术界和工业界的研究热点之一。通常来说,基于深度学习的目标检测算法主要根据是否使用了预先设定的锚机制分为anchor-based和anchor-free的网络。常见的目标检测算法中,Faster R-CNN、Mask R-CNN、RetinaNet等网络是anchor-based机制的,而FCOS、CenterNet等网络则属于anchor-free机制的。Due to its wide application prospects and market value, the 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 according to whether a preset anchor mechanism is used. Among the common target detection algorithms, Faster R-CNN, Mask R-CNN, RetinaNet and other networks are anchor-based mechanisms, while FCOS, CenterNet and other networks are anchor-free mechanisms.
上面讨论的目标检测网络(Faster R-CNN、Mask R-CNN、RetinaNet、YOLOv3等等)在公共的X射线安检图像数据集中危险品的自动检测取得了令人印象深刻的性能。但是上述网络都使用的是最基本的特征融合模块FPN,一 定程度上起到了融合不同尺度特征的作用,能够带来准确度的提升。但是安检图像性质非常复杂,不仅包含大量大小和形状多变的危险品,还有很大的背景信息干扰以及遮挡、重叠等潜在问题的影响,普通简单的特征融合结构无法进一步地融合多尺度的特征信息和无法为网络提取到更多细节信息用于后续的分类和定位,使得整体性能不如人意。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 image datasets. However, the above networks all use the most basic feature fusion module FPN, which to a certain extent plays the role of fusing features of different scales, which can improve the accuracy. However, the security inspection image is very complex in nature, not only contains a large number of dangerous goods of varying sizes and shapes, but also has a lot of background information interference and potential problems such as occlusion and overlap. Ordinary simple feature fusion structures cannot further integrate multi-scale The feature information and the inability to extract more detailed information for the network for subsequent classification and localization make the overall performance unsatisfactory.
发明内容SUMMARY OF THE INVENTION
(一)本发明所要解决的技术问题(1) Technical problem to be solved by the present invention
如何在训练过程中融合更多尺度特征,以获取更多细节信息,以提高模型的分类预测准确性。How to incorporate more scale features in the training process to obtain more detailed information to improve the classification prediction accuracy of the model.
(二)本发明所采用的技术方案(2) Technical scheme adopted in the present invention
本申请公开了一种基于特征金字塔的图像检测模型的训练方法,待训练的图像检测模型包括特征提取网络、三角特征金字塔融合网络和回归预测网络,其中,三角特征金字塔融合网络包括若干融合单元,且所述三角特征金字塔融合网络至少具有五种不同的融合路径,所述训练方法包括: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, wherein the triangular feature pyramid fusion network includes several fusion units. And the triangular feature pyramid fusion network has at least five different fusion paths, and the training method includes:
将获取的原始检测图像输入到所述特征提取网络,得到若干不同尺度的层次化特征图;Input the acquired original detection image into the feature extraction network to obtain several hierarchical feature maps of different scales;
将所述层次化特征图输入到所述三角特征金字塔融合网络,得到若干不同尺度的融合特征图;Inputting the hierarchical feature map into the triangular feature pyramid fusion network to obtain fusion feature maps of several 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 according to the predicted target value and the obtained real target value;
根据更新后的损失函数对待训练的图像检测模型的网络参数进行更新。The network parameters of the image detection model to be trained are updated according to the updated loss function.
可选择地,所述三角特征金字塔融合网络包括至少三层融合层,且融合层的数量随着融合层的尺度降低而递减。Optionally, 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 layers decreases.
可选择地,所述三角特征金字塔融合网络具有:Optionally, the triangular feature pyramid fusion network has:
第一融合路径,用于融合形成不同比例的特征图;The first fusion path is used for fusion to form feature maps of different scales;
第二融合路径,用于缩短低级特征向高级特征传输的距离;The second fusion path is used to shorten the transmission distance from low-level features to high-level features;
第三融合路径,用于融合同一尺度的特征信息;The third fusion path is used to fuse the feature information of the same scale;
第四融合路径,用于融合分别位于相邻两层融合层且分别位于第一融合路径和第二融合路径的融合单元的数据;The fourth fusion path is used to fuse the data of the fusion units that are respectively located in the two adjacent fusion layers and are respectively 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.
可选择地,所述三角特征金字塔融合网络包括五层融合层,五层融合层的融合单元数量分别为五个、四个、三个、二个和一个。Optionally, 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.
可选择地,所述待训练的图像检测模型还包括对称三角特征金字塔融合网络,所述对称三角特征金字塔融合网络包括若干融合单元,所述对称三角特征金字塔融合网络至少具有五种不同的融合路径,且所述对称三角特征金字塔融合网络的各个融合单元与所述三角特征金字塔融合网络的各个融合单元呈对称分布,其中,所述训练方法还包括:Optionally, the image detection model to be trained further includes a symmetrical triangular feature pyramid fusion network, the symmetrical triangular feature pyramid fusion network includes several fusion units, and the symmetrical triangular feature pyramid fusion network has at least five different fusion paths. , and each fusion unit of the symmetrical triangular feature pyramid fusion network and each fusion unit of the triangular feature pyramid fusion network are symmetrically distributed, wherein the training method further includes:
将所述层次化特征图输入到所述对称三角特征金字塔融合网络,得到若干不同尺度的对称融合特征图;Inputting the hierarchical feature map into the symmetrical triangular feature pyramid fusion network to obtain symmetrical fusion feature maps of several different scales;
将相同尺度的所述融合特征图和所述对称融合特征图相加,得到全局特征图;adding the fusion feature map and the symmetrical fusion 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 according to the global predicted target value and the obtained real target value;
根据更新后的损失函数对待训练的图像检测模型的网络参数进行更新。The network parameters of the image detection model to be trained are updated according to the updated loss function.
可选择地,所述对称三角特征金字塔融合网络包括至少三层融合层,且融合层的数量随着融合层的尺度增大而递减。Optionally, the symmetric triangular feature pyramid fusion network includes at least three fusion layers, and the number of fusion layers decreases as the scale of the fusion layers increases.
可选择地,所述对称三角特征金字塔融合网络具有:Optionally, the symmetrical triangular feature pyramid fusion network has:
第六融合路径,用于融合形成不同比例的特征图;The sixth fusion path is used to fuse to form feature maps of different scales;
第七融合路径,用于缩短低级特征向高级特征传输的距离;The seventh fusion path is used to shorten the transmission distance from low-level features to high-level features;
第八融合路径,用于融合同一尺度的特征信息;The eighth fusion path is used to fuse the feature information of the same scale;
第九融合路径,用于融合分别位于相邻两层融合层且分别位于第一融合路径和第二融合路径的融合单元;a ninth fusion path, used to fuse fusion units that are respectively located in two adjacent fusion layers and are respectively 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.
可选择地,所述对称三角特征金字塔融合网络包括五层融合层,五层融合层的融合单元数量分别为五个、四个、三个、二个和一个。Optionally, 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.
本发明还公开了一种计算机可读存储介质,所述计算机可读存储介质存储有基于特征金字塔的图像检测模型的训练程序,所述基于特征金字塔的图像检测模型的训练程序被处理器执行时实现上述的基于特征金字塔的图像检测模型的训练方法。The present invention also discloses a computer-readable storage medium, which stores a training program of the image detection model based on the feature pyramid, and when the training program of the image detection model based on the feature pyramid is executed by the processor The above-mentioned training method of the image detection model based on the feature pyramid is realized.
本发明还公开了一种计算机设备,所述计算机设备包括计算机可读存储介质、处理器和存储在所述计算机可读存储介质中的基于特征金字塔的图像检测模型的训练程序,所述基于特征金字塔的图像检测模型的训练程序被处理器执行时实现上述的基于特征金字塔的图像检测模型的训练方法。The present invention also discloses a computer device, which includes a computer-readable storage medium, a processor, and a training program for a feature pyramid-based image detection model stored in the computer-readable storage medium. When the training program of the image detection model of the pyramid is executed by the processor, the above-mentioned training method of the image detection model based on the feature pyramid is realized.
(三)有益效果(3) Beneficial effects
本发明公开了一种基于特征金字塔的图像检测模型的训练方法,相对于传统的训练方法,具有如下技术效果:The 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:
本申请构建了具有至少五种不同融合路径的融合网络,使得不同尺度的特征图之间得到充分融合,保留更多的细节信息和原始信息,提高模型的检测准确率,提升了安检领域检测网络的性能和效率。The application constructs a fusion network with at least five different fusion paths, so that the feature maps of different scales are fully fused, more detailed information and original information are retained, the detection accuracy of the model is improved, and the detection network in the field of security inspection is improved. performance and efficiency.
附图说明Description of drawings
图1为本发明的实施例一的基于特征金字塔的图像检测模型的训练方法的流程图;1 is a flowchart of a training method for an image detection model based on a feature pyramid according to Embodiment 1 of the present invention;
图2为本发明的实施例一的基于特征金字塔的图像检测模型的框架图;2 is a frame diagram of an image detection model based on a feature pyramid according to Embodiment 1 of the present invention;
图3为本发明的实施例一的三角特征金字塔融合网络的结构示意图;3 is a schematic structural diagram of a triangular feature pyramid fusion network according to Embodiment 1 of the present invention;
图4为本发明的实施例二的对称三角特征金字塔融合网络的结构示意图;4 is a schematic structural diagram of a symmetrical triangular feature pyramid fusion network according to Embodiment 2 of the present invention;
图5为本发明的实施例二的基于特征金字塔的图像检测模型的训练方法的流程图;5 is a flowchart of a method for training an image detection model based on a feature pyramid according to Embodiment 2 of the present invention;
图6为本发明的实施例的计算机设备原理框图。FIG. 6 is a schematic block diagram of a computer device according to an embodiment of the present invention.
具体实施方式Detailed ways
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention.
在详细描述本申请的各个实施例之前,首先简单描述本申请的发明构思:现有的目标检测网络基于最简单特征融合模块FPN(特征金字塔网络),只能实现简单的特征融合,面对安检场景,图像性质复杂,简单的特征融合模块无法融合更多细节特征信息,本申请通过构建具有至少五种不同融合路径的融合网络,使得不同尺度的特征图之间得到充分融合,保留更多的细节信息和原始信息,提高模型的检测准确率。Before describing each embodiment of this application in detail, first briefly describe the inventive concept of this application: the existing target detection network is based on the simplest feature fusion module FPN (Feature Pyramid Network), which can only achieve simple feature fusion, and faces security inspection. Scenes and images are complex in nature, and a simple feature fusion module cannot fuse more detailed feature information. In this application, by constructing a fusion network with at least five different fusion paths, the feature maps of different scales are fully fused, and more features are preserved. Detailed information and original information to improve the detection accuracy of the model.
具体地,如图1和图2所示,本实施例一的待训练的图像检测模型包括特征提取网络、三角特征金字塔融合网络和回归预测网络,其中,三角特征金字塔融合网络包括若干融合单元,且所述三角特征金字塔融合网络至少具有五种不同的融合路径,基于特征金字塔的图像检测模型的训练方法包括如下步骤:Specifically, as shown in FIGS. 1 and 2 , 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 several fusion units, And the triangular feature pyramid fusion network has at least five different fusion paths, and the training method of the image detection model based on the feature pyramid includes the following steps:
步骤S10:将获取的原始检测图像输入到所述特征提取网络,得到若干不同尺度的层次化特征图;Step S10: Input the acquired original detection image into the feature extraction network to obtain several hierarchical feature maps of different scales;
步骤S20:将所述层次化特征图输入到所述三角特征金字塔融合网络,得到若干不同尺度的融合特征图;Step S20: inputting the hierarchical feature map into the triangular feature pyramid fusion network to obtain fusion feature maps of several different scales;
步骤S30:将若干不同尺度的融合特征图输入到回归预测网络,得到预测目标值;Step S30: inputting several fusion feature maps of different scales into the regression prediction network to obtain the prediction target value;
步骤S40:根据预测目标值和获取的真实目标值更新损失函数;Step S40: Update the loss function according to the predicted target value and the obtained real target value;
步骤S50:根据更新后的损失函数对待训练的图像检测模型的网络参数进行更新。Step S50: Update the network parameters of the image detection model to be trained according to the updated loss function.
示例性地,在步骤S10中,特征提取网络采用ResNet的C3-C5层,将获取的原始检测图像输入到特征提取网络,得到三种尺度依次增加的层次化特征图C3、C4和C5。为了得到更多尺度的层次化特征图,可通过下采样的方式获取,例如对C5进行下采样,得到尺度更高的C6,对C6进行下采样,得到尺度更高的C7,依次类推。本实施例一以五种尺度的层次化特征图为例。Exemplarily, in step S10, the feature extraction network adopts C3-C5 layers of ResNet, and the acquired original detection images are input into the feature extraction network to obtain three hierarchical feature maps C3, C4 and C5 with successively increasing scales. In order to obtain a hierarchical feature map with more scales, it can be obtained by downsampling, for example, downsampling C5 to obtain a higher-scale C6, downsampling C6 to obtain a higher-scale C7, and so on. The first embodiment takes the hierarchical feature map of five scales as an example.
进一步地,所述三角特征金字塔融合网络包括至少三层融合层,且融合层 的数量随着融合层的尺度降低而递减。作为优选实施例,所述三角特征金字塔融合网络包括五层融合层,分别为第一融合层R1、第二融合层R2、第三融合层R3、第四融合层R4、第五融合层R5,五层融合层的融合单元数量分别为五个、四个、三个、二个和一个。如图2所示,每个空白圆圈代表一个融合单元,本实施例一的三角特征金字塔融合网络包括15个融合单元,五层融合层的尺度由上至下依次减小,融合单元的数量由上至下依次减少。每一融合层中的融合单元与相对应层的层次化特征图的尺度相同。每一融合层中的最后一个融合单元叫输出单位(P3-P7)。箭头方向代表数据的传输方向,即融合路径。Further, 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 layers decreases. As a preferred embodiment, the triangular feature pyramid fusion network includes five fusion layers, which are the first fusion layer R1, the second fusion layer R2, the third fusion layer R3, the fourth fusion layer R4, and the fifth fusion layer R5, respectively. The number of fusion units in the five fusion layers are five, four, three, two and one, respectively. As shown in Figure 2, 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-layer fusion layers decrease sequentially from top to bottom. The number of fusion units is Decrease from top to bottom. The fusion unit in each fusion layer has 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.
作为优选实施例,所述三角特征金字塔融合网络具有:第一融合路径11、第二融合路径12、第三融合路径13、第四融合路径14和第五融合路径15。其中,第一融合路径11自上而下,由大尺度的融合单元指向小尺度的融合单元,第一融合路径11用于融合形成不同比例的特征图。第二融合路径12自下而上,由小尺度的融合单元指向大尺度的融合单元,第二融合路径12用于缩短低级特征向高级特征传输的距离。第三融合路径13水平连接同一层的融合单元,用于融合同一尺度的特征信息。第四融合路径14对角连接相邻两个融合单元,用于融合分别位于相邻两层融合层且分别位于第一融合路径和第二融合路径的融合单元。第五融合路径15用于融合同一层融合层的输入单元和输出单元的特征信息,以保留更多原始信息。需要说明的是,当融合不同尺度的特征时,需要将各个特征的分辨率调整至相同,以输入单元P5为例,由于越高级别的特征的分辨率越低,需要进行放大处理,越低级别的特征的分辨率越高,需要进行压缩处理,例如,从第四融合层R4的融合单元P4传输至P5的特征信息需要进行0.5倍压缩处理,从第二融合层R2的融合单元传输至P5的特征信息需要进行2倍放大处理。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 for fusion to form 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 transmission distance from low-level features to high-level features. The third fusion path 13 connects the fusion units of the same layer horizontally, and is used to fuse the feature information of the same scale. The fourth fusion path 14 diagonally connects two adjacent fusion units, and is used for fusion of fusion units respectively located in two adjacent fusion layers and respectively 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 merging 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 resolution of a feature with a higher level is lower, it needs to be enlarged. The higher the resolution of the features of the level, the compression processing is required. For example, the feature information transmitted from the fusion unit P4 of the fourth fusion layer R4 to the P5 needs to be compressed by 0.5 times, and transmitted from the fusion unit of the second fusion layer R2 to P5. The feature information of P5 needs to be enlarged by 2 times.
示例性地,在步骤S20中,五种尺度的层次化特征图C3-C7分别输入到对应的输入到上述的三角特征金字塔融合网络,得到五种不同尺度的融合特征图P 3、P 4、P 5、P 6、P 7Exemplarily, in step S20, the hierarchical feature maps C3-C7 of five scales are respectively input into the corresponding triangular feature pyramid fusion network to obtain five fusion feature maps P3 , P4 , P 5 , P 6 , P 7 .
进一步地,在步骤S30中,将五种不同尺度的融合特征图P 3、P 4、P 5、P 6、P 7输入到回归预测网络,得到预测目标值,这里的目标预测值包括类别和位置。示例性地,回归预测网络采用一阶全卷积目标检测网络(Fully Convolutional One-Stage Object Detection,简称FCOS),图中的五个头部head代表五个不同尺度,分别检测五个不同范围的危险品。例如五个head依次从下到上的输入 特征单元分别是P 3、P 4、P 5、P 6、P 7,分别检测的危险品范围是[0,64]、[64,128]、[128,256]、[256,512]、[512,+∞]。如果超过这个范围的样本或者是背景样本都会被认为是负样本。这里采用的是逐像素预测的方式,也就是每个像素点都视作一个关键点都要计算回归预测正样本。如果一个像素点在同一层落到了多个真实标签区域,则使用最小区域来作为回归目标。重复,直至完成整张图片的检测。 Further, in step S30, input the fused feature maps P 3 , P 4 , P 5 , P 6 , and P 7 of five different scales into the regression prediction network to obtain the predicted target value, where the target predicted value includes categories and Location. Exemplarily, the regression prediction network adopts a first-order fully convolutional one-stage object detection network (Fully Convolutional One-Stage Object Detection, FCOS for short). Dangerous Goods. For example, the input feature units of five heads from bottom to top are P 3 , P 4 , P 5 , P 6 , and P 7 respectively, and the range of dangerous goods detected is [0, 64], [64, 128], [ 128, 256], [256, 512], [512, +∞]. Samples that exceed this range or background samples will be considered negative samples. The method of pixel-by-pixel prediction is used here, that is, each pixel is regarded as a key point and a positive sample for regression prediction is calculated. If a pixel falls into multiple ground-truth regions in the same layer, the smallest region is used as the regression target. Repeat until the entire image is detected.
进一步地,在步骤S40和步骤S50中,根据预测目标值和获取的真实目标值更新损失函数,并根据更新后的损失函数对待训练的图像检测模型的网络参数进行更新。其中,损失函数的更新过程和网络参数的更新过程,均为现有技术,本领域技术人员已熟知,在此不进行赘述。Further, in steps S40 and S50, the loss function is updated according to the predicted target value and the obtained real target value, and the network parameters of the image detection model to be trained are updated according to the updated loss function. The updating process of the loss function and the updating process of the network parameters are both in the prior art and are well known to those skilled in the art, and will not be repeated here.
本实施例一提供的基于特征金字塔的图像检测模型的训练方法,通过构建具有至少五种不同融合路径的融合网络,使得不同尺度的特征图之间得到充分融合,保留更多的细节信息和原始信息,提高模型的检测准确率,提升了安检领域检测网络的性能和效率。The training method for an image detection model based on a feature pyramid provided in the first embodiment, by constructing a fusion network with at least five different fusion paths, enables the feature maps of different scales to be fully fused, and retains more detailed information and original information, improve the detection accuracy of the model, and improve the performance and efficiency of the detection network in the field of security inspection.
本实施例二公开的基于特征金字塔的图像检测模型的训练方法,在实施例一的基础上增加了一个对称三角特征金字塔融合网络,对称三角特征金字塔融合网络包括若干融合单元,所述对称三角特征金字塔融合网络至少具有五种不同的融合路径,且所述对称三角特征金字塔融合网络的各个融合单元与所述三角特征金字塔融合网络的各个融合单元呈对称分布。The training method for an image detection model based on a feature pyramid disclosed in the second embodiment adds a symmetrical triangular feature pyramid fusion network on the basis of the first embodiment, and the symmetrical triangular feature pyramid fusion network includes several fusion units. The pyramid fusion network has at least five different fusion paths, and each fusion unit of the symmetrical triangular feature pyramid fusion network and each fusion unit of the triangular feature pyramid fusion network are symmetrically distributed.
所述对称三角特征金字塔融合网络包括至少三层融合层,且融合层的数量随着融合层的尺度增大而递减。所述对称三角特征金字塔融合网络包括五层融合层,分别是第六融合层R6、第七融合层R7、第八融合层R8、第九融合层R9、第十融合层R10五层融合层的融合单元数量分别为五个、四个、三个、二个和一个。如图所示,本实施例二的对称三角特征金字塔融合网络包括15个融合单元,五层融合层的尺度由上至下依次减小,融合单元的数量由上至下依次增加。每一融合层中的融合单元与相对应层的层次化特征图的尺度相同。每一融合层中的最后一个融合单元叫输出单位(N3-N7)。箭头方向代表数据的传输方向,即融合路径。The symmetric triangular feature pyramid fusion network includes at least three fusion layers, and the number of fusion layers decreases as the scale of the fusion layers increases. The symmetrical triangular feature pyramid fusion network includes five fusion layers, which are respectively the sixth fusion layer R6, the seventh fusion layer R7, the eighth fusion layer R8, the ninth fusion layer R9, the tenth fusion layer R10 and the fifth fusion layer. The number of fusion units 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-layer fusion layer decreases sequentially from top to bottom, and the number of fusion units increases sequentially from top to bottom. The fusion unit in each fusion layer has 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 (N3-N7). The direction of the arrow represents the transmission direction of the data, that is, the fusion path.
作为优选实施例,所述三角特征金字塔融合网络具有:第六融合路径16、第七融合路径17、第八融合路径18、第九融合路径19和第十融合路径20。其 中,第六融合路径16自上而下,由大尺度的融合单元指向小尺度的融合单元,第六融合路径16用于融合形成不同比例的特征图。第七融合路径17自下而上,由大尺度的融合单元指向小尺度的融合单元,第七融合路径17用于缩短高级特征向低级特征传输的距离。第八融合路径18水平连接同一层的融合单元,用于融合同一尺度的特征信息。第九融合路径19对角连接相邻两个融合单元,用于融合分别位于相邻两层融合层且分别位于第七融合路径17和第八融合路径18的融合单元。第十融合路径20用于融合同一层融合层的输入单元和输出单元的特征信息,以保留更多原始信息。需要说明的是,当融合不同尺度的特征时,需要将各个特征的分辨率调整至相同。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 for fusion to form 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 transmission distance from high-level features to low-level features. The eighth fusion path 18 connects the fusion units of the same layer horizontally, and is used to fuse the feature information of the same scale. The ninth fusion path 19 diagonally connects two adjacent fusion units, and is used for fusion of fusion units respectively located in two adjacent fusion layers and respectively 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, so as 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.
进一步地,如图5所示,本实施例二的所述训练方法还包括:Further, as shown in FIG. 5 , the training method of the second embodiment further includes:
步骤S20’:将所述层次化特征图输入到所述对称三角特征金字塔融合网络,得到若干不同尺度的对称融合特征图;Step S20': input the hierarchical feature map into the symmetrical triangular feature pyramid fusion network to obtain symmetrical fusion feature maps of several different scales;
步骤S30’:将相同尺度的所述融合特征图和所述对称融合特征图相加,得到全局特征图;Step S30': adding the fusion feature map and the symmetrical fusion feature map of the same scale to obtain a global feature map;
步骤S40’:将不同尺度的所述全局特征图输入到所述回归预测网络,得到全局预测目标值;Step S40': input the global feature maps of different scales into the regression prediction network to obtain a global prediction target value;
步骤S50’:根据全局预测目标值和获取的真实目标值更新损失函数;Step S50': update the loss function according to the global predicted target value and the obtained real target value;
步骤S60’:根据更新后的损失函数对待训练的图像检测模型的网络参数进行更新。Step S60': Update the network parameters of the image detection model to be trained according to the updated loss function.
具体来说,在步骤S20’中,五种尺度的层次化特征图C3-C7分别输入到对应的输入到上述的对称三角特征金字塔融合网络,得到五种不同尺度的融合特征图N 3、N 4、N 5、N 6、N 7Specifically, in step S20', the hierarchical feature maps C3-C7 of five scales are respectively input to the corresponding input to the above-mentioned symmetrical triangular feature pyramid fusion network, to obtain five different scales of fusion feature maps N 3 , N 4 , N 5 , N 6 , N 7 .
在步骤S30’将相同尺度的融合特征图和对称融合特征图相加,得到全局特征图,即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,全局特征图分别为M 3、M 4、M 5、M 6、M 7。在步骤S40’中,将五种不同尺度的融合特征图M 3、M 4、M 5、M 6、M 7输入到回归预测网络,得到预测目标值,这里的目标预测值包括类别和位置。示例性地,回归预测网络采用一阶全卷积目标检测网络(Fully Convolutional One-Stage Object Detection,简称FCOS),图中的五个头部head代表五个不同尺度,分别检测五个不同范围的危险品。例如 五个head依次从下到上的输入特征单元分别是M 3、M 4、M 5、M 6、M 7,分别检测的危险品范围是[0,64]、[64,128]、[128,256]、[256,512]、[512,+∞]。如果超过这个范围的样本或者是背景样本都会被认为是负样本。这里采用的是逐像素预测的方式,也就是每个像素点都视作一个关键点都要计算回归预测正样本。如果一个像素点在同一层落到了多个真实标签区域,则使用最小区域来作为回归目标。重复,直至完成整张图片的检测。 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, that is, 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 , and the global feature maps are M 3 , M 4 , M 5 , M 6 , and M 7 respectively. In step S40 ′, input the fused feature maps M 3 , M 4 , M 5 , M 6 , and M 7 of five different scales into the regression prediction network to obtain the predicted target value, where the target predicted value includes category and location. Exemplarily, the regression prediction network adopts a first-order fully convolutional one-stage object detection network (Fully Convolutional One-Stage Object Detection, FCOS for short). 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 , and M 7 , and the range of dangerous goods detected is [0, 64], [64, 128], [ 128, 256], [256, 512], [512, +∞]. Samples that exceed this range or background samples will be considered negative samples. The method of pixel-by-pixel prediction is used here, that is, each pixel is regarded as a key point and a positive sample for regression prediction is calculated. If a pixel falls into multiple ground-truth regions in the same layer, the smallest region is used as the regression target. Repeat until the entire image is detected.
在步骤S50’和步骤S60’中,根据全局预测目标值和获取的真实目标值更新损失函数,并根据更新后的损失函数对待训练的图像检测模型的网络参数进行更新。其中,损失函数的更新过程和网络参数的更新过程,均为现有技术,本领域技术人员已熟知,在此不进行赘述。In step S50' and step S60', the loss function is updated according to the global predicted target value and the obtained real target value, and the network parameters of the image detection model to be trained are updated according to the updated loss function. The updating process of the loss function and the updating process of the network parameters are both in the prior art and are well known to those skilled in the art, and will not be repeated here.
本实施例二提供的基于特征金字塔的图像检测模型的训练方法,在实施例一的基础上,构建另一个具有至少五种不同融合路径的对称三角特征金字塔融合网络,与三角特征金字塔融合网络相互配合使用,获得全局特征图,对称结构可以有效补充全局特征信息,保留更多的细节信息和原始信息,提高模型的检测准确率,提升了安检领域检测网络的性能和效率。The training method for an image detection model based on a 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 mutually compatible with the triangular feature pyramid fusion network. When used together, a global feature map can be obtained, and the symmetric structure can effectively supplement the global feature information, retain more detailed information and original information, improve the detection accuracy of the model, and improve the performance and efficiency of the detection network in the field of security inspection.
进一步地,本实施例公开了一种计算机可读存储介质,所述计算机可读存储介质存储有基于特征金字塔的图像检测模型的训练程序,所述基于特征金字塔的图像检测模型的训练程序被处理器执行时实现上述的基于特征金字塔的图像检测模型的训练方法。Further, this embodiment discloses a computer-readable storage medium that stores a training program for an image detection model based on a feature pyramid, and the training program for the image detection model based on a feature pyramid is processed. The above-mentioned training method of the image detection model based on the feature pyramid is realized when the processor is executed.
进一步地,本申请还公开了一种计算机设备,在硬件层面,如图6所示,该计算机设备包括处理器20、内部总线30、网络接口40、计算机可读存储介质50。处理器20从计算机可读存储介质中读取对应的计算机程序然后运行,在逻辑层面上形成请求处理装置。当然,除了软件实现方式之外,本说明书一个或多个实施例并不排除其他实现方式,比如逻辑器件抑或软硬件结合的方式等等,也就是说以下处理流程的执行主体并不限定于各个逻辑单元,也可以是硬件或逻辑器件。所述计算机可读存储介质50上存储有基于特征金字塔的图像检测模型的训练程序,所述基于特征金字塔的图像检测模型的训练程序被处理器执行时实现上述的基于特征金字塔的图像检测模型的训练方法。Further, the present application also discloses a computer device. At the hardware level, as shown in FIG. 6 , 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 executes it, forming a request processing device on a 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 to say, the execution subjects of the following processing procedures are not limited to each Logic unit, which can also be hardware or logic device. The computer-readable storage medium 50 stores the training program of the image detection model based on the feature pyramid, and the training program of the image detection model based on the feature pyramid realizes the above-mentioned image detection model based on the feature pyramid when the training program is executed by the processor. training method.
计算机可读存储介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、 程序的模块或其他数据。计算机可读存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带、磁盘存储、量子存储器、基于石墨烯的存储介质或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。Computer-readable storage media includes both persistent and non-permanent, removable and non-removable media, and storage of information can be implemented by any method or technology. Information may 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 Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Flash Memory or other memory technology, Compact Disc Read Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage , magnetic cassettes, 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 computing devices.
为了验证本实施例二的训练方法得到图像检测模型的效果,我们选择了SIXray数据集中的3130张枪支图像和1953张刀图像作为我们实验的评估数据集。所提出的方法是在Python 3.6中使用Pytorch后端实验的。我们将图像缩放为1333×800作为输入,并在24GB RAM的NVIDIA TITAN RTX上训练模型。在训练阶段,我们采用了随机梯度优化器,学习率为0.0001和权重衰减为0.001。将所有数据集随机分为训练集(60%),验证集(20%)和测试集(20%),以便每个拆分都有相似的分布。In order to verify the effect of the image detection model obtained by the training method in Example 2, we selected 3130 gun images and 1953 knife images in the SIXray dataset as the evaluation datasets for our experiments. The proposed method is experimental in Python 3.6 using the Pytorch backend. We scale the image to 1333×800 as input and train the model on NVIDIA TITAN RTX with 24GB RAM. During the training phase, we employ a stochastic gradient optimizer with a learning rate of 0.0001 and a weight decay of 0.001. All datasets are randomly divided into training set (60%), validation set (20%) and test set (20%) so that each split has a similar distribution.
在训练参数一致的前提下用不同方法对SIXray数据进行枪支和刀具的检测,每个类别的AP值和整体的mAP结果如表1。本训练方法得到的模型(Ours)在单独各个类别的AP值和整体性能mAP结果上均为所列方法中的最优结果,验证了本本训练方法得到的模型在X射线安检图像中危险品的自动检测的优越性。Under the premise of the same training parameters, different methods are used to detect firearms and knives on SIXray data. The AP value of each category and the overall mAP results are shown in Table 1. The model (Ours) obtained by this training method is the best result among the listed methods in terms of AP value and overall performance mAP result of each category, which verifies that the model obtained by this training method has the best performance of dangerous goods in X-ray security inspection images. Advantages of automatic detection.
Figure PCTCN2020136553-appb-000001
Figure PCTCN2020136553-appb-000001
表1.不同方法在SIXray数据集上的准确度对比Table 1. Accuracy comparison of different methods on the SIXray dataset
上面对本发明的具体实施方式进行了详细描述,虽然已表示和描述了一些实施例,但本领域技术人员应该理解,在不脱离由权利要求及其等同物限定其范围的本发明的原理和精神的情况下,可以对这些实施例进行修改和完善,这些修改和完善也应在本发明的保护范围内。The specific embodiments of the present invention have been described in detail above. Although some embodiments have been shown and described, those skilled in the art should understand that the principles and spirit of the present invention, which are defined in the scope of the claims and their equivalents, are not departed from. Under the circumstances, these embodiments can be modified and perfected, and these modifications and improvements should also fall within the protection scope of the present invention.

Claims (18)

  1. 一种基于特征金字塔的图像检测模型的训练方法,其中,待训练的图像检测模型包括特征提取网络、三角特征金字塔融合网络和回归预测网络,其中,三角特征金字塔融合网络包括若干融合单元,且所述三角特征金字塔融合网络至少具有五种不同的融合路径,所述训练方法包括:A training method for an image detection model based on a feature pyramid, wherein 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 several fusion units, and all The triangular feature pyramid fusion network has at least five different fusion paths, and the training method includes:
    将获取的原始检测图像输入到所述特征提取网络,得到若干不同尺度的层次化特征图;Input the acquired original detection image into the feature extraction network to obtain several hierarchical feature maps of different scales;
    将所述层次化特征图输入到所述三角特征金字塔融合网络,得到若干不同尺度的融合特征图;Inputting the hierarchical feature map into the triangular feature pyramid fusion network to obtain fusion feature maps of several 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 according to the predicted target value and the obtained real target value;
    根据更新后的损失函数对待训练的图像检测模型的网络参数进行更新。The network parameters of the image detection model to be trained are updated according to the updated loss function.
  2. 根据权利要求1所述的基于特征金字塔的图像检测模型的训练方法,其中,所述三角特征金字塔融合网络包括至少三层融合层,且融合层的数量随着融合层的尺度降低而递减。The method for training an image detection model based on a feature pyramid according to claim 1, wherein the triangular feature pyramid fusion network comprises at least three fusion layers, and the number of fusion layers decreases as the scale of the fusion layers decreases.
  3. 根据权利要求2所述的基于特征金字塔的图像检测模型的训练方法,其中,所述三角特征金字塔融合网络具有:The training method of the image detection model based on feature pyramid according to claim 2, wherein, the triangular feature pyramid fusion network has:
    第一融合路径,用于融合形成不同比例的特征图;The first fusion path is used for fusion to form feature maps of different scales;
    第二融合路径,用于缩短低级特征向高级特征传输的距离;The second fusion path is used to shorten the transmission distance from low-level features to high-level features;
    第三融合路径,用于融合同一尺度的特征信息;The third fusion path is used to fuse the feature information of the same scale;
    第四融合路径,用于融合分别位于相邻两层融合层且分别位于第一融合路径和第二融合路径的融合单元的数据;The fourth fusion path is used to fuse the data of the fusion units that are respectively located in the two adjacent fusion layers and are respectively 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.
  4. 根据权利要求2所述的基于特征金字塔的图像检测模型的训练方法,其中,所述三角特征金字塔融合网络包括五层融合层,五层融合层的融合单元数量分别为五个、四个、三个、二个和一个。The method for training an image detection model based on a feature pyramid according to claim 2, wherein the triangular feature pyramid fusion network comprises five layers of fusion layers, and the number of fusion units of the five layers of fusion layers is five, four, and three, respectively. one, two and one.
  5. 根据权利要求1所述的基于特征金字塔的图像检测模型的训练方法, 其中,所述待训练的图像检测模型还包括对称三角特征金字塔融合网络,所述对称三角特征金字塔融合网络包括若干融合单元,所述对称三角特征金字塔融合网络至少具有五种不同的融合路径,且所述对称三角特征金字塔融合网络的各个融合单元与所述三角特征金字塔融合网络的各个融合单元呈对称分布,其中,所述训练方法还包括:The method for training an image detection model based on a feature pyramid according to claim 1, wherein the image detection model to be trained further comprises a symmetrical triangular feature pyramid fusion network, and the symmetrical triangular feature pyramid fusion network comprises several fusion units, The symmetrical triangular feature pyramid fusion network has at least five different fusion paths, and each fusion unit of the symmetrical triangular feature pyramid fusion network and each fusion unit of the triangular feature pyramid fusion network are symmetrically distributed, wherein the Training methods also include:
    将所述层次化特征图输入到所述对称三角特征金字塔融合网络,得到若干不同尺度的对称融合特征图;Inputting the hierarchical feature map into the symmetrical triangular feature pyramid fusion network to obtain symmetrical fusion feature maps of several different scales;
    将相同尺度的所述融合特征图和所述对称融合特征图相加,得到全局特征图;adding the fusion feature map and the symmetrical fusion 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 according to the global predicted target value and the obtained real target value;
    根据更新后的损失函数对待训练的图像检测模型的网络参数进行更新。The network parameters of the image detection model to be trained are updated according to the updated loss function.
  6. 根据权利要求5所述的基于特征金字塔的图像检测模型的训练方法,其中,所述对称三角特征金字塔融合网络包括至少三层融合层,且融合层的数量随着融合层的尺度增大而递减。The method for training an image detection model based on a feature pyramid according to claim 5, wherein the symmetric triangular feature pyramid fusion network comprises at least three fusion layers, and the number of fusion layers decreases as the scale of the fusion layers increases .
  7. 根据权利要求6所述的基于特征金字塔的图像检测模型的训练方法,其中,所述对称三角特征金字塔融合网络具有:The training method of the image detection model based on feature pyramid according to claim 6, wherein, the symmetrical triangular feature pyramid fusion network has:
    第六融合路径,用于融合形成不同比例的特征图;The sixth fusion path is used to fuse to form feature maps of different scales;
    第七融合路径,用于缩短低级特征向高级特征传输的距离;The seventh fusion path is used to shorten the transmission distance from low-level features to high-level features;
    第八融合路径,用于融合同一尺度的特征信息;The eighth fusion path is used to fuse the feature information of the same scale;
    第九融合路径,用于融合分别位于相邻两层融合层且分别位于第一融合路径和第二融合路径的融合单元;a ninth fusion path, used to fuse fusion units that are respectively located in two adjacent fusion layers and are respectively 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.
  8. 根据权利要求6所述的基于特征金字塔的图像检测模型的训练方法,其中,所述对称三角特征金字塔融合网络包括五层融合层,五层融合层的融合单元数量分别为五个、四个、三个、二个和一个。The method for training an image detection model based on a feature pyramid according to claim 6, wherein the symmetrical triangular feature pyramid fusion network comprises five layers of fusion layers, and the number of fusion units in the five layers of fusion layers is five, four, Three, two and one.
  9. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有基 于特征金字塔的图像检测模型的训练程序,所述基于特征金字塔的图像检测模型的训练程序被处理器执行时实现权利要求1所述的基于特征金字塔的图像检测模型的训练方法。A computer-readable storage medium, wherein 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 the image detection model based on a feature pyramid is executed by a processor, the claims are realized The training method of the image detection model based on the feature pyramid described in 1.
  10. 根据权利要求9所述的计算机可读存储介质,其中,待训练的图像检测模型包括特征提取网络、三角特征金字塔融合网络和回归预测网络,其中,三角特征金字塔融合网络包括若干融合单元,且所述三角特征金字塔融合网络至少具有五种不同的融合路径,所述训练方法包括:The computer-readable storage medium according to claim 9, wherein the image detection model to be trained comprises a feature extraction network, a triangular feature pyramid fusion network and a regression prediction network, wherein the triangular feature pyramid fusion network comprises several fusion units, and the The triangular feature pyramid fusion network has at least five different fusion paths, and the training method includes:
    将获取的原始检测图像输入到所述特征提取网络,得到若干不同尺度的层次化特征图;Input the acquired original detection image into the feature extraction network to obtain several hierarchical feature maps of different scales;
    将所述层次化特征图输入到所述三角特征金字塔融合网络,得到若干不同尺度的融合特征图;Inputting the hierarchical feature map into the triangular feature pyramid fusion network to obtain fusion feature maps of several 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 according to the predicted target value and the obtained real target value;
    根据更新后的损失函数对待训练的图像检测模型的网络参数进行更新。The network parameters of the image detection model to be trained are updated according to the updated loss function.
  11. 根据权利要求10所述的计算机可读存储介质,其中,所述三角特征金字塔融合网络包括至少三层融合层,且融合层的数量随着融合层的尺度降低而递减。The computer-readable storage medium of claim 10, wherein the triangular feature pyramid fusion network comprises at least three fusion layers, and the number of fusion layers decreases as the scale of the fusion layers decreases.
  12. 根据权利要求11所述的计算机可读存储介质,其中,所述三角特征金字塔融合网络具有:The computer-readable storage medium of claim 11, wherein the triangular feature pyramid fusion network has:
    第一融合路径,用于融合形成不同比例的特征图;The first fusion path is used for fusion to form feature maps of different scales;
    第二融合路径,用于缩短低级特征向高级特征传输的距离;The second fusion path is used to shorten the transmission distance from low-level features to high-level features;
    第三融合路径,用于融合同一尺度的特征信息;The third fusion path is used to fuse the feature information of the same scale;
    第四融合路径,用于融合分别位于相邻两层融合层且分别位于第一融合路径和第二融合路径的融合单元的数据;The fourth fusion path is used to fuse the data of the fusion units that are respectively located in the two adjacent fusion layers and are respectively 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.
  13. 根据权利要求11所述的计算机可读存储介质,其中,所述三角特征金字塔融合网络包括五层融合层,五层融合层的融合单元数量分别为五个、四个、三个、二个和一个。The computer-readable storage medium according to claim 11, wherein the triangular feature pyramid fusion network comprises five layers of fusion layers, and the number of fusion units of the five layers of fusion layers is five, four, three, two and One.
  14. 根据权利要求9所述的计算机可读存储介质,其中,所述待训练的图像检测模型还包括对称三角特征金字塔融合网络,所述对称三角特征金字塔融合网络包括若干融合单元,所述对称三角特征金字塔融合网络至少具有五种不同的融合路径,且所述对称三角特征金字塔融合网络的各个融合单元与所述三角特征金字塔融合网络的各个融合单元呈对称分布,其中,所述训练方法还包括:The computer-readable storage medium according to claim 9, wherein the image detection model to be trained further comprises a symmetric triangular feature pyramid fusion network, the symmetric triangular feature pyramid fusion network comprises several fusion units, and the symmetric triangular feature The pyramid fusion network has at least five different fusion paths, and each fusion unit of the symmetrical triangular feature pyramid fusion network and each fusion unit of the triangular feature pyramid fusion network are symmetrically distributed, wherein the training method further includes:
    将所述层次化特征图输入到所述对称三角特征金字塔融合网络,得到若干不同尺度的对称融合特征图;Inputting the hierarchical feature map into the symmetrical triangular feature pyramid fusion network to obtain symmetrical fusion feature maps of several different scales;
    将相同尺度的所述融合特征图和所述对称融合特征图相加,得到全局特征图;adding the fusion feature map and the symmetrical fusion 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 according to the global predicted target value and the obtained real target value;
    根据更新后的损失函数对待训练的图像检测模型的网络参数进行更新。The network parameters of the image detection model to be trained are updated according to the updated loss function.
  15. 根据权利要求14所述的计算机可读存储介质,其中,所述对称三角特征金字塔融合网络包括至少三层融合层,且融合层的数量随着融合层的尺度增大而递减。The computer-readable storage medium of claim 14, wherein the symmetric triangular feature pyramid fusion network comprises at least three fusion layers, and the number of fusion layers decreases as the scale of the fusion layers increases.
  16. 根据权利要求15所述的计算机可读存储介质,其中,所述对称三角特征金字塔融合网络具有:The computer-readable storage medium of claim 15, wherein the symmetric triangular feature pyramid fusion network has:
    第六融合路径,用于融合形成不同比例的特征图;The sixth fusion path is used to fuse to form feature maps of different scales;
    第七融合路径,用于缩短低级特征向高级特征传输的距离;The seventh fusion path is used to shorten the transmission distance from low-level features to high-level features;
    第八融合路径,用于融合同一尺度的特征信息;The eighth fusion path is used to fuse the feature information of the same scale;
    第九融合路径,用于融合分别位于相邻两层融合层且分别位于第一融合路径和第二融合路径的融合单元;a ninth fusion path, used to fuse fusion units that are respectively located in two adjacent fusion layers and are respectively 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.
  17. 根据权利要求15所述的计算机可读存储介质,其中,所述对称三角特征金字塔融合网络包括五层融合层,五层融合层的融合单元数量分别为五个、四个、三个、二个和一个。The computer-readable storage medium according to claim 15, wherein the symmetric triangular feature pyramid fusion network comprises five layers of fusion layers, and the number of fusion units of the five layers of fusion layers is five, four, three, and two, respectively. and a.
  18. 一种计算机设备,其中,所述计算机设备包括计算机可读存储介质、处理器和存储在所述计算机可读存储介质中的基于特征金字塔的图像检测模型的训练程序,所述基于特征金字塔的图像检测模型的训练程序被处理器执行时实现权利要求1所述的基于特征金字塔的图像检测模型的训练方法。A computer device, wherein the computer device comprises a computer-readable storage medium, a processor, and a training program for a feature pyramid-based image detection model stored in the computer-readable storage medium, the feature pyramid-based image When the training program of the detection model is executed by the processor, the training method of the image detection model based on the feature pyramid according to claim 1 is realized.
PCT/CN2020/136553 2020-12-09 2020-12-15 Image detection model training method based on feature pyramid, medium, and device WO2022120901A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011449545.2 2020-12-09
CN202011449545.2A CN114612374A (en) 2020-12-09 2020-12-09 Training method, medium, and apparatus for image detection model based on feature pyramid

Publications (1)

Publication Number Publication Date
WO2022120901A1 true WO2022120901A1 (en) 2022-06-16

Family

ID=81857202

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/136553 WO2022120901A1 (en) 2020-12-09 2020-12-15 Image detection model training method based on feature pyramid, medium, and device

Country Status (2)

Country Link
CN (1) CN114612374A (en)
WO (1) WO2022120901A1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115170883A (en) * 2022-07-19 2022-10-11 哈尔滨市科佳通用机电股份有限公司 Method for detecting loss fault of brake cylinder piston push rod open pin
CN116403180A (en) * 2023-06-02 2023-07-07 上海几何伙伴智能驾驶有限公司 4D millimeter wave radar target detection, tracking and speed measurement method based on deep learning
CN116665088A (en) * 2023-05-06 2023-08-29 海南大学 Ship identification and detection method, device, equipment and medium
CN117097876A (en) * 2023-07-07 2023-11-21 天津大学 Event camera image reconstruction method based on neural network
CN117315458A (en) * 2023-08-18 2023-12-29 北京观微科技有限公司 Target detection method and device for remote sensing image, electronic equipment and storage medium
CN117789144A (en) * 2023-12-11 2024-03-29 深圳职业技术大学 Cross network lane line detection method and device based on weight fusion

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111028237A (en) * 2019-11-26 2020-04-17 中国科学院深圳先进技术研究院 Image segmentation method and device and terminal equipment
CN111275054A (en) * 2020-01-16 2020-06-12 北京迈格威科技有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN111429466A (en) * 2020-03-19 2020-07-17 北京航空航天大学 Space-based crowd counting and density estimation method based on multi-scale information fusion network
CN111523470A (en) * 2020-04-23 2020-08-11 苏州浪潮智能科技有限公司 Feature fusion block, convolutional neural network, pedestrian re-identification method and related equipment
US20200265314A1 (en) * 2019-02-19 2020-08-20 Fujitsu Limited Object recognition method and apparatus and single step object recognition neural network
CN111898432A (en) * 2020-06-24 2020-11-06 南京理工大学 Pedestrian detection system and method based on improved YOLOv3 algorithm

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200265314A1 (en) * 2019-02-19 2020-08-20 Fujitsu Limited Object recognition method and apparatus and single step object recognition neural network
CN111028237A (en) * 2019-11-26 2020-04-17 中国科学院深圳先进技术研究院 Image segmentation method and device and terminal equipment
CN111275054A (en) * 2020-01-16 2020-06-12 北京迈格威科技有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN111429466A (en) * 2020-03-19 2020-07-17 北京航空航天大学 Space-based crowd counting and density estimation method based on multi-scale information fusion network
CN111523470A (en) * 2020-04-23 2020-08-11 苏州浪潮智能科技有限公司 Feature fusion block, convolutional neural network, pedestrian re-identification method and related equipment
CN111898432A (en) * 2020-06-24 2020-11-06 南京理工大学 Pedestrian detection system and method based on improved YOLOv3 algorithm

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115170883A (en) * 2022-07-19 2022-10-11 哈尔滨市科佳通用机电股份有限公司 Method for detecting loss fault of brake cylinder piston push rod open pin
CN115170883B (en) * 2022-07-19 2023-03-14 哈尔滨市科佳通用机电股份有限公司 Brake cylinder piston push rod opening pin loss fault detection method
CN116665088A (en) * 2023-05-06 2023-08-29 海南大学 Ship identification and detection method, device, equipment and medium
CN116403180A (en) * 2023-06-02 2023-07-07 上海几何伙伴智能驾驶有限公司 4D millimeter wave radar target detection, tracking and speed measurement method based on deep learning
CN116403180B (en) * 2023-06-02 2023-08-15 上海几何伙伴智能驾驶有限公司 4D millimeter wave radar target detection, tracking and speed measurement method based on deep learning
CN117097876A (en) * 2023-07-07 2023-11-21 天津大学 Event camera image reconstruction method based on neural network
CN117097876B (en) * 2023-07-07 2024-03-08 天津大学 Event camera image reconstruction method based on neural network
CN117315458A (en) * 2023-08-18 2023-12-29 北京观微科技有限公司 Target detection method and device for remote sensing image, electronic equipment and storage medium
CN117789144A (en) * 2023-12-11 2024-03-29 深圳职业技术大学 Cross network lane line detection method and device based on weight fusion

Also Published As

Publication number Publication date
CN114612374A (en) 2022-06-10

Similar Documents

Publication Publication Date Title
WO2022120901A1 (en) Image detection model training method based on feature pyramid, medium, and device
Feng et al. Pavement crack detection and segmentation method based on improved deep learning fusion model
CN111080620B (en) Road disease detection method based on deep learning
CN111563557B (en) Method for detecting target in power cable tunnel
CN113076871B (en) Fish shoal automatic detection method based on target shielding compensation
CN103186894B (en) A kind of multi-focus image fusing method of self-adaptation piecemeal
CN112465746B (en) Method for detecting small defects in ray film
Hoang et al. Fast local Laplacian‐based steerable and Sobel filters integrated with adaptive boosting classification tree for automatic recognition of asphalt pavement cracks
CN110909623B (en) Three-dimensional target detection method and three-dimensional target detector
CN111275171A (en) Small target detection method based on parameter sharing and multi-scale super-resolution reconstruction
Zhao et al. Defect detection method for electric multiple units key components based on deep learning
CN108961358A (en) A kind of method, apparatus and electronic equipment obtaining samples pictures
CN115439718A (en) Industrial detection method, system and storage medium combining supervised learning and feature matching technology
CN114639102B (en) Cell segmentation method and device based on key point and size regression
CN112560895A (en) Bridge crack detection method based on improved PSPNet network
CN114519819B (en) Remote sensing image target detection method based on global context awareness
Yang et al. PDNet: Improved YOLOv5 nondeformable disease detection network for asphalt pavement
Li et al. Fabric defect segmentation system based on a lightweight GAN for industrial Internet of Things
Sun et al. Roadway crack segmentation based on an encoder-decoder deep network with multi-scale convolutional blocks
Qin et al. An improved faster R-CNN method for landslide detection in remote sensing images
Zhou et al. Vehicle detection in remote sensing image based on machine vision
Zhou et al. [Retracted] A High‐Efficiency Deep‐Learning‐Based Antivibration Hammer Defect Detection Model for Energy‐Efficient Transmission Line Inspection Systems
Pang et al. Multi-Scale Feature Fusion Model for Bridge Appearance Defect Detection
Zhang et al. Pavement crack detection based on deep learning
Chen et al. The improvement of automated crack segmentation on concrete pavement with graph network

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20964834

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20964834

Country of ref document: EP

Kind code of ref document: A1