Target detection method, device, computer equipment and readable storage medium

Through iterative fusion and adaptive distance calculation, the problem of poor accuracy of superpixel set fusion in traditional methods is solved, and the accuracy of object detection is improved, especially in scenarios with high complexity.

CN112348013BActive Publication Date: 2024-11-19刘丽
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202011163151.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-27
Publication Date
2024-11-19
Estimated Expiration
2040-10-27

AI Technical Summary

Technical Problem

In traditional object detection methods, there is poor fusion accuracy in calculating the distance of adjacent sets based on the average feature of superpixel sets, resulting in low accuracy in object detection. Especially in superpixel sets with high complexity, the features cannot be accurately characterized, resulting in malfunctions and Reduced accuracy.

Method used

By iteratively fusing multiple superpixel sets, the set distance is obtained based on the minimum distance between adjacent superpixels, combined with the graph features and edge loss distance, greedy algorithms are used to fuse, adaptively calculate the complexity distance, and improve the accuracy of feature similarity sex.

Benefits of technology

Improve the fusion accuracy of superpixel sets and enhance the accuracy of object detection. Especially in scenarios with high complexity, the drawbacks of average feature calculation are avoided and more accurate target candidate boxes are generated.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112348013B_ABST
    Figure CN112348013B_ABST
Patent Text Reader

Abstract

The present application relates to a target detection method, device, computer equipment and readable storage medium. The method includes: obtaining a target image, and according to the target image, obtaining multiple superpixel sets; the target image includes at least one target object, and the multiple superpixel sets are obtained by fusing multiple superpixels corresponding to the target image; iteratively fusing the multiple superpixel sets, and in the iterative process, based on the minimum superpixel distance between adjacent superpixel sets, obtaining the set distance between the corresponding adjacent superpixel sets, and fusing each adjacent superpixel set according to each set distance; the set distance is used to characterize the feature similarity between adjacent superpixel sets; multiple target candidate frames corresponding to the target object are determined from multiple initial candidate frames obtained from iterative fusion; multiple target candidate frames are used to determine the detection position frame of the target object in the target image. The use of this method can improve the fusion accuracy of superpixel sets and the accuracy of target detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a target detection method, device, computer equipment and readable storage medium. Background Art

[0002] Object detection is a popular direction in computer vision and digital image processing. It is widely used in many fields such as robot navigation, intelligent video surveillance, industrial inspection, aerospace, etc. It has important practical significance to reduce the consumption of human capital through computer vision.

[0003] Extracting candidate boxes corresponding to the target object from the image is essential in the target detection process. The position box of the target object in the image can be determined based on multiple candidate boxes corresponding to the target object. In traditional target detection methods, after obtaining a superpixel set based on the image, the average feature in the superpixel set is used as the feature characterizing the set, and the average feature is used to calculate the set distance of adjacent superpixel sets to fuse the superpixel sets. For example, taking color features as an example, for each superpixel set, the average color in the superpixel set is used as the feature of the superpixel set.

[0004] However, the above-mentioned traditional target detection method calculates the set distance of adjacent superpixel sets by averaging the features of each superpixel set, which often results in poor fusion accuracy of superpixel sets, leading to poor target detection accuracy. Summary of the invention

[0005] Based on this, it is necessary to provide a target detection method, device, computer equipment and readable storage medium that can improve the fusion accuracy of superpixel sets and thus improve the accuracy of target detection in response to the above technical problems.

[0006] In a first aspect, an embodiment of the present application provides a target detection method, the method comprising:

[0007] Acquire a target image, and acquire a plurality of superpixel sets according to the target image; the target image includes at least one target object, and the plurality of superpixel sets are obtained by fusing a plurality of superpixels corresponding to the target image;

[0008] Iteratively fuse the multiple superpixel sets, and in each iteration process, based on the minimum superpixel distance between adjacent superpixel sets, obtain the set distance between corresponding adjacent superpixel sets, and fuse each adjacent superpixel set according to each set distance; the set distance is used to characterize the feature similarity between the adjacent superpixel sets;

[0009] A plurality of target candidate frames corresponding to the target object are determined from a plurality of initial candidate frames obtained by iterative fusion; the plurality of target candidate frames are used to determine a detection position frame of the target object in the target image.

[0010] In one embodiment, obtaining the set distance between corresponding adjacent superpixel sets based on the minimum superpixel distance between adjacent superpixel sets includes:

[0011] Get the maximum superpixel distance between adjacent superpixel sets;

[0012] Based on the minimum superpixel distance between adjacent superpixel sets, a high complexity distance between corresponding adjacent superpixel sets is obtained, and based on the maximum superpixel distance between adjacent superpixel sets, a low complexity distance between corresponding adjacent superpixel sets is obtained;

[0013] According to the low complexity distance, high complexity distance and preset weight constraint parameters between adjacent superpixel sets, the set distance between corresponding adjacent superpixel sets is obtained;

[0014] Among them, the low complexity distance is used to characterize the feature similarity between adjacent superpixel sets when the feature complexity of the superpixel set is low complexity; the high complexity distance is used to characterize the feature similarity between adjacent superpixel sets when the feature complexity of the superpixel set is high complexity.

[0015] In one embodiment, the method further comprises:

[0016] Obtaining the color and material feature distances between the superpixels in the plurality of superpixels corresponding to the target image; the color and material feature distances are used to characterize the feature similarity of the color features and the material features between a pair of superpixels;

[0017] The minimum color material feature distance in the adjacent superpixel set is determined as the minimum superpixel distance between the corresponding adjacent superpixel sets, and the maximum color material feature distance in the adjacent superpixel set is determined as the maximum superpixel distance between the corresponding adjacent superpixel sets.

[0018] In one embodiment, the step of obtaining the high complexity distance between the corresponding adjacent superpixel sets based on the minimum superpixel distance between the adjacent superpixel sets, and obtaining the low complexity distance between the corresponding adjacent superpixel sets based on the maximum superpixel distance between the adjacent superpixel sets, comprises:

[0019] Obtaining a graph feature distance and an edge loss distance between adjacent superpixel sets; the graph feature distance represents the distance between the closest superpixels in the adjacent superpixel sets, and the edge loss distance is obtained based on an edge response map corresponding to the target image;

[0020] According to the minimum superpixel distance and graph feature distance between adjacent superpixel sets, the high-complexity distance between corresponding adjacent superpixel sets is calculated;

[0021] According to the maximum superpixel distance, graph feature distance and edge loss distance between adjacent superpixel sets, the low-complexity distance between corresponding adjacent superpixel sets is calculated.

[0022] In one embodiment, obtaining the graph feature distance and edge loss distance between adjacent superpixel sets includes:

[0023] According to the edge response map corresponding to the target image, an edge loss value between a pair of superpixels in an adjacent superpixel set is calculated, and an edge loss distance between corresponding adjacent superpixel sets is calculated according to each edge loss value corresponding to the adjacent superpixel set;

[0024] Each superpixel corresponding to the target image is taken as a node to construct a connection graph, and the shortest path algorithm is used to obtain the superpixel graph distance between adjacent superpixels, and the graph feature distance between corresponding adjacent superpixel sets is calculated based on the superpixel graph distances corresponding to the adjacent superpixel sets.

[0025] In one embodiment, acquiring a plurality of superpixel sets according to the target image includes:

[0026] Performing superpixel segmentation on the target image to obtain the multiple superpixels corresponding to the target image;

[0027] Calculate the color material feature distance, superpixel map distance and edge loss value between adjacent superpixels;

[0028] A greedy algorithm is adopted to fuse the multiple superpixels according to the color material feature distance, superpixel map distance and edge loss value between adjacent superpixels to obtain the multiple superpixel sets.

[0029] In one of the embodiments, determining multiple target candidate frames corresponding to the target object from multiple initial candidate frames obtained by iterative fusion includes:

[0030] Calculate the evaluation score corresponding to each of the initial candidate boxes according to the edge loss values ​​corresponding to the superpixels included in each of the initial candidate boxes;

[0031] Sorting the evaluation scores corresponding to the initial candidate boxes in order of the scores, and determining a plurality of target evaluation scores from the sorting results;

[0032] The initial candidate boxes corresponding to the target evaluation scores are determined as the target candidate boxes.

[0033] In a second aspect, an embodiment of the present application provides a target detection device, the device comprising:

[0034] A first acquisition module is used to acquire a target image, and acquire a plurality of superpixel sets according to the target image; the target image includes at least one target object, and the plurality of superpixel sets are obtained by fusing a plurality of superpixels corresponding to the target image;

[0035] A fusion module, used for iteratively fusing the plurality of superpixel sets, obtaining the set distances between the corresponding adjacent superpixel sets based on the minimum superpixel distance between the adjacent superpixel sets in each iteration, and fusing the adjacent superpixel sets according to the set distances; the set distances are used to characterize the feature similarity between the adjacent superpixel sets;

[0036] The first determination module is used to determine multiple target candidate frames corresponding to the target object from multiple initial candidate frames obtained by iterative fusion; the multiple target candidate frames are used to determine the detection position frame of the target object in the target image.

[0037] In a third aspect, an embodiment of the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method of the first aspect when executing the computer program.

[0038] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method of the first aspect described above.

[0039] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:

[0040] In traditional technology, the average feature of a superpixel set is used as the feature to characterize the set. If the complexity of the detected object is high, for example, a superpixel set includes multiple regions with completely different colors, then the average color of the superpixel set cannot accurately characterize the regional properties of the superpixel set, that is, it cannot accurately characterize the actual features of the superpixel set. Therefore, the set distance between adjacent superpixel sets is calculated based on the average color of the adjacent superpixel sets. The obtained set distance may be far from the actual feature similarity between adjacent superpixel sets, which will lead to the mis-fusion of adjacent superpixel sets and poor fusion accuracy, thereby affecting the accuracy of target detection.

[0041] In an embodiment of the present application, a target image is acquired, and based on the target image, multiple superpixel sets are acquired, and then the multiple superpixel sets are iteratively fused. In each iteration, based on the minimum superpixel distance between adjacent superpixel sets, the set distance between corresponding adjacent superpixel sets is acquired, and each adjacent superpixel set is fused according to each set distance, and the set distance is used to characterize the feature similarity between adjacent superpixel sets; multiple target candidate frames corresponding to the target object are determined from multiple initial candidate frames obtained from the iterative fusion; and the multiple target candidate frames are used to determine the detection position frame of the target object in the target image. Therefore, the minimum superpixel distance between adjacent superpixel sets represents the feature similarity of the most similar parts between adjacent superpixel sets. If the minimum superpixel distance is large, it represents that there are no similar parts between adjacent superpixel sets. If the minimum superpixel distance is small, it represents that there are similar parts between adjacent superpixel sets. Therefore, the minimum superpixel distance can accurately measure whether there are actually similar parts between adjacent superpixel sets. The set distance is obtained based on the minimum superpixel distance between adjacent superpixel sets, thereby improving the accuracy of the feature similarity between the adjacent superpixel sets, which is beneficial to the accurate fusion of superpixel sets, thereby improving the accuracy of target detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 Schematic diagram of a target detection method in one embodiment;

[0043] Figure 2 It is a schematic diagram of some detailed steps of step S200 in another embodiment;

[0044] Figure 3 A schematic diagram of a process for a computer device to obtain a minimum superpixel distance and a maximum superpixel distance between adjacent superpixel sets in another embodiment;

[0045] Figure 4 is a schematic diagram of detailed steps of step S202 in another embodiment;

[0046] Figure 5 It is a schematic diagram of some detailed steps of step S100 in another embodiment;

[0047] Figure 6 is a flow chart of a target detection method in another embodiment;

[0048] Figure 7 is a structural block diagram of a target detection device in one embodiment;

[0049] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0051] The target detection method, device, computer equipment and readable storage medium provided in the embodiments of the present application are intended to solve the technical problem that in the traditional technology, the average feature of the superpixel set is used as the feature characterizing the set, and the average feature is used to calculate the set distance of adjacent superpixel sets to fuse the superpixel sets, and the fusion accuracy of the superpixel sets is poor, resulting in poor target detection accuracy. The technical solution of the present application will be described in detail below through embodiments and in conjunction with the accompanying drawings. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.

[0052] It should be noted that the target detection method provided in the embodiment of the present application, its execution subject can be a target detection device, and the target detection device can be implemented as part or all of a computer device through software, hardware, or a combination of software and hardware, and the computer device can be a server. In the following method embodiments, the execution subject is a computer device as an example for explanation. It can be understood that the target detection method provided in the following method embodiments can also be applied to a terminal, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server.

[0053] In one embodiment, Figure 1 As shown, a target detection method is provided, comprising the following steps:

[0054] Step S100, obtaining a target image, and obtaining a plurality of superpixel sets based on the target image.

[0055] In the embodiment of the present application, the target image may be an image to be detected, and the target image includes at least one target object, which is the object to be detected. The computer device acquires the target image, which may be a frame of image extracted from video data, such as surveillance video data, or an image acquired by the computer device through an image acquisition component, and no specific limitation is made here.

[0056] The computer device obtains multiple superpixel sets according to the target image, wherein the multiple superpixel sets are obtained by fusing the multiple superpixels corresponding to the target image. As an implementation, the computer device may use a superpixel segmentation algorithm to perform superpixel segmentation on the target image to obtain multiple superpixels, and then fuse the multiple superpixels to obtain multiple superpixel sets after fusion, wherein the superpixel segmentation algorithm may be, for example, a SLIC (Simple Linear Iterative Cluster) algorithm, etc.

[0057] Step S200, iteratively fuse multiple superpixel sets. In each iteration, based on the minimum superpixel distance between adjacent superpixel sets, the set distance between corresponding adjacent superpixel sets is obtained, and each adjacent superpixel set is fused according to each set distance.

[0058] In an embodiment of the present application, a computer device can calculate superpixel distances between multiple superpixels obtained by segmenting a target image. The superpixel distance between a pair of superpixels can be a feature distance between the pair of superpixels. The feature distance can be, for example, a color-material feature distance, that is, the feature similarity between color features and material features.

[0059] In each iterative fusion process, the computer device obtains the minimum superpixel distance between adjacent superpixel sets, which is the superpixel distance between a pair of most similar superpixels in the adjacent superpixel sets. m A superpixel in , j is a superpixel set S n A superpixel in , and the superpixel distance between superpixel i and superpixel j is S m and S n The computer device determines the superpixel distance between superpixel i and superpixel j as the adjacent superpixel set S m and S n The minimum superpixel distance between them.

[0060] The computer device obtains the set distance between corresponding adjacent superpixel sets based on the minimum superpixel distance between adjacent superpixel sets. In a possible implementation, the computer device can obtain the set distance between adjacent superpixel sets in combination with the minimum superpixel distance between adjacent superpixel sets and the graph feature distance between adjacent superpixel sets. The graph feature distance can be that the computer device takes each superpixel corresponding to the target image as a node, constructs a connection graph, and uses the shortest path algorithm to obtain the superpixel graph distance between adjacent superpixels, and determines the superpixel graph distance between the most similar superpixels between the two sets as the graph feature distance between the adjacent superpixel sets.

[0061] In another possible implementation, the computer device can also combine the minimum superpixel distance between adjacent superpixel sets and the maximum superpixel distance between adjacent superpixel sets to obtain the set distance between corresponding adjacent superpixel sets. The maximum superpixel distance between adjacent superpixel sets represents the feature similarity of the most dissimilar parts between adjacent superpixel sets. If the maximum superpixel distance is small, it represents that there is no large fluctuation inside the adjacent superpixel set, that is, the similarity is high. Alternatively, the computer device can also determine the minimum superpixel distance between adjacent superpixel sets as the set distance between adjacent superpixel sets, and so on. There is no specific restriction on the way in which the computer device obtains the set distance between corresponding adjacent superpixel sets based on the minimum superpixel distance between adjacent superpixel sets.

[0062] The set distance between adjacent superpixel sets is used to characterize the feature similarity between adjacent superpixel sets. The computer device fuses each adjacent superpixel set according to each set distance. For example, a greedy algorithm can be used to fuse the most similar pair of superpixel sets, that is, to fuse the adjacent superpixel sets with the smallest set distance, and the fused area is output as the initial candidate box.

[0063] Step S300, determining multiple target candidate frames corresponding to the target object from multiple initial candidate frames obtained by iterative fusion.

[0064] The computer device determines multiple target candidate frames corresponding to the target object from multiple initial candidate frames obtained by iterative fusion. The computer device may calculate evaluation scores for the multiple initial candidate frames respectively, and sort them in descending order of the scores, and select a preset number of initial candidate frames with the highest sorting order to determine them as the multiple target candidate frames corresponding to the target object.

[0065] Among them, the multiple target candidate frames are used to determine the detection position frame of the target object in the target image, that is, the computer device can determine the exact position of the target object in the target image based on the multiple target candidate frames.

[0066] In traditional technology, the average feature of a superpixel set is used as the feature to characterize the set. If the complexity of the detected object is high, for example, a superpixel set includes multiple regions with completely different colors, then the average color of the superpixel set cannot accurately characterize the regional properties of the superpixel set, that is, it cannot accurately characterize the actual features of the superpixel set. Therefore, the set distance between adjacent superpixel sets is calculated based on the average color of the adjacent superpixel sets. The obtained set distance may be far from the actual feature similarity between adjacent superpixel sets, which will lead to the mis-fusion of adjacent superpixel sets and poor fusion accuracy, thereby affecting the accuracy of target detection.

[0067] In an embodiment of the present application, a target image is acquired, and based on the target image, multiple superpixel sets are acquired, and then the multiple superpixel sets are iteratively fused. In each iteration, based on the minimum superpixel distance between adjacent superpixel sets, the set distance between corresponding adjacent superpixel sets is acquired, and each adjacent superpixel set is fused according to each set distance, and the set distance is used to characterize the feature similarity between adjacent superpixel sets; multiple target candidate frames corresponding to the target object are determined from multiple initial candidate frames obtained from the iterative fusion; and the multiple target candidate frames are used to determine the detection position frame of the target object in the target image. Therefore, the minimum superpixel distance between adjacent superpixel sets represents the feature similarity of the most similar parts between adjacent superpixel sets. If the minimum superpixel distance is large, it represents that there are no similar parts between adjacent superpixel sets, and if the minimum superpixel distance is small, it represents that there are similar parts between adjacent superpixel sets. Therefore, the minimum superpixel distance can accurately measure whether there are actually similar parts between adjacent superpixel sets. For superpixel sets with higher complexity, the embodiment of the present application obtains the set distance based on the minimum superpixel distance between adjacent superpixel sets, that is, accurately measures the actual feature similarity between adjacent superpixel sets based on the minimum superpixel distance, avoids the disadvantages caused by using average color to calculate the set distance between adjacent superpixel sets for superpixel sets with higher complexity, thereby improving the accuracy of the feature similarity between adjacent superpixel sets, which is beneficial to the accurate fusion of superpixel sets, and further improves the accuracy of target detection.

[0068] In one embodiment, in the above Figure 1 Based on the embodiment shown, this embodiment relates to a process of how a computer device obtains the set distance between corresponding adjacent superpixel sets based on the minimum superpixel distance between adjacent superpixel sets. Figure 2 , the process includes step S201, step S202 and step S203:

[0069] Step S201, obtaining the maximum superpixel distance between adjacent superpixel sets.

[0070] In an embodiment of the present application, a computer device obtains the maximum superpixel distance between adjacent superpixel sets. Similar to the minimum superpixel distance, the maximum superpixel distance can be the superpixel distance between a pair of the most dissimilar superpixels between adjacent superpixel sets, and the superpixel distance can be a color material feature distance.

[0071] As an implementation method, the adjacent superpixel set S m and S n The maximum superpixel distance D between max (m,n) computer equipment can be determined using the following formula 1:

[0072] D max (m,n)=max{d ct (i,j)|i∈S m ,j∈S n} Formula 1

[0073] Among them, i is the superpixel set S m Any superpixel in , j is a superpixel set S n Any superpixel in d ct (i, j) is the superpixel distance between superpixel i and superpixel j, that is, the color material feature distance.

[0074] Similarly, the set of adjacent superpixels S m and S n The minimum superpixel distance D between min (m,n) can be determined using the following formula 2:

[0075] D min (m,n)=min{d ct (i,j)|i∈S m ,j∈S n} Formula 2

[0076] In the embodiment of the present application, as an implementation method, the computer device may execute the following Figure 3 Steps S401 and S402 shown in the figure obtain the minimum superpixel distance and the maximum superpixel distance between adjacent superpixel sets:

[0077] Step S401, obtaining the color material feature distance between each superpixel in a plurality of superpixels corresponding to the target image.

[0078] In the embodiment of the present application, the computer device calculates the superpixel distance between each of the multiple superpixels obtained by segmenting the target image, and the superpixel distance is the color material feature distance. The color material feature distance is used to characterize the feature similarity of the color feature and the material feature between a pair of superpixels.

[0079] As an implementation method, for the color feature, the computer device may establish a normalized one-dimensional color histogram h for each superpixel. c Each color channel is divided into 20 color levels, that is, each color channel is divided into 20 grids. The computer device counts which grid the pixel value of each pixel in the superpixel falls in, and after the statistics, a 60-dimensional vector is obtained, and each grid represents the number of corresponding pixel values. For material features, the computer device can calculate the Gaussian gradient in eight directions for each superpixel to obtain a normalized material histogram h t , each color and direction is divided into 10 levels. For example, the computer device uses the first direction to calculate the gradient of each pixel in the superpixel, constructs a histogram, and then puts the histograms of the eight directions together to obtain a normalized material histogram, wherein the eight directions can be the directions of the remaining eight grids in the nine-square grid centered on the superpixel relative to the center.

[0080] After the computer device calculates the color features and material features of each superpixel, the color and material feature distance d between superpixel i and superpixel j is calculated using the following formula 3: ct (i,j):

[0081] d ct (i,j)=||h c (i)-h c (j)||+||h t (i)-h t (j)|| Formula 3

[0082] Among them, h c (i) is the color feature of superpixel i, h c (j) is the color feature of superpixel j, h t (i) is the material feature of superpixel i, h t (j) is the material feature of superpixel j.

[0083] Thus, the computer device obtains the color material feature distance between a pair of superpixels.

[0084] Step S402, determines the minimum color material feature distance in the adjacent superpixel set as the minimum superpixel distance between the corresponding adjacent superpixel sets, and determines the maximum color material feature distance in the adjacent superpixel set as the maximum superpixel distance between the corresponding adjacent superpixel sets.

[0085] As shown in Formula 1 and Formula 2, for adjacent superpixel sets, the computer device determines the minimum color material feature distance between the adjacent superpixel sets as the minimum superpixel distance between the adjacent superpixel sets, and the computer device determines the maximum color material feature distance between the adjacent superpixel sets as the maximum superpixel distance between the adjacent superpixel sets.

[0086] The maximum superpixel distance and the minimum superpixel distance can be used to measure the distance between two superpixel sets in low complexity and high complexity, respectively. If the maximum superpixel distance is very small, the similarity of the most dissimilar parts of the two superpixel sets is also very high, indicating that there is no large fluctuation within the two superpixel sets, which is suitable for low complexity. On the contrary, if the minimum superpixel distance is very small, at least one pair of superpixels in the two superpixel sets is very similar, which is more suitable for high complexity.

[0087] Step S202, based on the minimum superpixel distance between adjacent superpixel sets, obtain the high complexity distance between the corresponding adjacent superpixel sets, and based on the maximum superpixel distance between the adjacent superpixel sets, obtain the low complexity distance between the corresponding adjacent superpixel sets.

[0088] Among them, the low complexity distance is used to characterize the feature similarity between adjacent superpixel sets when the feature complexity of the superpixel set is low complexity; the high complexity distance is used to characterize the feature similarity between adjacent superpixel sets when the feature complexity of the superpixel set is high complexity.

[0089] In a possible implementation of step S202, as Figure 4 As shown, step S202 may include step S2021, step S2022 and step S2023:

[0090] Step S2021, obtaining the graph feature distance and edge loss distance between adjacent superpixel sets.

[0091] Among them, the graph feature distance represents the distance between the nearest superpixels in the set of adjacent superpixels, and the edge loss distance is obtained based on the edge response map corresponding to the target image.

[0092] As an implementation method, the computer device can calculate the edge loss value between a pair of superpixels in an adjacent superpixel set based on the edge response map corresponding to the target image, and calculate the edge loss distance between the corresponding adjacent superpixel sets based on the edge loss values ​​corresponding to the adjacent superpixel sets.

[0093] Edge loss measures the strength of the edge response at the junction of two regions. For the target image, the computer device first uses the Structure Edge algorithm to generate an edge response map E. The edge loss value between superpixel i and superpixel j is the sum of the edge responses on the junction pixels and then normalized by the boundary length. Assume that the boundary pixel set is l i,j , then the edge loss value d between superpixel i and superpixel j e (i,j)

[0094] As shown in formula 4:

[0095]

[0096] Among them, p is the index of the pixel.

[0097] Then the superpixel set S m and S n The edge loss distance D between e (m,n) is as shown in Formula 5:

[0098]

[0099] Thus, the computer device calculates the edge loss distance between adjacent superpixel sets.

[0100] The computer device takes each superpixel corresponding to the target image as a node, constructs a connection graph, that is, an edge is connected between adjacent superpixels, and the weight of the edge is set to 1, and uses the shortest path algorithm to obtain the superpixel map distance between adjacent superpixels. For example, the computer device uses the Floyd-Warshall algorithm to calculate the superpixel map distance d between adjacent superpixels i and j. g (i,j).

[0101] The computer device calculates the graph feature distance between the corresponding adjacent superpixel sets according to the graph distance of each superpixel corresponding to the adjacent superpixel set. As an implementation method, the adjacent superpixel set S m and S n The feature distance D between g (m,n) can be a set of two adjacent superpixels S m and S n The graph feature distance between the most similar superpixels. Thus, the computer device obtains the graph feature distance between adjacent superpixel sets.

[0102] Step S2022, calculating the high complexity distance between corresponding adjacent superpixel sets based on the minimum superpixel distance and the graph feature distance between adjacent superpixel sets.

[0103] Based on the complexity of different superpixel sets, the computer device calculates the high-complexity distance and the low-complexity distance between corresponding adjacent superpixel sets. As an implementation, the computer device can use the following formula 6 to calculate the high-complexity distance D m between S n and S H :

[0104] D H = D min (m, n) + bD g (m, n) Formula 6

[0105] where D g (m, n) is used as a spatial constraint term, and 0 < b < 1 to weaken the spatial constraint relationship.

[0106] Step S2023: Calculate the low-complexity distance between corresponding adjacent superpixel sets according to the maximum superpixel distance, graph feature distance, and edge loss distance between adjacent superpixel sets.

[0107] As an implementation, the computer device can use the following formula 7 to calculate the low-complexity distance D m between S n and S L :

[0108] D L (m, n) = D max (m, n) + D e (m, n) + D g (m, n) Formula 7

[0109] where D g (m, n) is used as a spatial constraint term. In the case of low complexity, it tends to combine adjacent superpixel sets first.

[0110] Step S203: Obtain the set distance between corresponding adjacent superpixel sets according to the low-complexity distance, high-complexity distance, and a preset weight constraint parameter between adjacent superpixel sets.

[0111] As an implementation, the computer device can use the following formula 8 to calculate the set distance D m between S n and S A :

[0112] D A = ρ m,n D L + (1 - ρ m,n )D H + ηD sFormula 8

[0113] Among them, ρ m,n and ηD s are weight constraint parameters. η can be set to 2, D s is an area constraint, which can ensure that small superpixel sets are fused first. For example, r is used to represent the relative area of ​​the superpixel set (i.e., the ratio of pixels in the set to the total pixels of the target image), then:

[0114] D s (m,n)=r m +r n Formula 9

[0115] Complexity factor ρ m,n Representation superpixel set S m and S n The complexity level of T m ,T n is the pixel set S m and S n The number of superpixels in , T is the total number of superpixels, then ρ m,n for:

[0116]

[0117]

[0118] Among them, α represents the complexity level, λ represents the boundary between low complexity and high complexity, λ can be taken as 5, for example, and the parameter σ affects the smoothness of complexity changes, σ can be set to 0.1.

[0119] Thus, the computer device obtains the set distance between corresponding adjacent superpixel sets according to the low-complexity distance, high-complexity distance and preset weight constraint parameters between adjacent superpixel sets.

[0120] In an embodiment of the present application, the adaptive complexity distance of adjacent superpixel sets, that is, the calculation of the set distance, can be achieved through low-complexity distance and high-complexity distance. Therefore, even for a set of superpixel sets with different complexities, the accurate set distance of the adaptive complexity between adjacent superpixel sets can be obtained through the above formula 8, thereby improving the fusion accuracy of the superpixel sets when the complexity of each superpixel set is different. The embodiment of the present application adaptively selects the fusion strategy by considering the target complexity, and the fusion route is more reasonable. The generated target candidate boxes are more accurate and diverse, thereby improving the accuracy of target detection.

[0121] In an embodiment of the present application, through the above-mentioned adaptive complexity distance metric, parameters can be adaptively adjusted according to the complexity of the superpixel set, that is, the complexity of the target object, so that low-complexity and high-complexity superpixel sets use different distance similarities, that is, set distances, thereby changing the strategy and standards for superpixel set fusion and improving the quality of the target candidate box.

[0122] In one embodiment, in the above Figure 1 Based on the embodiment shown, this embodiment relates to a process of how a computer device obtains multiple superpixel sets according to a target image. Figure 5 As shown, the process may include step S101, step S102 and step S103:

[0123] Step S101, performing superpixel segmentation on a target image to obtain a plurality of superpixels corresponding to the target image.

[0124] Step S102, calculating the color material feature distance, superpixel map distance and edge loss value between adjacent superpixels.

[0125] In step S103, a greedy algorithm is used to fuse multiple superpixels according to the color material feature distance, superpixel map distance and edge loss value between adjacent superpixels to obtain multiple superpixel sets.

[0126] In an embodiment of the present application, a computer device may use a superpixel segmentation algorithm to perform superpixel segmentation on a target image to obtain a plurality of superpixels, and then fuse the plurality of superpixels to obtain a plurality of superpixel sets, wherein the superpixel segmentation algorithm may be, for example, a SLIC (Simple Linear Iterative Cluster) algorithm, etc.

[0127] The computer device uses Formula 3 in the above embodiment to calculate the color material feature distance between adjacent superpixels; the computer device uses each superpixel corresponding to the target image as a node to construct a connection graph, that is, an edge is connected between adjacent superpixels, and the weight of the edge is set to 1, and the shortest path algorithm is used to obtain the superpixel graph distance between adjacent superpixels; the computer device uses Formula 4 in the above embodiment to calculate the edge loss value between adjacent superpixels. Please refer to the above embodiment for the specific implementation method, which will not be repeated here.

[0128] The computer device adopts a greedy algorithm to fuse multiple superpixels according to the color material feature distance, superpixel map distance and edge loss value between adjacent superpixels. For example, the most similar superpixels are selected for fusion to obtain multiple superpixel sets. Thus, multiple superpixels are fused in combination with the color material feature distance, superpixel map distance and edge loss value between adjacent superpixels. Compared with the traditional technology of fusing multiple superpixels by using Euclidean distance, this embodiment can improve the accuracy of superpixel fusion and provide a reliable basis for the fusion of superpixel sets.

[0129] In one embodiment, Figure 1 Based on the embodiment shown, this embodiment relates to a process of how a computer device determines multiple target candidate frames corresponding to a target object from multiple initial candidate frames obtained by iterative fusion. Figure 6 , step 300 may include step S301, step S302 and step S303:

[0130] Step S301, calculating the evaluation score corresponding to each initial candidate box according to the edge loss value corresponding to the superpixel included in each initial candidate box.

[0131] Iterative fusion obtains multiple initial candidate frames that contain a large number of redundant frames, such as single superpixels or background areas. In order to remove these redundant frames that are unlikely to contain the target object, the computer device calculates a score based on the edge response for each initial candidate frame, that is, the evaluation score. If the edge response outside the initial candidate frame is large, it means that the initial candidate frame has a clear surrounding edge and is more likely to contain a foreground object.

[0132] In the embodiment of the present application, for the initial candidate box p, the computer device may use the following formula 12 to calculate the evaluation score score(p) corresponding to the initial candidate box:

[0133]

[0134] Among them, k is set to less than 1 to favor larger windows, and the initial candidate box p is composed of the superpixel set S p The edge response is calculated using the edge loss at the region boundary, and the evaluation score is obtained by summing and normalizing the edge losses on the outer boundaries.

[0135] Step S302, sorting the evaluation scores corresponding to the initial candidate boxes in order of score size, and determining a plurality of target evaluation scores from the sorting results.

[0136] The computer device sorts the evaluation scores corresponding to the initial candidate boxes in order of score size. For example, the evaluation scores corresponding to the initial candidate boxes can be sorted in order from large to small, and the top 1000 target evaluation scores, i.e., higher scores, are determined from the sorting results.

[0137] Step S303: determine the initial candidate boxes corresponding to the target evaluation scores as the target candidate boxes.

[0138] The computer device determines the initial candidate frame corresponding to each target evaluation score as the target candidate frame, and the multiple target candidate frames are used by the computer device to determine the detection position frame of the target object in the target image.

[0139] The new sorting method designed in the embodiment of the present application examines the edge response of the outer part of the initial candidate box, calculates the normalized edge response as the evaluation score, and puts the initial candidate box that is more likely to contain the object in the front, thereby eliminating a large number of redundant boxes and improving the calculation speed of the computer equipment and the quality of the target candidate box.

[0140] By testing on the PASCAL VOC2012 dataset, the IOU threshold was set to 0.5, and the indicators used were MABO, AUC, and recall rate. The experiment showed that when the target detection method of the embodiment of the present application output 2000 candidate frames, MABO reached 0.84, AUC reached 0.647, and recall rate reached 96%, thereby greatly improving the quality of the target candidate frames and the accuracy of target detection.

[0141] It should be understood that although Figure 1-6 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1-6 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.

[0142] In one embodiment, Figure 7 As shown, a target detection device is provided, comprising:

[0143] A first acquisition module 10 is used to acquire a target image, and acquire a plurality of superpixel sets according to the target image; the target image includes at least one target object, and the plurality of superpixel sets are obtained by fusing a plurality of superpixels corresponding to the target image;

[0144] A fusion module 20 is used to iteratively fuse the multiple superpixel sets. In each iteration, based on the minimum superpixel distance between adjacent superpixel sets, a set distance between corresponding adjacent superpixel sets is obtained, and each adjacent superpixel set is fused according to each set distance; the set distance is used to characterize the feature similarity between the adjacent superpixel sets;

[0145] The first determination module 30 is used to determine multiple target candidate frames corresponding to the target object from multiple initial candidate frames obtained by iterative fusion; the multiple target candidate frames are used to determine the detection position frame of the target object in the target image.

[0146] Optionally, the fusion module 20 includes:

[0147] A first acquisition unit, used to acquire a maximum superpixel distance between adjacent superpixel sets;

[0148] A second acquisition unit is used to acquire the high complexity distance between the corresponding adjacent superpixel sets based on the minimum superpixel distance between the adjacent superpixel sets, and acquire the low complexity distance between the corresponding adjacent superpixel sets based on the maximum superpixel distance between the adjacent superpixel sets;

[0149] A third acquisition unit is used to acquire the set distance between corresponding adjacent superpixel sets according to the low complexity distance, the high complexity distance and the preset weight constraint parameter between the adjacent superpixel sets;

[0150] Among them, the low complexity distance is used to characterize the feature similarity between adjacent superpixel sets when the feature complexity of the superpixel set is low complexity; the high complexity distance is used to characterize the feature similarity between adjacent superpixel sets when the feature complexity of the superpixel set is high complexity.

[0151] Optionally, the second acquisition unit is specifically used to obtain a graph feature distance and an edge loss distance between adjacent superpixel sets; the graph feature distance represents the distance between the closest superpixels in adjacent superpixel sets, and the edge loss distance is obtained based on an edge response map corresponding to the target image; based on the minimum superpixel distance and graph feature distance between adjacent superpixel sets, a high-complexity distance between corresponding adjacent superpixel sets is calculated; based on the maximum superpixel distance, graph feature distance and edge loss distance between adjacent superpixel sets, a low-complexity distance between corresponding adjacent superpixel sets is calculated.

[0152] Optionally, the device further comprises:

[0153] The second acquisition module is used to obtain the color and material feature distance between each superpixel in the multiple superpixels corresponding to the target image; the color and material feature distance is used to represent the feature similarity of the color feature and the material feature between a pair of superpixels;

[0154] The second determination module is used to determine the minimum color material feature distance in the adjacent superpixel set as the minimum superpixel distance between the corresponding adjacent superpixel sets, and to determine the maximum color material feature distance in the adjacent superpixel set as the maximum superpixel distance between the corresponding adjacent superpixel sets.

[0155] Optionally, the second acquisition unit is specifically used to calculate the edge loss value between a pair of superpixels in an adjacent superpixel set according to the edge response map corresponding to the target image, and calculate the edge loss distance between the corresponding adjacent superpixel sets according to the edge loss values ​​corresponding to the adjacent superpixel sets; each superpixel corresponding to the target image is taken as a node to construct a connection graph, and the shortest path algorithm is used to obtain the superpixel graph distance between adjacent superpixels, and the graph feature distance between the corresponding adjacent superpixel sets is calculated according to the superpixel graph distances corresponding to the adjacent superpixel sets.

[0156] Optionally, the first acquisition module 10 includes:

[0157] A segmentation unit, configured to perform superpixel segmentation on the target image to obtain the plurality of superpixels corresponding to the target image;

[0158] A first calculation unit is used to calculate the color material feature distance, superpixel map distance and edge loss value between adjacent superpixels;

[0159] The fusion unit is used to adopt a greedy algorithm to fuse the multiple superpixels according to the color material feature distance, superpixel map distance and edge loss value between adjacent superpixels to obtain the multiple superpixel sets.

[0160] Optionally, the first determining module 30 includes:

[0161] A second calculation unit, used to calculate the evaluation score corresponding to each of the initial candidate boxes according to the edge loss value corresponding to the superpixel included in each of the initial candidate boxes;

[0162] A sorting unit, used to sort the evaluation scores corresponding to the initial candidate boxes in order of score size, and determine multiple target evaluation scores from the sorting results;

[0163] A determination unit is used to determine the initial candidate boxes corresponding to the target evaluation scores as the target candidate boxes.

[0164] For the specific definition of the target detection device, please refer to the definition of the target detection method above, which will not be repeated here. Each module in the above target detection device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0165] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 8 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data of the target detection method. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a target detection method is implemented.

[0166] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0167] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0168] Acquire a target image, and acquire a plurality of superpixel sets according to the target image; the target image includes at least one target object, and the plurality of superpixel sets are obtained by fusing a plurality of superpixels corresponding to the target image;

[0169] Iteratively fuse the multiple superpixel sets, and in each iteration process, based on the minimum superpixel distance between adjacent superpixel sets, obtain the set distance between corresponding adjacent superpixel sets, and fuse each adjacent superpixel set according to each set distance; the set distance is used to characterize the feature similarity between the adjacent superpixel sets;

[0170] A plurality of target candidate frames corresponding to the target object are determined from a plurality of initial candidate frames obtained by iterative fusion; the plurality of target candidate frames are used to determine a detection position frame of the target object in the target image.

[0171] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0172] Get the maximum superpixel distance between adjacent superpixel sets;

[0173] Based on the minimum superpixel distance between adjacent superpixel sets, a high complexity distance between corresponding adjacent superpixel sets is obtained, and based on the maximum superpixel distance between adjacent superpixel sets, a low complexity distance between corresponding adjacent superpixel sets is obtained;

[0174] According to the low complexity distance, high complexity distance and preset weight constraint parameters between adjacent superpixel sets, the set distance between corresponding adjacent superpixel sets is obtained;

[0175] Among them, the low complexity distance is used to characterize the feature similarity between adjacent superpixel sets when the feature complexity of the superpixel set is low complexity; the high complexity distance is used to characterize the feature similarity between adjacent superpixel sets when the feature complexity of the superpixel set is high complexity.

[0176] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0177] Obtaining a graph feature distance and an edge loss distance between adjacent superpixel sets; the graph feature distance represents the distance between the closest superpixels in the adjacent superpixel sets, and the edge loss distance is obtained based on an edge response map corresponding to the target image;

[0178] According to the minimum superpixel distance and graph feature distance between adjacent superpixel sets, the high-complexity distance between corresponding adjacent superpixel sets is calculated;

[0179] According to the maximum superpixel distance, graph feature distance and edge loss distance between adjacent superpixel sets, the low-complexity distance between corresponding adjacent superpixel sets is calculated.

[0180] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0181] Obtaining the color and material feature distances between the superpixels in the plurality of superpixels corresponding to the target image; the color and material feature distances are used to characterize the feature similarity of the color features and the material features between a pair of superpixels;

[0182] The minimum color material feature distance in the adjacent superpixel set is determined as the minimum superpixel distance between the corresponding adjacent superpixel sets, and the maximum color material feature distance in the adjacent superpixel set is determined as the maximum superpixel distance between the corresponding adjacent superpixel sets.

[0183] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0184] According to the edge response map corresponding to the target image, an edge loss value between a pair of superpixels in an adjacent superpixel set is calculated, and an edge loss distance between corresponding adjacent superpixel sets is calculated according to each edge loss value corresponding to the adjacent superpixel set;

[0185] Each superpixel corresponding to the target image is taken as a node to construct a connection graph, and the shortest path algorithm is used to obtain the superpixel graph distance between adjacent superpixels, and the graph feature distance between corresponding adjacent superpixel sets is calculated based on the superpixel graph distances corresponding to the adjacent superpixel sets.

[0186] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0187] Performing superpixel segmentation on the target image to obtain the multiple superpixels corresponding to the target image;

[0188] Calculate the color material feature distance, superpixel map distance and edge loss value between adjacent superpixels;

[0189] A greedy algorithm is adopted to fuse the multiple superpixels according to the color material feature distance, superpixel map distance and edge loss value between adjacent superpixels to obtain the multiple superpixel sets.

[0190] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0191] Calculate the evaluation score corresponding to each of the initial candidate boxes according to the edge loss values ​​corresponding to the superpixels included in each of the initial candidate boxes;

[0192] Sorting the evaluation scores corresponding to the initial candidate boxes in order of the scores, and determining a plurality of target evaluation scores from the sorting results;

[0193] The initial candidate boxes corresponding to the target evaluation scores are determined as the target candidate boxes.

[0194] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0195] Acquire a target image, and acquire a plurality of superpixel sets according to the target image; the target image includes at least one target object, and the plurality of superpixel sets are obtained by fusing a plurality of superpixels corresponding to the target image;

[0196] Iteratively fuse the multiple superpixel sets, and in each iteration process, based on the minimum superpixel distance between adjacent superpixel sets, obtain the set distance between corresponding adjacent superpixel sets, and fuse each adjacent superpixel set according to each set distance; the set distance is used to characterize the feature similarity between the adjacent superpixel sets;

[0197] A plurality of target candidate frames corresponding to the target object are determined from a plurality of initial candidate frames obtained by iterative fusion; the plurality of target candidate frames are used to determine a detection position frame of the target object in the target image.

[0198] In one embodiment, when the computer program is executed, the following steps are also implemented:

[0199] Get the maximum superpixel distance between adjacent superpixel sets;

[0200] Based on the minimum superpixel distance between adjacent superpixel sets, a high complexity distance between corresponding adjacent superpixel sets is obtained, and based on the maximum superpixel distance between adjacent superpixel sets, a low complexity distance between corresponding adjacent superpixel sets is obtained;

[0201] According to the low complexity distance, high complexity distance and preset weight constraint parameters between adjacent superpixel sets, the set distance between corresponding adjacent superpixel sets is obtained;

[0202] Among them, the low complexity distance is used to characterize the feature similarity between adjacent superpixel sets when the feature complexity of the superpixel set is low complexity; the high complexity distance is used to characterize the feature similarity between adjacent superpixel sets when the feature complexity of the superpixel set is high complexity.

[0203] In one embodiment, when the computer program is executed, the following steps are also implemented:

[0204] Obtaining a graph feature distance and an edge loss distance between adjacent superpixel sets; the graph feature distance represents the distance between the closest superpixels in the adjacent superpixel sets, and the edge loss distance is obtained based on an edge response map corresponding to the target image;

[0205] According to the minimum superpixel distance and graph feature distance between adjacent superpixel sets, the high-complexity distance between corresponding adjacent superpixel sets is calculated;

[0206] According to the maximum superpixel distance, graph feature distance and edge loss distance between adjacent superpixel sets, the low-complexity distance between corresponding adjacent superpixel sets is calculated.

[0207] In one embodiment, when the computer program is executed, the following steps are also implemented:

[0208] Obtaining the color and material feature distances between the superpixels in the plurality of superpixels corresponding to the target image; the color and material feature distances are used to characterize the feature similarity of the color features and the material features between a pair of superpixels;

[0209] The minimum color material feature distance in the adjacent superpixel set is determined as the minimum superpixel distance between the corresponding adjacent superpixel sets, and the maximum color material feature distance in the adjacent superpixel set is determined as the maximum superpixel distance between the corresponding adjacent superpixel sets.

[0210] In one embodiment, when the computer program is executed, the following steps are also implemented:

[0211] According to the edge response map corresponding to the target image, an edge loss value between a pair of superpixels in an adjacent superpixel set is calculated, and an edge loss distance between corresponding adjacent superpixel sets is calculated according to each edge loss value corresponding to the adjacent superpixel set;

[0212] Each superpixel corresponding to the target image is taken as a node to construct a connection graph, and the shortest path algorithm is used to obtain the superpixel graph distance between adjacent superpixels, and the graph feature distance between corresponding adjacent superpixel sets is calculated based on the superpixel graph distances corresponding to the adjacent superpixel sets.

[0213] In one embodiment, when the computer program is executed, the following steps are also implemented:

[0214] Performing superpixel segmentation on the target image to obtain the multiple superpixels corresponding to the target image;

[0215] Calculate the color material feature distance, superpixel map distance and edge loss value between adjacent superpixels;

[0216] A greedy algorithm is adopted to fuse the multiple superpixels according to the color material feature distance, superpixel map distance and edge loss value between adjacent superpixels to obtain the multiple superpixel sets.

[0217] In one embodiment, when the computer program is executed, the following steps are also implemented:

[0218] Calculate the evaluation score corresponding to each of the initial candidate boxes according to the edge loss values ​​corresponding to the superpixels included in each of the initial candidate boxes;

[0219] Sorting the evaluation scores corresponding to the initial candidate boxes in order of the scores, and determining a plurality of target evaluation scores from the sorting results;

[0220] The initial candidate boxes corresponding to the target evaluation scores are determined as the target candidate boxes.

[0221] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0222] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0223] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A target detection method, It is characterized in that The method comprises: Acquire a target image, and acquire multiple superpixel sets based on the target image; the target image includes at least one target object, and the multiple superpixel sets are obtained by fusing multiple superpixels corresponding to the target image; Iteratively fusing the multiple superpixel sets, and obtaining the maximum superpixel distance between adjacent superpixel sets during each iteration; Based on the minimum superpixel distance between adjacent superpixel sets, a high complexity distance between corresponding adjacent superpixel sets is obtained, and based on the maximum superpixel distance between adjacent superpixel sets, a low complexity distance between corresponding adjacent superpixel sets is obtained; According to the low complexity distance, high complexity distance and preset weight constraint parameters between adjacent superpixel sets, the set distance between corresponding adjacent superpixel sets is obtained; And each adjacent superpixel set is merged according to each set distance; the set distance is used to characterize the feature similarity between the adjacent superpixel sets; wherein the low complexity distance is used to characterize the feature similarity between adjacent superpixel sets when the feature complexity of the superpixel set is low complexity; the high complexity distance is used to characterize the feature similarity between adjacent superpixel sets when the feature complexity of the superpixel set is high complexity; A plurality of target candidate frames corresponding to the target object are determined from a plurality of initial candidate frames obtained by iterative fusion; the plurality of target candidate frames are used to determine a detection position frame of the target object in the target image.

2. The method according to claim 1, It is characterized in that The method further comprises: Obtaining the color and material feature distances between the superpixels in the plurality of superpixels corresponding to the target image; the color and material feature distances are used to characterize the feature similarity of the color features and the material features between a pair of superpixels; The minimum color material feature distance in the adjacent superpixel set is determined as the minimum superpixel distance between the corresponding adjacent superpixel sets, and the maximum color material feature distance in the adjacent superpixel set is determined as the maximum superpixel distance between the corresponding adjacent superpixel sets.

3. The method according to claim 1, It is characterized in that The method of obtaining the high complexity distance between the corresponding adjacent superpixel sets based on the minimum superpixel distance between the adjacent superpixel sets, and obtaining the low complexity distance between the corresponding adjacent superpixel sets based on the maximum superpixel distance between the adjacent superpixel sets, includes: Obtaining a graph feature distance and an edge loss distance between adjacent superpixel sets; the graph feature distance represents the distance between the closest superpixels in the adjacent superpixel sets, and the edge loss distance is obtained based on an edge response map corresponding to the target image; According to the minimum superpixel distance and graph feature distance between adjacent superpixel sets, the high-complexity distance between corresponding adjacent superpixel sets is calculated; According to the maximum superpixel distance, graph feature distance and edge loss distance between adjacent superpixel sets, the low-complexity distance between corresponding adjacent superpixel sets is calculated.

4. The method according to claim 3, It is characterized in that The obtaining of the graph feature distance and the edge loss distance between adjacent superpixel sets includes: According to the edge response map corresponding to the target image, an edge loss value between a pair of superpixels in an adjacent superpixel set is calculated, and an edge loss distance between corresponding adjacent superpixel sets is calculated according to each edge loss value corresponding to the adjacent superpixel set; Each superpixel corresponding to the target image is taken as a node to construct a connection graph, and the shortest path algorithm is used to obtain the superpixel graph distance between adjacent superpixels, and the graph feature distance between corresponding adjacent superpixel sets is calculated based on the superpixel graph distances corresponding to the adjacent superpixel sets.

5. The method according to claim 1, It is characterized in that The step of obtaining a plurality of superpixel sets according to the target image comprises: Performing superpixel segmentation on the target image to obtain the multiple superpixels corresponding to the target image; Calculate the color material feature distance, superpixel map distance and edge loss value between adjacent superpixels; A greedy algorithm is adopted to fuse the multiple superpixels according to the color material feature distance, superpixel map distance and edge loss value between adjacent superpixels to obtain the multiple superpixel sets.

6. The method according to claim 1, It is characterized in that Determining multiple target candidate frames corresponding to the target object from multiple initial candidate frames obtained by iterative fusion includes: Calculate the evaluation score corresponding to each of the initial candidate boxes according to the edge loss values ​​corresponding to the superpixels included in each of the initial candidate boxes; Sorting the evaluation scores corresponding to the initial candidate boxes in order of the scores, and determining a plurality of target evaluation scores from the sorting results; The initial candidate boxes corresponding to the target evaluation scores are determined as the target candidate boxes.

7. A target detection device, It is characterized in that The device comprises: A first acquisition module is used to acquire a target image, and acquire a plurality of superpixel sets according to the target image; the target image includes at least one target object, and the plurality of superpixel sets are obtained by fusing a plurality of superpixels corresponding to the target image; A fusion module, used for iteratively fusing the multiple superpixel sets, obtaining the maximum superpixel distance between adjacent superpixel sets in each iteration; obtaining the high complexity distance between the corresponding adjacent superpixel sets based on the minimum superpixel distance between the adjacent superpixel sets, and obtaining the low complexity distance between the corresponding adjacent superpixel sets based on the maximum superpixel distance between the adjacent superpixel sets; obtaining the set distance between the corresponding adjacent superpixel sets according to the low complexity distance, high complexity distance and preset weight constraint parameters between the adjacent superpixel sets, and fusing each adjacent superpixel set according to each set distance; the set distance is used to characterize the feature similarity between the adjacent superpixel sets; wherein the low complexity distance is used to characterize the feature similarity between the adjacent superpixel sets when the feature complexity of the superpixel sets is low complexity; the high complexity distance is used to characterize the feature similarity between the adjacent superpixel sets when the feature complexity of the superpixel sets is high complexity; The first determination module is used to determine multiple target candidate frames corresponding to the target object from multiple initial candidate frames obtained by iterative fusion; the multiple target candidate frames are used to determine the detection position frame of the target object in the target image.

8. The device according to claim 7, It is characterized in that The device further comprises: 152-154 The second acquisition module is used to obtain the color and material feature distance between each superpixel in the multiple superpixels corresponding to the target image; the color and material feature distance is used to represent the feature similarity of the color feature and the material feature between a pair of superpixels; The second determination module is used to determine the minimum color material feature distance in the adjacent superpixel set as the minimum superpixel distance between the corresponding adjacent superpixel sets, and to determine the maximum color material feature distance in the adjacent superpixel set as the maximum superpixel distance between the corresponding adjacent superpixel sets.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Graph model based saliency target detection method

    CN105976378A

  • Target detection and recognition method for water surface panoramic images

    CN107844750A

  • Image super-resolution method based on clustering regression

    CN111340697A

  • Image processing method and apparatus

    WO2020133170A1