Gating image-based target detection method

By performing histogram equalization processing on the gated image and using multi-scale layers and hole spatial convolution pooling pyramids in the Yolov5 network, combined with the CBAM attention module, the problem of low target detection accuracy in the dark light environment of the gated image is solved. problem, achieving higher detection accuracy.

CN118537535AInactive Publication Date: 2024-08-23ADVANCED TECH ACHIEVEMENTS WESTERN (MIANYANG) TRANSFORMATION CENT (MIANYANG SCI & TECH CITY ADVANCED TECH RES INST)
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410605499.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-15
Publication Date
2024-08-23
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The target detection accuracy of gated images is low in dark light environments, and the lack of color information results in low contrast, making it difficult to perform effective target detection.

Method used

The gated image in the dark light environment is obtained through the gated camera for histogram equalization processing, and is input into the improved Yolov5 network. The multi-scale layer is used to replace the Focus layer, and the hole space convolution pooling pyramid and CBAM attention are added. Force module to extract multi-scale features and improve detection accuracy.

Benefits of technology

Compared with traditional methods, the improved detection algorithm improves the average accuracy of target detection in gated images by 8%, 2.5%, 5.2%, and 3.7% in dark light environments, significantly improving detection accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118537535A
    Figure CN118537535A
Patent Text Reader

Abstract

A target detection method based on a gating image comprises the following steps: 1) acquiring the gating image in a dark light environment through a gating camera, and enhancing the image through histogram equalization; 2) inputting an image into the improved Yolov5 network, and detecting and identifying a target; the improved Yolov5 network is characterized in that a Focus layer of the Yolov5 network is replaced by a multi-scale layer; adding a cavity space convolution pooling pyramid on a PAN layer in a Neck layer of the Yolov5 network to realize multi-scale feature extraction, and adding a CBAM attention module in front of a detection head; the image processing method comprises the following steps of: 2.1) inputting a gated image into a Backbone to carry out feature extraction; 2.2) after feature extraction of Backbone, the extracted features are input into a Neck network for multi-scale fusion; and 2.3) finally, inputting the three features with different sizes into a Head network to generate a prediction frame.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for detecting targets in a strobed image, which mainly uses deep learning technology to detect and identify targets in a strobed image. Background Art

[0002] In recent years, gated images have gradually become a hot topic of research due to their advantages such as being able to selectively process according to specific task requirements, providing rich information for feature extraction, and achieving real-time and dynamic processing. Object detection methods based on gated images have unique advantages in object detection. Since gated images have depth information, object detection methods based on gated images can use richer spatial features to detect objects.

[0003] For example, the patent application with the publication number CN112862740A discloses a target detection method, the steps of which are as follows: S1, fuse multiple frames of images without targets to obtain a base plate image; S2, collect video images taken by a camera; S3, select the target video image, crop it, and obtain the target area image; S4, pre-process the target area image to obtain a processed target area image; S5, select two processed target area images with a time interval, fuse them with the base plate image respectively, and obtain a fused target area image; S6, compare the two fused target area images; S7, determine whether a target exists based on the comparison result. Its technical feature is that by re-fusing two processed target area images with a time interval with the base plate image respectively, and comparing the two re-fused images, it is determined whether a target exists.

[0004] At present, the target detection technology for gated images is mainly based on multi-sensors and machine learning. However, ordinary cameras fail in dark environments, and sensors such as lidar and millimeter-wave radar are prone to failure in detecting distant targets, while range gating technology can make up for these shortcomings. Therefore, combining range-gated images for target detection can enhance the accuracy of target detection in dark environments, which is of great help to the fields of intelligent monitoring, robot vision, face recognition, intelligent transportation systems, etc., and has significant social value, economic value and academic value.

[0005] A gated camera is a camera that uses filters or beam splitters to select specific wavelengths for imaging. The basic principle is to convert dense wavelengths into wide bands through filters, and then select the required wavelengths for imaging. A gated camera can achieve efficient image capture, but the disadvantage is that it cannot provide color information. Compared with normal RGB images, gated images are grayscale images with lower resolution. Due to the lack of color information, their contrast is lower, so it is more difficult to detect targets. Summary of the invention

[0006] In order to solve the problems existing in the prior art, the present invention proposes a target detection method based on a gated image, the steps comprising:

[0007] 1) Obtain a gated image in a dark environment through a gated camera and enhance the image through histogram equalization;

[0008] 2) Inputting the strobed image processed in step 1) into the improved Yolov5 network to detect and identify the target;

[0009] The improvement method of Yolov5 network is as follows: replace the Focus layer of Yolov5 network with a multi-scale layer; add a dilated spatial convolutional pooling pyramid to the PAN layer in the Neck layer of Yolov5 network to realize multi-scale feature extraction, and add a CBAM attention module before the detection head;

[0010] Compared with common image recognition technology, this method pays more attention to image features. By improving the Yolov5 algorithm and using it for gated image target detection, the detection accuracy of the detection algorithm based on the gated image is improved.

[0011] The classic Yolov5 Focus layer segments the image and converts spatial information into non-qualitative features. Although this is a fast operation and greatly reduces the inference time to fully utilize GPU operations, it was created to convert spatial information into depth information by simply stacking a quarter of the image, and cannot correctly represent tiny spatial features. A good way to enhance tiny spatial features is to use multi-scale convolution operations. The present invention replaces the Focus layer of Yolov5 with a multi-scale layer.

[0012] The classic Yolov5 adopts the pyramid structure of FPN+PAN in the Neck layer. The FPN layer conveys strong semantic features from top to bottom, and the PAN conveys positioning features from bottom to top. On this basis, the present invention adds a dilated spatial convolutional pooling pyramid to the PAN layer to achieve multi-scale feature extraction, and adds a CBAM attention module before the detection head; allowing the network to generate multi-scale and more discriminative features, reduce the impact of noise interference, and improve the detection performance of the model.

[0013] Through simulation, compared with SSD, R-CNN, Yolov4, Yolov5 and other methods, the average accuracy of target detection in strobed images in dark environments using this method is improved by 8%, 2.5%, 5.2% and 3.7% respectively. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION

[0015] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments.

[0016] refer to Figure 1 ,The target detection method based on gated images in this example includes the following steps:

[0017] 1) Obtain a gated image through a gated camera and enhance the image through histogram equalization.

[0018] 2) Input the gated image into the improved Yolov5 network.

[0019] 3) The dataset obtained using the gated camera is trained in the improved Yolov5 network.

[0020] 4) Network parameters: Adam optimizer, Ir = 1e-4, weight dacy = 5e-3

[0021] 5) Loss function:

[0022]

[0023] Among them, K, S 2 , B represents the number of output feature maps, predicted boxes and predefined box sets, α * is the corresponding item weight; t p , t gt Represent the prediction vector and the ground-truth vector respectively; Represents the weight used to balance the output feature maps of each scale; Represents whether the k-th output feature map, the i-th predicted box, and the j-th predefined box are positive samples. If they are positive samples, it is 1, otherwise it is 0.

[0024] 6) Evaluation indicators:

[0025]

[0026]

[0027]

[0028]

[0029] TP: True Positive is the number of true positives that are judged correctly.

[0030] TN: The number of True Negatives judged as false and the number of True Negatives judged as correct.

[0031] FP: False Positive is the number of items that are judged as true but wrong.

[0032] FN: False Negative is judged as false and the number of incorrect judgments.

[0033] Specifically:

[0034] In step 1), the steps of enhancing the image by histogram equalization are:

[0035] 1.1) Calculate the histogram of the gated image, that is, count the number of each pixel value;

[0036] 1.2) Calculate the cumulative distribution function CDF of each pixel value in the histogram;

[0037] 1.3) Calculate the new mapping value of each pixel value according to CDF;

[0038] 1.4) Replace the value of each pixel with the new mapping value to generate an equalized image.

[0039] In step 2), the improvement method of the Yolov5 network is: replace the Focus layer of the Yolov5 network with a multi-scale layer; add a dilated spatial convolutional pooling pyramid to the PAN layer in the Neck layer of the Yolov5 network to realize multi-scale feature extraction, and add a CBAM attention module before the detection head;

[0040] The image processing steps in the improved Yolov5 network are:

[0041] 2.1) Input the strobed image into Backbone for feature extraction;

[0042] In the original Yolov5 Backbone,

[0043] First, the image is sliced ​​through the Focus layer;

[0044] Then, the features of the image are extracted through the superimposed convolutional network and residual network;

[0045] In order to better meet the relevant characteristics of the gated image, the Focus layer is replaced by a multi-scale feature extraction module. This module generates three images of different scales by interpolation of the gated image. Each scale image is subjected to the initial module structure proposed in ENet and multiple convolutional layers for feature fusion and extraction. Finally, the features obtained from the three different scale images are spliced ​​together as output.

[0046] 2.2) After feature extraction by Backbone, the extracted features are input into the Neck network for multi-scale fusion;

[0047] In the Neck network, the features obtained in the Backbone are converted into different sizes through upsampling and downsampling, and then fused. Finally, three different sizes of fused features are input into the Head network. However, there will be some noise in these features, which will affect the final detection accuracy. In order to make the features of each scale more obvious, the improved method uses CBAM to enhance the features of each different size to be input into the Head.

[0048] 2.3) Finally, the three features of different sizes are input into the Head network to generate the prediction box.

[0049] In step 3), a gated image obtained by a gated camera is used as a data set after being enhanced by histogram equalization; the data set is labeled; the data set is divided into a training set and a validation set; and the training set is used for training in an improved Yolov5 network.

Claims

1. A target detection method based on a strobed image, comprising the steps of: 1) Obtain a gated image in a dark environment through a gated camera and enhance the image through histogram equalization; 2) Inputting the strobed image processed in step 1) into the improved Yolov5 network to detect and identify the target; The improvement method of Yolov5 network is as follows: replace the Focus layer of Yolov5 network with a multi-scale layer; add a dilated spatial convolutional pooling pyramid to the PAN layer in the Neck layer of Yolov5 network to realize multi-scale feature extraction, and add a CBAM attention module before the detection head; The image processing steps in the improved Yolov5 network are: 2.1) Input the strobed image into Backbone for feature extraction; In the original Yolov5 Backbone, First, the image is sliced ​​through the Focus layer; Then, the features of the image are extracted through the superimposed convolutional network and residual network; In order to better meet the relevant characteristics of the gated image, the Focus layer is replaced by a multi-scale feature extraction module. This module generates three images of different scales by interpolation of the gated image. Each scale image is subjected to the initial module structure proposed in ENet and multiple convolutional layers for feature fusion and extraction. Finally, the features obtained from the three different scale images are spliced ​​together as output. 2.2) After feature extraction by Backbone, the extracted features are input into the Neck network for multi-scale fusion; In the Neck network, the features obtained in the Backbone are converted into different sizes through upsampling and downsampling, and then fused. Finally, three different sizes of fused features are input into the Head network. However, there will be some noise in these features, which will affect the final detection accuracy. In order to make the features of each scale more obvious, the improved method uses CBAM to enhance the features of each different size to be input into the Head. 2.3) Finally, the three features of different sizes are input into the Head network to generate the prediction box.

2. The target detection method based on gated images according to claim 1, characterized in that In step 1), the steps of enhancing the image by histogram equalization are: 1.1) Calculate the histogram of the gated image, that is, count the number of each pixel value; 1.2) Calculate the cumulative distribution function CDF of each pixel value in the histogram; 1.3) Calculate the new mapping value of each pixel value according to CDF; 1.4) Replace the value of each pixel with the new mapping value to generate an equalized image.

3. The target detection method based on gated images according to claim 1 is characterized in that The training optimization method of the improved Yolov5 network is as follows: the gated image obtained by the gated camera is used as the data set after being enhanced by histogram equalization; Annotate the dataset; The data set is divided into training set, validation set and test set; the training set and validation set are used to train in the improved Yolov5 network, where: The optimizer is Adam optimizer; learning rate Ir = 1e-4; weight decay weight dacy = 5e-3; loss function L v5 (t p , t gt )for: Among them, K, S 2 , B represents the number of output feature maps, predicted boxes and predefined box sets, α * is the corresponding item weight; t p , t gt Represent the prediction vector and the ground-truth vector respectively; Represents the weight used to balance the output feature maps of each scale; Represents whether the k-th output feature map, the i-th predicted box, and the j-th predefined box are positive samples. If they are positive samples, it is 1, otherwise it is 0.

Citation Information

Patent Citations

  • Wind turbine generator blade unmanned aerial vehicle inspection defect detection method and device and storage medium

    CN113822844A

  • Infrared image pedestrian detection method

    CN116977917A

  • Gesture recognition method based on improved YOLOv5

    CN117238024A

  • Multi-task hybrid supervised medical image segmentation method and system based on federated learning

    JP7386370B1