Multi-target detection method, device, computer equipment, vehicle and storage medium

By dynamically adjusting the size of the anchor frame during target detection to adapt to the size of the target to be detected, it solves the detection accuracy and efficiency problems caused by improper anchor frame size settings in driving scenarios, achieving more efficient and accurate target detection.

CN111985267BActive Publication Date: 2024-09-27CHANGSHA INTELLIGENT DRIVING INST CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910425320.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-05-21
Publication Date
2024-09-27
Estimated Expiration
2039-05-21

AI Technical Summary

Technical Problem

In driving scenarios, target detection methods based on deep learning have improperly set anchor box sizes, which results in the intersection ratio between the real target and the anchor box being too small, making it difficult to classify and regress correctly, affecting the detection accuracy, and setting more anchor boxes will cause It wastes computing resources and takes a long time, reducing detection efficiency.

Method used

By obtaining the characteristic image of the target scene, use the trained neural network to obtain the bounding box size at the target position coordinates, determine the corresponding anchor box size based on this size, and dynamically adjust the anchor box size to adapt to the size of the target to be detected, reducing Fitting difficulty and saving computing resources.

Benefits of technology

It improves the accuracy and efficiency of target detection, reduces the complexity of anchor frame settings and waste of computing resources, and enhances the accuracy of detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111985267B
    Figure CN111985267B
Patent Text Reader

Abstract

The disclosed embodiment discloses a method for detecting multiple targets in a target scene, including: obtaining a feature image in the target scene, the feature image containing at least one target to be detected; processing the feature image based on a trained first neural network to obtain the size of a bounding box at the target position coordinates, and determining the size of anchors corresponding to the feature image at the target position coordinates according to the size of the bounding box; wherein the training samples of the first neural network include the position coordinates of the at least one target to be detected in the feature image in the target scene and the size of the bounding box corresponding to the position coordinates. The disclosed embodiment further discloses a device for detecting multiple targets in a target scene, a computer device, a vehicle, and a storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of target detection, and in particular to a method, device, intelligent driving vehicle and storage medium for multi-target detection in a target scene. Background Art

[0002] At present, in the process of object detection, deep learning-based target detection methods mostly need to use a prior box, also known as an anchor box (anchors), in order to more accurately determine the location and category of the real target. The size setting of anchors has a great impact on the target detection performance. Usually, in order to take into account all positions of the image, the usual target detection algorithm will set fixed anchors and evenly distribute the fixed anchors on the entire image to cover all possible targets.

[0003] However, for targets in driving scenes, such as vehicles and pedestrians, according to the imaging principle of the camera, the targets will show the characteristics of "larger near and smaller far away". In this case, the above anchors setting is difficult to match all targets well, resulting in the intersection of the real target and the anchors being too small during network training, making it difficult for the network to correctly classify and regress the target, affecting the accuracy of target detection. If more anchors are set, most of the anchors will be discarded because few of them can match the real target, wasting computing resources and taking a long time, resulting in low detection efficiency. Summary of the invention

[0004] To solve the existing technical problems, the embodiments of the present disclosure provide an efficient and accurate multi-target detection method and device in a target scene, a multi-target detection method in a driving scene, an intelligent driving vehicle and a storage medium.

[0005] To achieve the above objectives, the technical solution of the embodiment of the present disclosure is implemented as follows:

[0006] In a first aspect, an embodiment of the present disclosure provides a method for multi-target detection in a target scene, the method comprising: acquiring a feature image in the target scene, the feature image comprising at least one target to be detected; processing the feature image based on a trained first neural network to obtain the size of a bounding box at the target position coordinates, and determining the size of anchors corresponding to the feature image at the target position coordinates according to the size of the bounding box; wherein the training samples of the first neural network include the position coordinates of the at least one target to be detected in the target scene in the feature image and the size of the bounding box corresponding to the position coordinates.

[0007] The method further includes: using the size of the anchors as the anchor setting parameters corresponding to the target detection network at the target position coordinates, extracting the image features corresponding to the anchors based on the trained target detection network for detection, and obtaining the category and position of the at least one target to be detected corresponding to the anchors.

[0008] Among them, the obtaining of the size of the bounding box at the target position coordinates and determining the size of the anchors corresponding to the feature image at the target position coordinates according to the size of the bounding box include: obtaining the size of the bounding box of the feature image at the target position coordinates; multiplying the size of the bounding box by the scaling factor corresponding to the feature layer to obtain the size of the anchors corresponding to the feature image at the target position coordinates.

[0009] Before the feature image is processed based on the trained first neural network, the method further includes: obtaining a first training sample; wherein the first training sample includes a sample image collected under the target scene and bounding box annotations of targets at different positions contained in the sample image, and the bounding box annotations are obtained by annotating the position coordinates and size of the bounding box; the first training sample is input into the initial first neural network model for iterative training until the first loss function of the neural network model meets the convergence condition, thereby obtaining the trained first neural network.

[0010] The enclosing box annotation is obtained by annotating the position coordinates and size of the enclosing box, including: annotating the center coordinates, width size and height size of the enclosing box to obtain the enclosing box annotation.

[0011] Among them, the step of inputting the first training sample into the initial first neural network model for iterative training until the first loss function of the neural network model meets the convergence condition comprises: inputting the first training sample into the initial first neural network model for iterative training until the mean square error between the predicted value of the size of the anchors corresponding to the target position coordinates of the sample image output by the neural network model and the true value is within a set threshold range, and the first loss function meets the convergence condition.

[0012] In a second aspect, the embodiment of the present disclosure further provides a multi-target detection device in a target scene, the device comprising an acquisition module and a processing module, wherein:

[0013] The acquisition module is used to acquire a feature image in a target scene, wherein the feature image includes at least one target to be detected;

[0014] The processing module is used to process the feature image based on the trained first neural network to obtain the size of the bounding box at the target position coordinates, and determine the size of the anchors corresponding to the feature image at the target position coordinates according to the size of the bounding box; wherein the training samples of the first neural network include the position coordinates of the at least one target to be detected in the feature image under the target scene and the corresponding bounding box size.

[0015] In a third aspect, an embodiment of the present disclosure further provides a computer device, comprising: a processor and a memory for storing a computer program that can be run on the processor; wherein, when the processor is used to run the computer program, the multi-target detection method in a target scenario described in any embodiment of the present disclosure is implemented.

[0016] In a fourth aspect, an embodiment of the present disclosure further provides an intelligent driving vehicle, comprising: a processor and a memory for storing a computer program that can be run on the processor; wherein, when the processor is used to run the computer program, the multi-target detection method in a target scenario as described in any embodiment of the present disclosure is implemented.

[0017] In a fifth aspect, an embodiment of the present disclosure further provides a storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method for detecting multiple targets in a target scenario as described in any embodiment of the present disclosure is implemented, or when executed, the method for detecting multiple targets in a target scenario as described in any embodiment of the present disclosure is implemented.

[0018] In the embodiment of the present disclosure, a feature image of a target scene is obtained, wherein the feature image includes at least one target to be detected; the size of the detected target included in the feature image corresponding to the target scene is regularly distributed in the feature image; the feature image is processed based on a trained first neural network to obtain the size of an enclosing box at the target position coordinates, and the size of the anchors corresponding to the feature image at the target position coordinates is determined according to the size of the enclosing box; wherein the training sample of the first neural network includes the position coordinates of the at least one target to be detected in the feature image of the target scene and the size of the enclosing box corresponding to the position coordinates, and here, based on the trained first neural network The network processes the feature image to obtain the size of the bounding box at the target position coordinates, that is, predicts the size of the bounding box at the target position coordinates, and then determines the size of the anchors corresponding to the feature image at the target position coordinates based on the size of the bounding box, that is, determines the size of the anchors of the size adapted to the feature image at the target position coordinates. Since the accurate size of the anchors can be obtained according to the position of the target to be detected, there is no need to set a large number of fixed-size anchors at different positions in advance. The size of the anchors will be adapted to the size of the target to be detected, which can reduce the difficulty of fitting, save computing resources, and make the detection result more accurate. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 A schematic diagram of a flow chart of a multi-target detection method in a target scene provided by an embodiment of the present disclosure;

[0020] Figure 2 A schematic diagram of processing a feature image corresponding to an intermediate result of a RefineDet network provided in an embodiment of the present disclosure;

[0021] Figure 3 A schematic diagram of a three-dimensional coordinate system established under a feature image provided by an embodiment of the present disclosure;

[0022] Figure 4 A schematic diagram of the distribution of position coordinates and sizes of a feature image in a three-dimensional coordinate system provided by an embodiment of the present disclosure;

[0023] Figure 5 A schematic diagram of the distribution of position coordinates and sizes of a feature image on the horizontal axis provided by an embodiment of the present disclosure;

[0024] Figure 6 A schematic diagram of the distribution of position coordinates and sizes of a feature image on the vertical axis provided by an embodiment of the present disclosure;

[0025] Figure 7A schematic diagram of a flow chart of a multi-target detection method in a target scene provided by another embodiment of the present disclosure;

[0026] Figure 8 A schematic diagram of a flow chart of a multi-target detection method in a target scene provided by another embodiment of the present disclosure;

[0027] Fig. 9 A schematic diagram of a flow chart of a multi-target detection method in a target scene provided by another embodiment of the present disclosure;

[0028] Fig.10 A schematic diagram of position coordinates provided for an embodiment of the present disclosure;

[0029] Fig.11 A schematic diagram of corresponding coordinates and sizes of a bounding box provided in an embodiment of the present disclosure;

[0030] Fig.12 A schematic diagram of the structure of a first neural network corresponding to a multi-target detection method in a target scene provided by an embodiment of the present disclosure;

[0031] Fig.13 A schematic diagram of the relationship between the position coordinates of a manually annotated reference frame and the area of ​​a bounding box provided in an embodiment of the present disclosure;

[0032] Fig.14 A schematic diagram of the relationship between position coordinates and the areas of anchors after applying a multi-target detection method in a target scene provided by an embodiment of the present disclosure;

[0033] Fig.15 A schematic diagram of the structure of a multi-target detection device in a target scene provided by an embodiment of the present disclosure;

[0034] Fig.16 A schematic diagram of the structure of another computer device provided in one embodiment of the present disclosure. DETAILED DESCRIPTION

[0035] The present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the embodiments provided herein are only used to explain the present disclosure and are not intended to limit the present disclosure. In addition, the embodiments provided below are partial embodiments for implementing the present disclosure, rather than providing all embodiments for implementing the present disclosure. In the absence of conflict, the technical solutions recorded in the embodiments of the present disclosure can be implemented in any combination.

[0036] It should be noted that, in the embodiments of the present disclosure, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a method or apparatus including a series of elements includes not only the elements explicitly recorded, but also includes other elements not explicitly listed, or also includes elements inherent to the implementation of the method or apparatus. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other related elements (such as steps in a method or units in a device, for example, a unit may be a portion of a circuit, a portion of a processor, a portion of a program or software, etc.) in the method or apparatus including the element.

[0037] Before further describing the embodiments of the present disclosure in detail, the nouns and terms involved in the embodiments of the present disclosure are described. The nouns and terms involved in the embodiments of the present disclosure are subject to the following interpretations.

[0038] 1) Intersection-over-Union (IoU), which refers to the overlap rate between two bounding boxes, that is, the ratio of their intersection to their union.

[0039] 2) Anchor box: It is a set of pre-set rectangular bounding boxes with different shapes and sizes.

[0040] 3) Target: In this article, it refers to the target used for classification, such as people and objects.

[0041] 4) Sample images, i.e. images including the imaging of the target, such as images in various digital formats such as JPEG.

[0042] 5) The loss function, also called the cost function, is the objective function of neural network optimization.

[0043] 6) Neural Networks (NN) is a complex network system formed by a large number of simple processing units (called neurons) that are widely interconnected. It reflects many basic characteristics of human brain functions and is a highly complex nonlinear dynamic learning system.

[0044] In order to facilitate the understanding of the embodiments of the present disclosure, an application scenario of an unmanned vehicle is used as an example for description:

[0045] An unmanned vehicle is a new type of intelligent car, which mainly uses vehicle-mounted terminal devices such as ECU (Electronic Control Unit) to accurately control and calculate and analyze various parts of the vehicle, thereby realizing the fully automatic operation of the vehicle and achieving the purpose of unmanned driving of the vehicle. Its control system mainly includes an electronic control unit, an image acquisition device and a control execution device. Among them, the image acquisition device is mainly used to collect pictures in the driver's field of view or in the field of view in front of the vehicle in the driving scene; the electronic control unit is mainly used to acquire the pictures, perform target detection on the pictures, and determine the specific location and category of the target in the pictures, thereby providing a basis for the control execution device to control the automatic driving of the vehicle.

[0046] See also Figure 1 , is a flow chart of a multi-target detection method in a target scene provided by an embodiment of the present disclosure, including:

[0047] Step 11, obtaining a feature image in a target scene, wherein the feature image includes at least one target to be detected;

[0048] Here, the target scene may be a scene with a specific imaging rule. For example, in a driving scene, according to the imaging principle of a camera, the target in a driving scene will show the rule of "larger near and smaller far away". The target to be detected may be a target in a feature image. Taking the feature image in a driving scene as an example, the target to be detected may be a vehicle, pedestrian, signboard, etc. in the feature image. Here, the target scene may refer to the difference in the shooting angle of the image within a set range. The difference in the shooting angle of the image may refer to the angular difference between the center line of the lens of the acquisition device corresponding to the feature image and the reference position. Here, the feature image may be the original image collected from the target scene, or it may be the feature image corresponding to each feature layer after intermediate processing of the original image collected from the target scene. For example, it may be the feature image corresponding to the intermediate feature layer after multiple convolution processes in the neural network algorithm. For explanation, please refer to the RefineDet network as an example. Figure 2 , which is a schematic diagram of processing a feature image corresponding to an intermediate result of a RefineDet network provided in an embodiment of the present disclosure. The feature image here may be a feature image 13 corresponding to the output of a convolutional layer of the RefineDet network, or a feature image 14 that is further processed from the feature image 13.

[0049] Step 12, processing the feature image based on the trained first neural network to obtain the size of the bounding box at the target position coordinates, and determining the size of the anchors corresponding to the feature image at the target position coordinates according to the size of the bounding box; wherein the training samples of the first neural network include the position coordinates of the at least one target to be detected in the feature image under the target scene and the size of the bounding box corresponding to the position coordinates.

[0050] Here, the feature image is processed based on the trained first neural network to obtain the size of the bounding box at the target position coordinates, and the size of the bounding box at the target position coordinates can be predicted. Then, the size of the anchors corresponding to the feature image at the target position coordinates is determined based on the size of the bounding box. Here, the size of the bounding box can be directly used as the size of the anchors, or the size of the bounding box can be multiplied by a scaling factor to obtain the size of the anchors. Specifically, it can be determined according to the scaling ratio of the feature image. For example, the feature image is scaled relative to the original image, and the size of the anchors can be obtained by multiplying the size of the bounding box by the corresponding scaling factor. Here, the training sample may include a feature image, and the correspondence between the position coordinates of the target to be detected in the feature image and the size of the bounding box may be a linear or nonlinear relationship, and the specific relationship is related to the target scene. The correspondence may be a functional relationship with the center position coordinates of the bounding box in the feature image as input variables and the size of the bounding box as output variables. The center position coordinates may correspond to the position coordinates of any pixel point in the feature image, and the functional relationship may be obtained by fitting the input and output corresponding to the sample data. Here, the first neural network is trained based on the training sample, and the training sample data can be fitted, and the size of the corresponding anchors can be predicted by determining the size of the bounding box at the target position coordinates.

[0051] Here, we take the feature image in the driving scene as an example to illustrate the relationship between the position coordinates in the feature image and the size of the bounding box corresponding to the position coordinates. Figure 3 , is a schematic diagram of a three-dimensional coordinate system established under a feature image provided by an embodiment of the present disclosure, wherein the center coordinates of the bounding box represent the coordinates of the position of the bounding box, and the center coordinates of the bounding box correspond to the plane coordinates (x, y). In the image coordinate system, the three-dimensional coordinate system is established with the area (size) corresponding to the size of the bounding box as the z-axis; see Figure 4 , which is a schematic diagram of the distribution of position coordinates and sizes of a feature image in a three-dimensional coordinate system provided by an embodiment of the present disclosure, and shows the area distribution corresponding to the size of the bounding box at different position coordinates in the feature image. Figure 3 , Figure 4 It can be seen that there is a corresponding relationship between the area corresponding to the size of the bounding box and the coordinates of its location. Figure 5 , is a schematic diagram of the distribution of the position coordinates of the feature image on the horizontal axis and the size of the bounding box provided by an embodiment of the present disclosure. The size of the bounding box is symmetrically distributed relative to the horizontal axis and is the smallest at the center of the horizontal axis. The road vanishing point is usually located at the center of the horizontal axis of the image. Figure 6 , which is a schematic diagram of the distribution of the position coordinates and size of the feature image on the vertical axis provided by an embodiment of the present disclosure. The size of the bounding box first increases with the increase of the vertical coordinate, and then begins to decrease after reaching a certain level. This is because in the driving scene, small targets at a long distance are usually located on the upper side of the image, large targets at a closer distance are located in the lower middle side of the image, and the closest targets are usually on both sides of the current vehicle. These targets are located in the lower left and right corners of the image, and are likely to appear only partially in the image, so they are relatively small. Therefore, based on the relationship between the position coordinates of the bounding box and the size of the bounding box, in the first neural network algorithm model of target detection, after knowing the position coordinates of the bounding box, based on the data fitting relationship between the position coordinates and the size of the bounding box, the size of the bounding box can be quickly determined, and the size of the anchors at the corresponding position can be determined based on the size of the bounding box, and the size of the anchors can be used as the setting parameter of the anchors and applied to the target detection neural network. Compared with the traditional method of pre-setting fixed-size anchors, it can reduce the fitting difficulty of the detection network, greatly save computing resources, and improve detection accuracy. Here, since the size of the bounding box is nonlinearly related to the x and y corresponding to the position coordinates, it is a multivariate nonlinear fitting problem, and the neural network has unique advantages in complex nonlinear problems. Therefore, as an embodiment, the neural network regression method can be used to Figure 4In the disclosed embodiment, a feature image of a target scene is obtained, the feature image includes at least one target to be detected; the size of the detected target included in the feature image corresponding to the target scene is regularly distributed in the feature image; the feature image is processed based on the trained first neural network to obtain the size of the bounding box at the target position coordinates, and the size of the anchors corresponding to the feature image at the target position coordinates is determined according to the size of the bounding box; wherein the training samples of the first neural network include the position coordinates of the at least one target to be detected in the target scene in the feature image and the size of the bounding box corresponding to the position coordinates, and here, based on the trained first neural network The network processes the feature image to obtain the size of the bounding box at the target position coordinates, that is, predicts the size of the bounding box at the target position coordinates, and then determines the size of the anchors corresponding to the feature image at the target position coordinates based on the size of the bounding box, that is, determines the size of the anchors of the size adapted to the feature image at the target position coordinates. Since the accurate size of the anchors can be obtained according to the position of the target to be detected, there is no need to set a large number of fixed-size anchors at different positions in advance. The size of the anchors will be adapted to the size of the target to be detected, which can reduce the difficulty of fitting, save computing resources, and make the detection result more accurate.

[0052] See also Figure 7 , is a flow chart of a method for multi-target detection in a target scene provided by another embodiment of the present disclosure, the method further comprising:

[0053] Step 71, using the size of the anchors as the anchor setting parameters corresponding to the target position coordinates of the target detection network;

[0054] Here, the target detection network can be a target detection network based on deep learning, for example, a target detection network based on a convolutional neural network. The sizes of the anchors corresponding to the feature image at the target position coordinates determined by the first neural network are used as setting parameters of the target detection network anchors and the target detection network is trained. Here, since the setting parameters of the anchors are essentially generated based on the target position coordinates, their size is more easily adapted to the target to be detected appearing at the target position coordinates, reducing the difficulty of fitting.

[0055] Step 72: extract the image features corresponding to the anchors based on the trained target detection network to perform detection, and obtain the category and position of the at least one target to be detected corresponding to the anchors.

[0056] Here, the target detection network can be Faster Rcnn, SSD, R-FCN, RefineDet, etc. In the implementation process of the above existing algorithms, anchors are used and the anchor size needs to be parameterized.

[0057] See also Figure 8 , is a flow chart of a method for multi-target detection in a target scene provided by another embodiment of the present disclosure, wherein in step 12, the size of the bounding box at the target position coordinates is obtained, and the size of the anchors corresponding to the feature image at the target position coordinates is determined according to the size of the bounding box, including:

[0058] Step 81, obtaining the size of the bounding box of the feature image at the target position coordinates; here, the size of the bounding box is the size of the bounding box corresponding to the target position output by the first neural network.

[0059] Step 82 , multiplying the size of the bounding box by the scaling factor corresponding to the feature layer to obtain the size of the anchors corresponding to the feature image at the target position coordinates.

[0060] Here, the embodiment of the present disclosure takes the RefineDet network as an example for explanation. Figure 2 , the RefineDet network can include four feature layer structures. The original anchors size of the RefineDet network can be 4 fixed values ​​of 32, 64, 128, and 256. When the feature image is sent to the anchor frame optimization module, the length and width have been scaled to 1 / 8 of the original input image, and the area is scaled to 1 / 64. In the anchor frame optimization module, the feature image will continue to be scaled, and the areas of the four feature layers are scaled to 1 / 64, 1 / 256, 1 / 1024, and 1 / 4096 of the original input image, respectively. Therefore, the anchor setting parameters applied to the four feature layers after optimization can be the size prediction result of the bounding box in step 81 after exponential transformation and then multiplied by the corresponding area scaling factor.

[0061] See also Fig. 9 , which is a flow chart of a method for multi-target detection in a target scene provided by another embodiment of the present disclosure, before the feature image is processed based on the trained first neural network, it also includes:

[0062] Step 91, obtaining a first training sample; wherein the first training sample includes a sample image collected in the target scene and bounding box annotations of targets at different positions contained in the sample image, and the bounding box annotations are obtained by annotating the position coordinates and size of the bounding box;

[0063] Here, the sample image may be a picture taken of a target object whose category needs to be determined in a target scene. The target refers to the target object whose category needs to be determined, which may be a pedestrian, a vehicle, a sign, etc. The category of the target refers to the dimension in which the target object needs to be classified. In a specific embodiment, the sample image may also be collected from an image library currently available on the Internet, and the category of the target contained in the sample image may be clarified according to a predetermined category.

[0064] See also Fig.10 Here, the position coordinates of the bounding box 102 may be the coordinates corresponding to the center point 101 of the bounding box, and the size may be the width and height size, area, etc. of the bounding box 102; the position of the bounding box 102 may also be the position coordinates of the upper left corner of the bounding box 102; here, whether manual labeling or machine labeling is used, when labeling the bounding box 102, the intersection and union ratio of the target in the sample image and the bounding box 102 can be made within a set range.

[0065] Here, see Fig.11 , which is a schematic diagram of the corresponding coordinates and sizes of the bounding box provided in an embodiment of the present disclosure, the position may correspond to the coordinates (bx, by) of the center point 101 of the bounding box 102, the size may be the width size bw and the height size bh, and the output of the first neural network may include Y=(bw,bh) or s=bw×bh.

[0066] Step 92: input the first training sample into the initial first neural network model for iterative training until the first loss function of the neural network model meets the convergence condition, thereby obtaining the trained first neural network.

[0067] As an embodiment, inputting the first training sample into an initial first neural network model for iterative training until a first loss function of the neural network model satisfies a convergence condition includes:

[0068] The first training sample is input into the initial first neural network model for iterative training until the mean square error between the predicted value and the true value of the bounding box size corresponding to the target contained in the sample image output by the neural network model is within a set threshold range, and the first loss function satisfies the convergence condition.

[0069] See also Fig.12 , is a schematic diagram of the structure of a first neural network corresponding to a multi-target detection method in a target scene provided in an embodiment of the present disclosure, wherein the first neural network includes an input layer 121, a hidden layer 122 and an output layer 123, and the hidden layer includes 4 hidden layer nodes.

[0070] Here, the position coordinates will correspond to x and y, so the first neural network can set two input variables x and y, and the input layer can set two nodes. In order to prevent overfitting, the network parameters should be reduced as much as possible under the premise of achieving good fitting results. The present disclosure adopts a hidden layer, corresponding to 4 hidden layer nodes, and the hidden layer activation function uses a linear rectifier function (Rectified Linear Unit, ReLU). The output layer has only one variable, the anchor area Size, which is a regression problem. Therefore, the output layer does not use an activation function. Here, if the area of ​​the anchors is set to s, the mean square error is:

[0071]

[0072] See also Fig.13 , is a schematic diagram of the relationship between the position coordinates of the manually labeled reference frame and the area of ​​the bounding box provided by an embodiment of the present disclosure, wherein the area of ​​the bounding box is the area after taking the logarithm of the area of ​​the bounding box. The values ​​of the original bounding box sizes vary greatly and have poor stability. Without changing the relative relationship of the data, taking the logarithmic transformation can compress the scale differences between the variables, making fitting easier. Please refer to Fig.14 , which is a schematic diagram of the relationship between the position coordinates and the area of ​​the anchors after applying a multi-target detection method in a target scene provided by an embodiment of the present disclosure, compared with Fig.13 and Fig.14 It can be seen that the bounding box obtained by using the multi-target detection method in a target scene disclosed in the present invention is basically consistent with the manually annotated reference box, achieving good technical effects.

[0073] In the second aspect, the present disclosure also provides a multi-target detection device in a target scene, see Fig.15 , is a schematic diagram of the structure of a multi-target detection device in a target scene provided by an embodiment of the present disclosure, the device includes an acquisition module 151 and a processing module 152, wherein,

[0074] The acquisition module 151 is used to acquire a feature image in a target scene, wherein the feature image includes at least one target to be detected;

[0075] The processing module 152 is used to process the feature image based on the trained first neural network to obtain the size of the bounding box at the target position coordinates, and determine the size of the anchors corresponding to the feature image at the target position coordinates according to the size of the bounding box; wherein the training samples of the first neural network include the position coordinates of the at least one target to be detected in the feature image under the target scene and the size of the bounding box corresponding to the position coordinates.

[0076] In a third aspect, the present disclosure further provides a computer device, see Fig.16 , is a structural schematic diagram of a computer device provided by an embodiment of the present disclosure, comprising: a processor 162 and a memory 161 for storing a computer program that can be run on the processor 162; wherein the processor 162 is used to implement the following steps when running the computer program: acquiring a feature image in a target scene, wherein the feature image includes at least one target to be detected; processing the feature image based on a trained first neural network to obtain a bounding box size at the target position coordinates, and determining the size of anchors corresponding to the feature image at the target position coordinates according to the size of the bounding box; wherein the training samples of the first neural network include the position coordinates of the at least one target to be detected in the feature image in the target scene and the bounding box size corresponding to the position coordinates.

[0077] The processor 162 is also used to implement the following steps when running the computer program: using the size of the anchors as the anchor setting parameters corresponding to the target detection network at the target position coordinates; extracting the image features corresponding to the anchors based on the target detection network for detection, and obtaining the category and position of the at least one target to be detected corresponding to the anchors.

[0078] The processor 162 is also used to implement the following steps when running the computer program: obtaining the size of the anchors corresponding to the determined feature image at the target position coordinates; multiplying the size of the anchors by the scaling factor corresponding to the feature layer to obtain the anchors setting parameters corresponding to the target detection network at the target position coordinates.

[0079] The processor 162 is also used to implement the following steps when running the computer program: obtaining a first training sample; wherein the first training sample includes a sample image collected in the target scene and bounding box annotations of targets at different positions contained in the sample image, and the bounding box annotations are obtained by annotating the position coordinates and size of the bounding box; the first training sample is input into an initial first neural network model for iterative training until the first loss function of the neural network model meets the convergence condition, thereby obtaining the trained first neural network.

[0080] The processor 162 is further configured to implement the following steps when running the computer program: annotating the center coordinates, width and height of the bounding box to obtain the bounding box annotation.

[0081] In a fourth aspect, an embodiment of the present disclosure further provides an intelligent driving vehicle, comprising: a processor and a memory for storing a computer program that can be run on the processor; wherein, when the processor is used to run the computer program, the following steps are implemented: obtaining a feature image captured in a driving scene during driving of the vehicle, wherein the feature image contains at least one target to be detected; processing the feature image based on a trained first neural network to obtain the size of a bounding box at the target position coordinates, and determining the size of anchors corresponding to the feature image at the target position coordinates according to the size of the bounding box; wherein the training samples of the first neural network include the position coordinates of the at least one target to be detected in the feature image in the target scene and the size of the bounding box corresponding to the position coordinates.

[0082] In a fifth aspect, the present embodiment further provides a storage medium, wherein a computer storage medium stores a computer program, and when the computer program is executed by the processor 162, the computer program implements the multi-target detection method in a target scene as described in any embodiment of the present disclosure, and when the computer program is executed by the processor 162, the computer program implements the following steps: obtaining a feature image in the target scene, wherein the feature image contains at least one target to be detected; obtaining the size of a bounding box at the target position coordinates, and determining the size of anchors corresponding to the feature image at the target position coordinates according to the size of the bounding box, wherein the training samples of the first neural network include the position coordinates of at least one target to be detected in the target scene in the feature image and the size of the bounding box corresponding to the position coordinates.

[0083] The processor 162 is also used to implement the following steps when running the computer program: using the size of the anchors as the anchor setting parameters corresponding to the target detection network at the target position coordinates; extracting the image features corresponding to the anchors based on the target detection network for detection, and obtaining the category and position of the at least one target to be detected corresponding to the anchors.

[0084] The processor 162 is also used to implement the following steps when running the computer program: obtaining the size of the anchors corresponding to the determined feature image at the target position coordinates; multiplying the size of the anchors by the scaling factor corresponding to the feature layer to obtain the anchors setting parameters corresponding to the target detection network at the target position coordinates.

[0085] The processor 162 is also used to implement the following steps when running the computer program: obtaining a first training sample; wherein the first training sample includes a sample image collected in the target scene and bounding box annotations of targets at different positions contained in the sample image, and the bounding box annotations are obtained by annotating the position coordinates and size of the bounding box; the first training sample is input into an initial first neural network model for iterative training until the first loss function of the neural network model meets the convergence condition, thereby obtaining the trained first neural network.

[0086] The processor 162 is further configured to implement the following steps when running the computer program: annotating the center coordinates, width and height of the bounding box to obtain the bounding box annotation.

[0087] The processor 162 is also used to implement the following steps when running the computer program: input the first training sample into the initial first neural network model for iterative training until the mean square error between the size prediction value corresponding to the anchors of the target position coordinates of the sample image output by the neural network model and the true value is within a set threshold range, and the first loss function meets the convergence condition.

[0088] The above is only a preferred embodiment of the present disclosure and is not intended to limit the protection scope of the present disclosure. Any modifications, equivalent replacements and improvements made within the spirit and scope of the present disclosure are included in the protection scope of the present disclosure.

Claims

1. A multi-target detection method in a target scene, characterized in that: include: Acquire a feature image in a target scene, wherein the feature image includes at least one target to be detected; The feature image is processed based on the trained first neural network to obtain the size of the bounding box at the target position coordinates, and the size of the anchors corresponding to the feature image at the target position coordinates is determined according to the size of the bounding box; wherein the training samples of the first neural network include the position coordinates of at least one target to be detected in the feature image under the target scene and the size of the bounding box corresponding to the position coordinates.

2. The method for multi-target detection in target scene according to claim 1, characterized in that: Also includes: Using the size of the anchors as the anchor setting parameters corresponding to the target position coordinates of the target detection network; Based on the target detection network, image features corresponding to the anchors are extracted for detection to obtain the category and position of the at least one target to be detected corresponding to the anchors.

3. The method for multi-target detection in target scene according to claim 1, characterized in that: The obtaining the size of the bounding box at the target position coordinates, and determining the size of the anchors corresponding to the feature image at the target position coordinates according to the size of the bounding box, comprises: Obtaining the size of the bounding box of the feature image at the target position coordinates; The size of the bounding box is multiplied by the scaling factor corresponding to the feature layer to obtain the size of the anchors corresponding to the feature image at the target position coordinates.

4. The method for multi-target detection in target scene according to claim 1, characterized in that: Before the feature image is processed based on the trained first neural network, the method further includes: Acquire a first training sample; wherein the first training sample includes a sample image collected under the target scene and bounding box annotations of targets at different positions contained in the sample image, and the bounding box annotations are obtained by annotating the position coordinates and size of the bounding box; The first training sample is input into an initial first neural network model for iterative training until a first loss function of the neural network model meets a convergence condition, thereby obtaining the trained first neural network.

5. The method for multi-target detection in target scene according to claim 4, characterized in that: The bounding box annotation is obtained by annotating the position coordinates and size of the bounding box, including: annotating the center coordinates, width size and height size of the bounding box to obtain the bounding box annotation.

6. The method for multi-target detection in target scene according to claim 5, characterized in that: The step of inputting the first training sample into an initial first neural network model for iterative training until a first loss function of the neural network model satisfies a convergence condition includes: The first training sample is input into the initial first neural network model for iterative training until the mean square error between the predicted value of the anchors size corresponding to the target position coordinates of the sample image output by the neural network model and the true value is within a set threshold range, and the first loss function meets the convergence condition.

7. A multi-target detection device in a target scene, characterized in that: It includes an acquisition module and a processing module, wherein: The acquisition module is used to acquire a feature image in a target scene, wherein the feature image includes at least one target to be detected; The processing module is used to process the feature image based on the trained first neural network to obtain the size of the bounding box at the target position coordinates, and determine the size of the anchors corresponding to the feature image at the target position coordinates according to the size of the bounding box; wherein the training samples of the first neural network include the position coordinates of the at least one target to be detected in the feature image under the target scene and the size of the bounding box corresponding to the position coordinates.

8. A computer device, characterized in that: include: A processor and a memory for storing a computer program that can be run on the processor; wherein, when the processor is used to run the computer program, the multi-target detection method in a target scene described in any one of claims 1 to 6 is implemented.

9. An intelligent driving vehicle, characterized in that: include: A processor and a memory for storing a computer program that can be run on the processor; wherein, when the processor is used to run the computer program, the multi-target detection method in a target scene as described in any one of claims 1 to 6 is implemented.

10. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the multi-target detection method in a target scene according to any one of claims 1 to 6 is implemented.