Object detection method based on multi-source feature joint network and self-generation of transformed images

Through the method of multi-source feature joint network and transformed image self-generation, the problem of high computational cost of multi-source sensor target detection and long time-consuming data set labeling is solved, and efficient and accurate target detection and data set labeling are achieved, which is suitable for real-time detection needs. .

CN114332748BActive Publication Date: 2024-10-15XIDIAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111314311.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-08
Publication Date
2024-10-15
Estimated Expiration
2041-11-08

AI Technical Summary

Technical Problem

The existing technology has high computational cost in multi-source sensor target detection under severe weather conditions and is not suitable for real-time detection requirements. Moreover, data set annotation is time-consuming, costly and error-prone.

Method used

A target detection method based on a multi-source feature joint network and self-generation of transformed images is adopted. The initial target detection network is used to process infrared and visible light images respectively. Multi-source feature correction parameters are used to achieve feature-level fusion, and the intersection and union ratio judgments are used to remove duplicates. Finally, the target detection results are obtained.

Benefits of technology

It reduces the calculation time of target detection, improves the completeness and accuracy of detection, improves the efficiency of data set generation and accuracy of annotation, and meets the needs of real-time detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114332748B_ABST
    Figure CN114332748B_ABST
Patent Text Reader

Abstract

The invention discloses a target detection method based on a multi-source feature joint network and self-generation of transformation images, comprising: using an initial target detection network to obtain initial target detection results for an infrared image to be tested and a visible light image to be tested for the same scene; using a multi-source feature joint network to obtain multi-source feature correction parameters of the infrared image to be tested relative to the visible light image to be tested; using the multi-source feature correction parameters, calculating the position coordinates of each target coordinate in the initial target detection result of the infrared image to be tested relative to the visible light image to be tested, and obtaining a first set of infrared relative visible light target coordinates; for the first set and the second set, determining whether every two elements in the two sets belong to the same target by calculating the intersection and union ratio of the two elements, and obtaining a final target detection result according to the determination result; the invention can reduce target detection time, improve data set generation efficiency, reduce costs and improve accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of target detection, and in particular relates to a target detection method based on a multi-source feature joint network and self-generation of transformed images. Background Art

[0002] In order to overcome the problem that the observation performance of a single sensor is severely limited by severe weather conditions, multi-source means can usually be used to achieve complementary advantages. In recent years, many researchers have achieved certain results in the field of target detection fusion of multi-source sensors. Among them, the representative method is generally to perform pixel registration on multi-source sensor data, then perform data-level fusion, and then perform target detection on the obtained multi-source sensor fusion image.

[0003] However, this traditional method cannot meet the needs of real-time detection and fusion due to the complicated detection and fusion algorithm steps and high computational cost. Therefore, it is not suitable for scenarios with high real-time requirements such as disaster search and rescue. Summary of the invention

[0004] In order to solve the above problems existing in the prior art, the present invention provides a target detection method based on a multi-source feature joint network and self-generation of transformed images. The technical problem to be solved by the present invention is achieved through the following technical solutions:

[0005] A target detection method based on a multi-source feature joint network and self-generation of transformed images, comprising:

[0006] Using the initial target detection network to obtain corresponding initial target detection results for the infrared image to be tested and the visible light image to be tested of the same scene; wherein any initial target detection result includes target coordinates;

[0007] The infrared image to be measured and the visible light image to be measured are combined with a multi-source feature network to obtain a multi-source feature correction parameter of the infrared image to be measured relative to the visible light image to be measured;

[0008] Using the multi-source feature correction parameters, calculate the position coordinates of each target coordinate in the initial target detection result of the infrared image to be measured relative to the visible light image to be measured, and obtain a first set of infrared relative visible light target coordinates;

[0009] For the first set and the second set, determining whether every two elements in the two sets belong to the same target by calculating the intersection and union ratio of the two elements, and obtaining a final target detection result according to the determination result;

[0010] Among them, the multi-source feature correction parameters represent the coordinate position change relationship of the infrared image to be tested relative to the visible light image to be tested; the multi-source feature joint network is trained using samples in a pre-generated infrared image data set and a visible light image data set and corresponding sample labels, and the samples in each data set include a pair of transformed images obtained by self-generation of transformed images, and the sample labels carried by the samples are the coordinate transformation parameters between the pair of transformed images; the second set is composed of all target coordinates in the initial target detection results of the visible light image to be tested.

[0011] In one embodiment of the present invention, the initial target detection network includes:

[0012] YOLO network.

[0013] In one embodiment of the present invention, the generation process of any one of the infrared image dataset and the visible light image dataset includes:

[0014] For each acquired original photoelectric image, the width and height of the original photoelectric image are adjusted to preset standard width and standard height respectively, so as to obtain a standard photoelectric image corresponding to the original photoelectric image; wherein the original photoelectric image used to generate the infrared image data set is an infrared image; and the original photoelectric image used to generate the visible light image data set is a visible light image;

[0015] Selecting values ​​in a predetermined horizontal translation range, a vertical translation range, a horizontal scaling factor range, and a vertical scaling factor range, respectively, and determining the selected four values ​​as coordinate transformation parameters;

[0016] The predetermined initial coordinate group is subjected to coordinate transformation using the coordinate transformation parameters to obtain a corresponding transformed coordinate group; wherein both the initial coordinate group and the transformed coordinate group include coordinates of two vertices as diagonal points of the rectangular frame;

[0017] Using the initial coordinate group and the transformed coordinate group, images within corresponding rectangular frames are respectively intercepted from the standard photoelectric image to obtain a pair of transformed images;

[0018] Performing random parameter adjustment on any transformed image in the pair of transformed images in gray space, determining the adjusted pair of transformed images as a sample, and determining the coordinate transformation parameter as a corresponding sample label;

[0019] A sample set carrying sample labels obtained from the acquired multiple original photoelectric images is determined as a corresponding data set.

[0020] In one embodiment of the present invention, the two vertex coordinates serving as diagonal points of the rectangular frame are the upper left vertex coordinate and the lower right vertex coordinate;

[0021] The process of obtaining the corresponding transformed coordinate group for the initial coordinate group includes:

[0022]

[0023] Among them, (x min ,y min ) and (x max ,y max ) are the coordinates of the upper left vertex and the lower right vertex in the initial coordinate group respectively; (x′ min ,y′ min ) and (x′ max ,y′ max ) are respectively the coordinates of the upper left vertex and the lower right vertex in the transformed coordinate group; m W 、m H , W and ρ H are the coordinate transformation parameters, which are the horizontal translation value, the vertical translation value, the horizontal scaling factor value, and the vertical scaling factor value in sequence.

[0024] In one embodiment of the present invention, the step of performing random parameter adjustment in grayscale space on any transformed image in the pair of transformed images includes:

[0025] For each of the histogram equalization process, the brightness adjustment process, and the color inversion adjustment process, a corresponding random number is generated;

[0026] The magnitude relationship between the random number of the processing and the preset probability value corresponding to the processing is determined, and corresponding processing is performed on any transformed image in the pair of transformed images according to the magnitude relationship.

[0027] In one embodiment of the present invention, the structure of the multi-source feature joint network includes:

[0028] A detection branch group, a backbone convolutional network and a Resnet18 network connected in sequence; wherein the detection branch group includes an infrared image detection branch and a visible light image detection branch connected in parallel; the infrared image detection branch and the visible light image detection branch both include a deep feature extraction module and a mask prediction module connected in parallel, a splicing module connected to the output ends of the deep feature extraction module and the mask prediction module at the same time, and a branch convolutional network connected to the output end of the splicing module.

[0029] In one embodiment of the present invention, the training process of the multi-source feature joint network includes:

[0030] Infrared image training stage and visible light image training stage; wherein, the input image of each training stage is the image after the samples in the corresponding data set are grayed, and each training stage uses a preset loss function to determine the network convergence.

[0031] In one embodiment of the present invention, the expression of the preset loss function includes:

[0032]

[0033] Wherein, loss is the preset loss function; λ move is the displacement loss penalty; zoom is the scaling loss penalty; m' W is the actual horizontal translation value; m' H is the actual vertical translation value; The horizontal translation value predicted when the multi-source feature joint network is trained; is the vertical translation value predicted during the training of the multi-source feature joint network; ρ' W is the actual horizontal scaling factor; ρ' H is the actual vertical scaling factor value; is the horizontal scaling coefficient value predicted during the multi-source feature joint network training; It is the scaling coefficient value in the vertical direction predicted during the training of the multi-source feature joint network.

[0034] In one embodiment of the present invention, the multi-source feature correction parameters include: a horizontal translation value of the infrared image to be measured relative to the visible light image to be measured Vertical shift value Horizontal zoom factor value and the vertical scaling factor value

[0035] The calculation process of the infrared relative visible light target coordinates includes:

[0036]

[0037] in, and is the target coordinates in the initial target detection result of the infrared image to be detected; and is the infrared relative to visible light target coordinate.

[0038] In one embodiment of the present invention, any initial target detection result also includes a confidence level that the target belongs to a preset category;

[0039] The method of determining whether every two elements in the two sets belong to the same target by calculating the intersection and union ratio of the two elements for the first set and the second set, and performing target deduplication according to the determination result to obtain the final target detection result includes:

[0040] For each calculated intersection-and-union ratio, determine whether the intersection-and-union ratio is greater than a preset intersection-and-union ratio threshold.

[0041] If yes, it is determined that the two elements of the intersection-and-union ratio are the same target, and the detection result with a higher confidence in the initial target detection results of the infrared image to be tested and the visible light image to be tested is determined as the detection result corresponding to the intersection-and-union ratio;

[0042] If not, it is determined that the two elements for calculating the intersection-and-union ratio do not belong to the same target, and the detection results in the initial target detection results of the infrared image to be tested and the visible light image to be tested are both determined as the detection results corresponding to the intersection-and-union ratio;

[0043] The final target detection result is obtained by calculating the detection results corresponding to all intersection-over-union ratios.

[0044] In the scheme proposed in the embodiment of the present invention, the infrared image to be tested and the visible light image to be tested for the same scene are firstly detected by using the initial target detection network to obtain their respective initial target detection results. Secondly, the multi-source feature joint network constructed and trained in advance is used to obtain the multi-source feature correction parameters of the infrared image to be tested relative to the visible light image to be tested; then the multi-source feature correction parameters are used to calculate the position coordinates of each target coordinate in the initial target detection result of the infrared image to be tested relative to the visible light image to be tested, and the first set of infrared relative visible light target coordinates is obtained, so as to realize the mapping of the target detection result of the infrared image to be tested to the visible light image to be tested, and complete the fusion of the detection results of the two images at the feature level; finally, for the first set and the second set, by calculating the intersection and union ratio of the two elements, it is judged whether each two elements in the two sets belong to the same target, and the target is deduplicated according to the judgment result, so as to obtain the final target detection result. Compared with the prior art that performs pixel registration and then performs data-level fusion on the multi-source sensor data, the target detection results of the infrared image to be tested and the visible light image to be tested are fused at the feature level in the embodiment of the present invention, which can reduce the calculation time of target detection and improve the integrity and accuracy of target detection. In addition, the prior art usually adopts manual annotation in the process of data set production, which leads to problems such as long time consumption, high labor costs and large errors in annotation information. In the data set for training the multi-source feature joint network in the embodiment of the present invention, each sample is a pair of transformed images automatically generated by the self-generation method of transformed images, and sample label annotation can be automatically realized. Therefore, the efficiency of data set generation can be improved, the cost of data set generation can be reduced, and the accuracy of data set annotation can be improved.

[0045] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 A flowchart of a target detection method based on a multi-source feature joint network and self-generation of transformed images provided by an embodiment of the present invention;

[0047] Figure 2 A schematic diagram of panning and zooming according to an embodiment of the present invention;

[0048] FIG3( a ) is a schematic diagram of a pair of transformed images captured in an embodiment of the present invention;

[0049] FIG. 3( b ) is a schematic diagram showing the superposition effect of a pair of transformed images in an embodiment of the present invention.

[0050] Figure 4 A schematic diagram of the structure of a multi-source feature joint network according to an embodiment of the present invention;

[0051] Figure 5 A specific structural diagram of a multi-source feature joint network according to an embodiment of the present invention;

[0052] FIG6( a ) is an initial target detection result obtained by using an initial target detection network for a visible light image to be tested according to an embodiment of the present invention;

[0053] FIG6( b ) is an initial target detection result obtained by using an initial target detection network for an infrared image to be tested according to an embodiment of the present invention;

[0054] FIG6( c ) is the final target detection result obtained by the embodiment of the present invention. DETAILED DESCRIPTION

[0055] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0056] To solve the problems in the prior art, the present invention proposes a target detection method based on a multi-source feature joint network and self-generation of transformed images. Figure 1 , Figure 1 A flowchart of a target detection method based on a multi-source feature joint network and self-generation of transformed images provided by an embodiment of the present invention. The method comprises the following steps:

[0057] S1, using the initial target detection network to obtain the corresponding initial target detection results for the infrared image to be tested and the visible light image to be tested of the same scene.

[0058] In the embodiment of the present invention, for the same scene, an infrared image to be tested and a visible light image to be tested can be obtained in advance at the same time. The infrared image to be tested can be obtained by using an infrared camera or an infrared camera; the visible light image to be tested can be obtained by using a conventional camera, a still camera or a camera.

[0059] The initial target detection network can be implemented using any existing target detection network, such as R-CNN, FastRCNN, Faster R-CNN, SSD and other networks.

[0060] In an optional implementation manner, the initial target detection network includes:

[0061] YOLO network.

[0062] The YOLO network may specifically include Yolo-v1, Yolo-v2, Yolo-v3, and Yolo-v4 networks. The embodiment of the present invention may select any of the YOLO networks as the initial target detection network as needed.

[0063] For the training data set of the initial target detection network, visible light images can use VOC2007 and VOC2012 data sets, and infrared images can use CVC-14 data sets.

[0064] Compared with the two-stage algorithm adopted by R-CNN, Fast RCNN, Faster R-CNN and other networks, Yolo adopts a one-stage algorithm, which only uses one CNN network to directly predict the category and location of different targets. Therefore, it is faster and has obvious advantages for scenarios with high real-time requirements.

[0065] Any initial target detection result includes target coordinates. In a commonly used method, the initial target detection result usually represents the target coordinates in the coordinates of a rectangular box including the target. For example, for a target, two vertex coordinates on the diagonal of the rectangular box including the target can be selected as the target coordinates. The two vertex coordinates can be the upper left vertex coordinate and the lower right vertex coordinate; or they can be the lower left vertex coordinate and the upper right vertex coordinate.

[0066] At the same time, any initial target detection result also includes the confidence that the target belongs to a preset category. The confidence indicates the probability that the target belongs to a preset category. The higher the confidence that the target belongs to a preset category, the greater the possibility that the target belongs to the preset category.

[0067] In the embodiment of the present invention, the preset categories of the targets are set according to the scene requirements, for example, the preset categories may include people, animals, etc.

[0068] S2, using a multi-source feature joint network to obtain multi-source feature correction parameters of the infrared image to be measured relative to the visible light image to be measured.

[0069] The multi-source feature correction parameter represents the coordinate position change relationship of the infrared image to be measured relative to the visible light image to be measured.

[0070] Multi-source feature correction parameters, including: horizontal translation value of the infrared image to be measured relative to the visible light image to be measured Vertical shift value Horizontal zoom factor value and the vertical scaling factor value This part of the content can be understood in conjunction with the dataset generation process and network training process in the following text.

[0071] The multi-source feature correction parameters can be used to obtain the corresponding coordinates of any point in the infrared image to be measured in the visible light image to be measured, that is, the target of the infrared image to be measured can be mapped to the visible light image to be measured.

[0072] The multi-source feature joint network is trained using samples from pre-generated infrared image datasets and visible light image datasets and their corresponding sample labels. The samples in each dataset include a pair of transformed images obtained by self-generation of transformed images, and the sample labels carried by the samples are the coordinate transformation parameters between the pair of transformed images.

[0073] Since the coordinate transformation parameters as sample labels reflect the coordinate position change relationship of the first image relative to the second image in a pair of transformed images, the multi-source feature joint network can predict the coordinate position change relationship of the first image relative to the second image for two unknown input images by using a pair of transformed images of each data set and the coordinate transformation parameters between the pair of transformed images after training. Then, the trained multi-source feature joint network can extract the features of the visible light image and the infrared image through network forward propagation for the two unknown input images, and predict the coordinate position change relationship of the infrared image to be tested relative to the visible light image to be tested based on similar features, which is similar to the content contained in the coordinate transformation parameters of the same pair of transformed images. In order to distinguish, the embodiment of the present invention represents it here as a multi-source feature correction parameter.

[0074] For a clear layout, the generation process of the infrared image dataset and the visible light image dataset, as well as the structure and training process of the multi-source feature joint network are described in detail later.

[0075] S3, using the multi-source feature correction parameters, calculate the position coordinates of each target coordinate in the initial target detection result of the infrared image to be measured relative to the visible light image to be measured, and obtain a first set of infrared relative visible light target coordinates.

[0076] For each target coordinate in the initial target detection result of the infrared image to be tested, the multi-source feature correction parameters can be used to calculate the position coordinates of the target coordinate relative to the visible light image to be tested, that is, the target coordinates in the infrared image to be tested and the corresponding coordinates in the visible light image to be tested.

[0077] In an optional implementation manner, the calculation process of infrared relative to visible light target coordinates includes:

[0078]

[0079] in, and are the target coordinates in the initial target detection result of the infrared image to be tested, that is, the corresponding upper left vertex coordinates and lower right vertex coordinates; and is the infrared relative to visible light target coordinate, that is, the corresponding upper left vertex coordinate and lower right vertex coordinate.

[0080] In the embodiment of the present invention, the coordinates obtained by the above processing of the target coordinates in the initial target detection result of the infrared image to be tested are named as infrared relative visible light target coordinates. The set consisting of infrared relative visible light target coordinates obtained from all target coordinates in the initial target detection result of the infrared image to be tested is named as the first set. It can be understood that the elements in the first set are infrared relative visible light target coordinates, and their coordinate positions are in the visible light image to be tested, but they express the target detection result of the infrared image to be tested after step S1.

[0081] In this step, the embodiment of the present invention utilizes multi-source feature correction parameters to perform feature-level fusion on the initial target detection results of the infrared image to be tested and the visible light image to be tested. Since feature extraction has been performed, unlike the data-level fusion method in the prior art which requires a large amount of target detection time, the embodiment of the present invention can shorten the duration of subsequent target detection.

[0082] S4, for the first set and the second set, by calculating the intersection and union ratio of the two elements, determine whether every two elements in the two sets belong to the same target, and obtain the final target detection result according to the determination result.

[0083] The second set is composed of all target coordinates in the initial target detection result of the visible light image to be tested. It can be understood that the elements in the second set are target coordinates, whose coordinate positions are in the visible light image to be tested, and express the target detection result of the visible light image to be tested after step S1.

[0084] Specifically, in an embodiment of the present invention, the intersection-and-union ratio between the first element in the first set and each element in the second set can be calculated respectively. After the elements in the second set are traversed, the above process is repeated for the next element in the first set until the intersection-and-union ratio of all elements in the first set and the elements in the second set are calculated.

[0085] The embodiment of the present invention uses the intersection of union (IoU) as a measurement indicator to describe the overlap between the detection results of two targets in the first set and the second set. The larger the IoU is, the higher the overlap of the two targets is, which means that the two targets in the first set and the second set are more likely to be the same target. For the concept of the intersection of union, please refer to the relevant prior art.

[0086] Since the elements in the first set and the second set are all target coordinates, each target coordinate includes the coordinates of two vertices on the diagonal line of the rectangular box where the target is located.

[0087] In an optional implementation manner, the intersection-over-union ratio may be calculated as follows:

[0088]

[0089] Among them, S A∩B represents the intersection area of ​​the two detection results A and B, specifically the intersection area of ​​the first set and the second set of detection results in the embodiment of the present invention; and is an element in the first set, namely, the upper left vertex coordinates and the lower right vertex coordinates as the target coordinates; and is an element in the second set, namely, the upper left vertex coordinates and the lower right vertex coordinates as the target coordinates.

[0090] Among them, S A∩B The method is:

[0091] S A∩B =(X max -X min )·(Y max -Y min )

[0092] in,

[0093] Among them, max() and min() represent the maximum value and minimum value operations respectively.

[0094] In an optional implementation, for the first set and the second set, by calculating the intersection and union ratio of the two elements, it is determined whether every two elements in the two sets belong to the same target, and the target is deduplicated according to the determination result to obtain the final target detection result, including:

[0095] For each calculated intersection-and-union ratio, determine whether the intersection-and-union ratio is greater than a preset intersection-and-union ratio threshold.

[0096] If so, it is determined that the two elements for calculating the intersection-and-union ratio belong to the same target, and the detection result with a higher confidence in the initial target detection results of the infrared image to be tested and the visible light image to be tested is determined as the detection result corresponding to the intersection-and-union ratio.

[0097] If not, it is determined that the two elements for calculating the intersection-and-union ratio do not belong to the same target, and the detection results in the initial target detection results of the infrared image to be tested and the visible light image to be tested are both determined as the detection results corresponding to the intersection-and-union ratio.

[0098] The final target detection result is obtained by calculating the detection results corresponding to all intersection-over-union ratios.

[0099] Specifically, the preset intersection-over-union ratio threshold may be set based on experience, such as 0.5.

[0100] As described above, any initial target detection result also includes the confidence that the target belongs to a preset category. So for the same target, the confidence values ​​about the target in the initial target detection results of the infrared image to be tested and the visible light image to be tested may be different. When it is determined that the targets detected by the two detection results are the same, the detection result with high confidence can be retained, and the detection result with low confidence can be deleted to achieve target deduplication, so as to improve the accuracy of the final target detection result; but if the targets detected by the two detection results are different, both detection results need to be retained to avoid missing detection results, so as to improve the integrity of the final target detection result.

[0101] It can be understood that when all detection results corresponding to the intersection-overlapping ratios are subjected to the above-mentioned de-overlapping and merging processing, the final target detection results corresponding to all targets can be obtained.

[0102] Furthermore, in order to facilitate observation, the final target detection result can be marked on the visible light image to be tested, that is, the rectangular box where the target is located and the confidence level of the target are marked according to the target coordinates.

[0103] In the scheme proposed in the embodiment of the present invention, the infrared image to be tested and the visible light image to be tested for the same scene are firstly detected by using the initial target detection network to obtain the respective initial target detection results. Secondly, the multi-source feature joint network constructed and trained in advance is used to obtain the multi-source feature correction parameters of the infrared image to be tested relative to the visible light image to be tested; then the multi-source feature correction parameters are used to calculate the position coordinates of each target coordinate in the initial target detection result of the infrared image to be tested relative to the visible light image to be tested, and the first set of infrared relative visible light target coordinates is obtained, so as to realize the mapping of the target detection result of the infrared image to be tested to the visible light image to be tested, and complete the fusion of the detection results of the two images at the feature level; finally, for the first set and the second set, by calculating the intersection and union ratio of the two elements, it is judged whether each two elements in the two sets belong to the same target, and the target is deduplicated according to the judgment result, so as to obtain the final target detection result. Compared with the prior art that performs pixel registration and then performs data-level fusion on the multi-source sensor data, the embodiment of the present invention performs feature-level fusion on the target detection results of the infrared image to be tested and the visible light image to be tested, which can reduce the calculation time of target detection and improve the integrity and accuracy of target detection. In addition, the prior art usually adopts manual annotation in the process of data set production, which leads to problems such as long time consumption, high labor costs and large errors in annotation information. In the data set for training the multi-source feature joint network in the embodiment of the present invention, each sample is a pair of transformed images automatically generated by the self-generation method of transformed images, and sample label annotation can be automatically realized. Therefore, the efficiency of data set generation can be improved, the cost of data set generation can be reduced, and the accuracy of data set annotation can be improved.

[0104] The following describes the generation process of the infrared image dataset and the visible light image dataset, as well as the structure and training process of the multi-source feature joint network.

[0105] (I) Generation process of infrared image dataset and visible light image dataset

[0106] In an optional implementation manner, the process of generating any one of the infrared image dataset and the visible light image dataset includes the following steps:

[0107] A1, for each acquired original photoelectric image, adjusting the width and height of the original photoelectric image to a preset standard width and standard height respectively, to obtain a standard photoelectric image corresponding to the original photoelectric image.

[0108] Among them, the original photoelectric image used to generate the infrared image data set is an infrared image; the original photoelectric image used to generate the visible light image data set is a visible light image.

[0109] The standard width is represented by W, the standard height is represented by H, and the size of the standard photoelectric image is represented by W×H. The values ​​of W and H can be set according to experience and requirements, for example, W can be 1920 and H can be 1080.

[0110] A2, selecting values ​​in a predetermined horizontal translation range, vertical translation range, horizontal scaling factor range, and vertical scaling factor range, respectively, and determining the selected four values ​​as coordinate transformation parameters.

[0111] Horizontal shift value in m W Indicates that the translation direction is the y direction, that is, the image width direction, and the horizontal translation range is m W The range of the embodiment of the present invention is specifically -0.125W to 0.125W; the vertical translation value is m H Indicates that the translation direction is the x direction, that is, the height direction of the graph, and the vertical translation range is m H The range of the present invention is specifically -0.125H to 0.125H; the horizontal scaling factor value is ρ W Indicates the horizontal scaling ratio, and the horizontal scaling factor range is ρ W The range of the present invention is specifically 1.03 to 0.86; the vertical scaling factor value is ρ H Indicates the vertical scaling ratio, and the vertical scaling factor range is ρ H When the zoom factor value is less than 1, it indicates zooming out; when the zoom factor value is greater than 1, it indicates zooming in; and when the zoom factor value is equal to 1, it indicates no change.

[0112] For easier understanding, see Figure 2 As shown, Figure 2 A schematic diagram of panning and zooming according to an embodiment of the present invention; Figure 2 In the example, p1 and p2 form a rectangular box, and q1 and q2 form another rectangular box. The latter is obtained by horizontally and vertically translating and shrinking the former. For example, p1 moves to q1, and the horizontal translation value is m W and vertical translation value m H Please refer to the symbol in the figure. For simplicity, the horizontal scaling factor ρ W and the vertical scaling factor ρ H Not illustrated.

[0113] A3, performing coordinate transformation on the predetermined initial coordinate group using coordinate transformation parameters to obtain a corresponding transformed coordinate group.

[0114] The initial coordinate group and the transformed coordinate group both include the coordinates of two vertices that are diagonal points of the rectangular frame.

[0115] In an optional implementation manner, the two vertex coordinates serving as diagonal points of the rectangular frame are the upper left vertex coordinates and the lower right vertex coordinates.

[0116] For the initial coordinate group, the process of obtaining the corresponding transformed coordinate group includes:

[0117]

[0118] Among them, (x min ,y min ) and (x max ,y max ) are the coordinates of the upper left vertex and the lower right vertex in the initial coordinate group respectively; (x′ min ,y′ min ) and (x′ max ,y′ max ) are the coordinates of the upper left vertex and the lower right vertex in the transformation coordinate group respectively; m W 、m H , W and ρ H are coordinate transformation parameters, which are the horizontal translation value, the vertical translation value, the horizontal scaling factor value, and the vertical scaling factor value.

[0119] The manner in which the two vertex coordinates serving as diagonal points of the rectangular frame are the lower left vertex coordinates and the upper right vertex coordinates is not specifically described here.

[0120] A4, using the initial coordinate group and the transformed coordinate group, respectively cut out images within the corresponding rectangular frame range from the standard photoelectric image to obtain a pair of transformed images.

[0121] As described above, both the initial coordinate group and the transformed coordinate group include the coordinates of the upper left vertex and the lower right vertex as the diagonal points of the rectangular frame. Therefore, the corresponding rectangular frame can be determined using these two vertex coordinates, and the image within the rectangular frame can be cut out. The two cut-out images are named a pair of transformed images.

[0122] Please refer to FIG. 3(a), which is a schematic diagram of a pair of transformed images captured in an embodiment of the present invention. The black frame area and the white frame area in FIG. 3(a) are rectangular frames where a pair of transformed images are located. When a pair of transformed images are obtained, the coordinate transformation parameters used by the pair of transformed images are recorded as sample labels. In order to verify the accuracy of the recorded coordinate transformation parameters, the captured pair of transformed images can be superimposed and displayed using the recorded coordinate transformation parameters. Please refer to FIG. 3(b) for the actual effect diagram.

[0123] A5, performing random parameter adjustment in gray space on any transformed image in the pair of transformed images, and determining the adjusted pair of transformed images as a sample, and determining the coordinate transformation parameter as a corresponding sample label.

[0124] In an optional implementation manner, performing random parameter adjustment in gray space on any transformed image in the pair of transformed images includes:

[0125] For each of the histogram equalization process, the brightness adjustment process, and the color inversion adjustment process, a corresponding random number is generated;

[0126] The magnitude relationship between the random number of the processing and the preset probability value corresponding to the processing is determined, and corresponding processing is performed on any transformed image in the pair of transformed images according to the magnitude relationship.

[0127] Specifically, the random number of each process is between 1 and 100. The preset probability values ​​corresponding to the histogram equalization process, the brightness adjustment process, and the color inversion adjustment process are 70%, 50%, and 30%, respectively. For each process, if the random number of the process is less than or equal to the preset probability value corresponding to the process, the process is performed on any transformed image in the pair of transformed images, otherwise, the process is not performed.

[0128] For example, if the random number of the brightness adjustment process is less than or equal to 50%, then any one of the pair of transformed images is subjected to brightness adjustment process, wherein the brightness adjustment range is -10% to 10%, and the specific brightness adjustment value can be randomly selected.

[0129] In order to simplify the processing, in an optional embodiment, for each pair of transformed images, the image to be processed may be a transformed image obtained by performing coordinate transformation using coordinate transformation parameters.

[0130] In actual detection, the inputs to the multi-source feature joint network are infrared images and visible light images, and there are certain grayscale spatial differences between these two types of images. The purpose of step A5 is to make each pair of transformed images as samples have grayscale spatial differences similar to those of infrared images and visible light images to ensure the consistency of the samples.

[0131] A6: Determine a sample set carrying sample labels obtained from the multiple original photoelectric images as a corresponding data set.

[0132] The infrared image dataset consists of samples with sample labels obtained from multiple infrared images. The visible light image dataset consists of samples with sample labels obtained from multiple visible light images.

[0133] After obtaining the infrared image data set and the visible light image data set, each data set can be divided into a training sample data set and a test sample data set according to the sample ratio. The training sample data set is used in the training process of the multi-source feature joint network, and the test sample data set is used in the testing process of the multi-source feature joint network training effect. The division ratio of the training sample data set and the test sample data set in each data set is not limited here, for example, it can be 7:3, etc.

[0134] (II) Structure of the Multi-Source Feature Joint Network

[0135] See also Figure 4 As shown, Figure 4 Schematic diagram of the structure of a multi-source feature joint network according to an embodiment of the present invention.

[0136] In the embodiment of the present invention, the structure of the multi-source feature joint network includes:

[0137] A detection branch group, a backbone convolutional network and a Resnet18 network connected in sequence; wherein the detection branch group includes an infrared image detection branch and a visible light image detection branch connected in parallel; the infrared image detection branch and the visible light image detection branch both include a deep feature extraction module and a mask prediction module connected in parallel, a splicing module connected to the output ends of the deep feature extraction module and the mask prediction module at the same time, and a branch convolutional network connected to the output end of the splicing module.

[0138] Figure 4 In the figure, the detection branch group is represented by a short dashed line frame, and the infrared image detection branch and the visible light image detection branch are represented by a dotted dashed line frame.

[0139] Among them, the deep feature extraction module includes multiple convolutional layers and pooling layers arranged at intervals, and the specific number can be selected as needed. The mask prediction module includes multiple convolutional layers and residual units arranged at intervals, and the specific number can be selected as needed. The Resnet18 network is an existing network structure and will not be described in detail here.

[0140] Among them, the deep feature extraction module is responsible for extracting features of different levels and scales from the input image to obtain feature maps, and the mask prediction module is responsible for predicting regional masks of features at different levels. The addition of the mask prediction module can improve the prediction accuracy of the overall model. The splicing module is used to superimpose and splice the feature map obtained by the deep feature extraction module with the corresponding mask. The Resnet18 network is used for regression calculation.

[0141] In an optional implementation manner, a specific structure of the multi-source feature joint network is as follows: Figure 5As shown in the figure, the input shape of the multi-source feature joint network is 512×512×2. For example, the convolution layer ×2 represents two convolution layers in cascade. The concatenation module can use the add feature fusion method.

[0142] (III) Training process of multi-source feature joint network

[0143] In the embodiment of the present invention, the training process of the multi-source feature joint network includes:

[0144] Infrared image training stage and visible light image training stage; wherein, the input image of each training stage is the image after the samples in the corresponding data set are grayed, and each training stage uses a preset loss function to determine the network convergence.

[0145] In the embodiment of the present invention, the purpose of grayscale processing is to reduce network parameters and balance the input shapes of visible light images and infrared images. In addition, the two input images of the multi-source feature joint network are pre-adjusted to have the same size of 512×512.

[0146] Specifically, the infrared image training is performed using the training sample data set in the infrared image data set, and the training effect is verified using the test sample data set. Figure 5 The input image 1 and input image 2 in the infrared image dataset are grayscale images of a sample in the infrared image dataset. The training sample dataset in the visible light image dataset is used for visible light image training, and the test sample dataset is used to verify the training effect. At this time, Figure 5 The input image 1 and the input image 2 in the figure are images of a sample in the visible light image data set after being grayed. In the embodiment of the present invention, the infrared image training stage and the visible light image training stage are independent of each other. When both training stages are completed, the training process of the multi-source feature joint network is completed.

[0147] Among them, the expressions of the preset loss functions include:

[0148]

[0149] Among them, loss is the preset loss function; λ move is the displacement loss penalty; zoom is the scaling loss penalty; λ move and λ zoom These are all preset values. m' W is the actual horizontal translation value; m' H is the actual vertical translation value; It is the predicted horizontal translation value when training the multi-source feature joint network; is the vertical translation value predicted during multi-source feature joint network training; ρ'W is the actual horizontal scaling factor; ρ' H is the actual vertical scaling factor value; It is the horizontal scaling factor value predicted when training the multi-source feature joint network; The vertical scaling factor value predicted when training the multi-source feature joint network.

[0150] Among them, each actual value is obtained based on two input images, and each predicted value is output by the multi-source feature joint network. Through continuous iteration, the network weight parameter training is carried out. When the judgment loss function reaches the minimum value, it indicates that the predicted value is close to the actual value, then the multi-source feature joint network converges and the training ends. After the network training is completed, for the actual detection process, input image 1 and input image 2 are the infrared image to be tested and the visible light image to be tested, respectively.

[0151] Exemplarily, regarding the detection results of the embodiment of the present invention, please refer to Figure 6. Figures 6(a), (b) and (c) are respectively the initial target detection results obtained by using the initial target detection network for the visible light image to be tested, the initial target detection results obtained by using the initial target detection network for the infrared image to be tested, and the final target detection results obtained by using the method of the embodiment of the present invention. The category of the target is person, and the number following it represents the confidence of the category. From Figure 6, it can be seen that the target detection method using the multi-source feature joint network and the self-generation of the transformed image proposed in the embodiment of the present invention can combine the initial target detection results of the infrared image to be tested and the visible light image to be tested to obtain a relatively accurate final target detection result. It should be noted that Figures 6(a) and 6(c) in the accompanying drawings were originally visible light color images, which are illustrated in this article with the corresponding grayscale images.

[0152] Regarding the performance of the embodiment of the present invention, please refer to Table 1, which is a comparison of the average accuracy and average processing speed of the multi-source optoelectronic data layer fusion detection algorithm using the prior art SIFT features and the method of the embodiment of the present invention. The experimental data uses a total of 100 pairs of visible light and infrared images in a fire search and rescue scene. It can be seen that compared with the traditional multi-source optoelectronic data layer fusion detection algorithm, the average accuracy of the method of the embodiment of the present invention is at the same level, but the average processing speed is greatly improved, which can meet the real-time requirements of target detection in the field of disaster search and rescue.

[0153] Table 1

[0154] method Average accuracy / % Average processing speed / s SIFT+ data layer fusion 81.5 3.7 Method of the present invention 82.8 0.153

[0155] In summary, the method of the embodiment of the present invention can reduce the computation time of target detection, improve the completeness and accuracy of target detection, and improve the efficiency of data set generation, reduce the cost of data set generation, and improve the accuracy of data set annotation.

[0156] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0157] The above are only preferred embodiments of the present invention and are not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A target detection method based on a multi-source feature joint network and self-generation of transformed images, characterized in that: include: Using the initial target detection network to obtain corresponding initial target detection results for the infrared image to be tested and the visible light image to be tested of the same scene; wherein any initial target detection result includes target coordinates; The infrared image to be measured and the visible light image to be measured are combined with a multi-source feature network to obtain a multi-source feature correction parameter of the infrared image to be measured relative to the visible light image to be measured; Using the multi-source feature correction parameters, calculate the position coordinates of each target coordinate in the initial target detection result of the infrared image to be measured relative to the visible light image to be measured, and obtain a first set of infrared relative visible light target coordinates; For the first set and the second set, determining whether every two elements in the two sets belong to the same target by calculating the intersection and union ratio of the two elements, and obtaining a final target detection result according to the determination result; Among them, the structure of the multi-source feature joint network includes: a detection branch group, a backbone convolutional network and a Resnet18 network connected in sequence; wherein the detection branch group includes a parallel infrared image detection branch and a visible light image detection branch; the infrared image detection branch and the visible light image detection branch both include a parallel deep feature extraction module and a mask prediction module, a splicing module simultaneously connected to the output ends of the deep feature extraction module and the mask prediction module, and a branch convolutional network connected to the output end of the splicing module; the multi-source feature correction parameter represents the coordinate position change relationship of the infrared image to be tested relative to the visible light image to be tested; the multi-source feature joint network is trained using samples in a pre-generated infrared image data set and a visible light image data set and corresponding sample labels, and the samples in each data set include a pair of transformed images obtained by a self-generation method of transformed images, and the sample labels carried by the samples are coordinate transformation parameters between the pair of transformed images; the second set consists of all target coordinates in the initial target detection result of the visible light image to be tested.

2. The target detection method of claim 1 using a multi-source feature joint network and self-generation of transformed images, characterized in that: The initial target detection network includes: YOLO network.

3. The target detection method of claim 1 using a multi-source feature joint network and self-generation of transformed images, characterized in that: The generation process of any one of the infrared image dataset and the visible light image dataset includes: For each acquired original photoelectric image, the width and height of the original photoelectric image are adjusted to preset standard width and standard height respectively, so as to obtain a standard photoelectric image corresponding to the original photoelectric image; wherein the original photoelectric image used to generate the infrared image data set is an infrared image; and the original photoelectric image used to generate the visible light image data set is a visible light image; Selecting values ​​in a predetermined horizontal translation range, a vertical translation range, a horizontal scaling factor range, and a vertical scaling factor range, respectively, and determining the selected four values ​​as coordinate transformation parameters; The predetermined initial coordinate group is subjected to coordinate transformation using the coordinate transformation parameters to obtain a corresponding transformed coordinate group; wherein both the initial coordinate group and the transformed coordinate group include coordinates of two vertices as diagonal points of the rectangular frame; Using the initial coordinate group and the transformed coordinate group, images within corresponding rectangular frames are respectively intercepted from the standard photoelectric image to obtain a pair of transformed images; Performing random parameter adjustment on any transformed image in the pair of transformed images in gray space, determining the adjusted pair of transformed images as a sample, and determining the coordinate transformation parameter as a corresponding sample label; A sample set carrying sample labels obtained from the acquired multiple original photoelectric images is determined as a corresponding data set.

4. The target detection method of claim 3 using a multi-source feature joint network and self-generation of transformed images, characterized in that: The two vertex coordinates as diagonal points of the rectangular frame are the upper left vertex coordinate and the lower right vertex coordinate; The process of obtaining the corresponding transformed coordinate group for the initial coordinate group includes: Among them, (x min ,y min ) and (x max ,y max ) are the coordinates of the upper left vertex and the lower right vertex in the initial coordinate group respectively; (x′ min ,y′ min ) and (x′ max ,y′ max ) are respectively the coordinates of the upper left vertex and the lower right vertex in the transformed coordinate group; m W 、m H , W and ρ H are the coordinate transformation parameters, which are the horizontal translation value, the vertical translation value, the horizontal scaling factor value, and the vertical scaling factor value in sequence.

5. The target detection method of claim 3 using a multi-source feature joint network and self-generation of transformed images, characterized in that: The step of performing random parameter adjustment on the grayscale space of any transformed image in the pair of transformed images comprises: For each of the histogram equalization process, the brightness adjustment process, and the color inversion adjustment process, a corresponding random number is generated; The magnitude relationship between the random number of the processing and the preset probability value corresponding to the processing is determined, and corresponding processing is performed on any transformed image in the pair of transformed images according to the magnitude relationship.

6. The target detection method using a multi-source feature joint network and self-generation of transformed images according to claim 1 or 4, characterized in that: The training process of the multi-source feature joint network includes: Infrared image training stage and visible light image training stage; wherein, the input image of each training stage is the image after the samples in the corresponding data set are grayed, and each training stage uses a preset loss function to determine the network convergence.

7. The target detection method of claim 6, characterized in that: The expression of the preset loss function includes: Wherein, loss is the preset loss function; λ move is the displacement loss penalty; zoom is the scaling loss penalty; m' W is the actual horizontal translation value; m' H is the actual vertical translation value; The horizontal translation value predicted when the multi-source feature joint network is trained; is the vertical translation value predicted during the training of the multi-source feature joint network; ρ' W is the actual horizontal scaling factor; ρ' H is the actual vertical scaling factor value; is the horizontal scaling coefficient value predicted during the multi-source feature joint network training; It is the scaling coefficient value in the vertical direction predicted during the training of the multi-source feature joint network.

8. The target detection method of claim 4 using a multi-source feature joint network and self-generation of transformed images, characterized in that: The multi-source feature correction parameters include: the horizontal translation value of the infrared image to be measured relative to the visible light image to be measured Vertical shift value Horizontal zoom factor value and the vertical scaling factor value The calculation process of the infrared relative visible light target coordinates includes: in, and is the target coordinates in the initial target detection result of the infrared image to be tested; and is the infrared relative to visible light target coordinate.

9. The target detection method of claim 1 using a multi-source feature joint network and self-generation of transformed images, characterized in that: Any initial target detection result also includes the confidence that the target belongs to the preset category; The method of determining whether every two elements in the two sets belong to the same target by calculating the intersection and union ratio of the two elements for the first set and the second set, and performing target deduplication according to the determination result to obtain the final target detection result includes: For each calculated intersection-and-union ratio, determine whether the intersection-and-union ratio is greater than a preset intersection-and-union ratio threshold. If yes, it is determined that the two elements of the intersection-and-union ratio are the same target, and the detection result with a higher confidence in the initial target detection results of the infrared image to be tested and the visible light image to be tested is determined as the detection result corresponding to the intersection-and-union ratio; If not, it is determined that the two elements for calculating the intersection-and-union ratio do not belong to the same target, and the detection results in the initial target detection results of the infrared image to be tested and the visible light image to be tested are both determined as the detection results corresponding to the intersection-and-union ratio; The final target detection result is obtained by calculating the detection results corresponding to all intersection-over-union ratios.