Target detection method and system in sparse scene

By performing edge detection and cluster sorting on target images in sparse scenes and combining the detection methods of wide-angle and telephoto lenses, the problems of high false detection and missed detection rates in target detection in sparse scenes are solved, and the reliability of detection is improved.

CN120707905APending Publication Date: 2025-09-26GUANGDONG UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510868774.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-26
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

Existing field target detection technologies have high false detection and missed detection rates in sparse scenarios, resulting in poor detection reliability.

Method used

By acquiring multiple target images in sparse scenes, edge detection is performed to determine the area of ​​the target region, clustering is performed using the K-means algorithm, and the target regions are sorted according to the distance between them. Finally, wide-angle and telephoto lenses are used for target detection.

Benefits of technology

The false detection rate and missed detection rate of target detection are greatly reduced, and the reliability of target detection is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120707905A_ABST
    Figure CN120707905A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, and discloses a target detection method and system in a sparse scene, and the method comprises the steps: carrying out the edge detection of a plurality of target images, determining the area of a target region in the target image according to an edge detection result, carrying out the clustering division of the plurality of target regions through the area, and obtaining a plurality of clusters, and for each cluster, sorting all the target areas in the cluster according to the distance between the target areas in the cluster so as to obtain a sorting result with the shortest path traversing all the target areas, so that target detection is quickly and sequentially performed on the plurality of target areas according to the sorting, the false detection rate and the omission ratio of target detection are greatly reduced, and the detection efficiency is improved. And the reliability of target detection is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a method and system for detecting an object in a sparse scene. Background Art

[0002] Optimizing the efficiency and cost of target detection in the wild, especially in sparse and open scenes, is particularly important. However, conventional lenses often face zoom difficulties, small fields of view, and capture speed limitations in wild scenes.

[0003] The existing field target detection technology has high false detection rate and missed detection rate after detection, resulting in poor reliability of target detection. Summary of the Invention

[0004] In view of this, the present invention provides a target detection method and system in sparse scenes, which solves the technical problem that the existing field target detection technology has high false detection rate and missed detection rate after detection, resulting in poor reliability of target detection.

[0005] A first aspect of the present invention provides a method for detecting an object in a sparse scene, comprising:

[0006] Acquire multiple target images in sparse scenes;

[0007] Performing edge detection on each of the target images, and determining the area of ​​the target region within each of the target images according to the edge detection results;

[0008] Clustering the target areas according to their areas to obtain a plurality of clusters;

[0009] For each cluster, sort all target areas in the cluster according to the distances between the target areas in the cluster, and obtain a sorting result with the shortest path traversing all target areas;

[0010] According to the sorting result, target detection is performed on the plurality of target areas in sequence.

[0011] Preferably, acquiring multiple target images in a sparse scene includes:

[0012] The target images at different focal lengths in sparse scenes are captured using a wide-angle lens.

[0013] Preferably, performing edge detection on each of the target images and determining the area of ​​the target region within each of the target images according to the edge detection results includes:

[0014] Performing edge detection on each target image using a local difference operator to obtain a mask of the target area in each target image;

[0015] performing a binarization process on the mask to obtain a binarized mask;

[0016] Using Grabcut algorithm to advance the foreground of the binary mask to obtain a foreground area;

[0017] The area of ​​the target area is determined according to the total number of pixels in the foreground area.

[0018] Preferably, clustering the plurality of target areas according to the areas to obtain a plurality of clusters includes:

[0019] Based on the K-means algorithm, the area is selected as a clustering condition of the K-means algorithm, and the plurality of target areas are clustered to form a plurality of clusters.

[0020] Preferably, for each cluster, sorting all target areas in the cluster according to the distances between the target areas in the cluster to obtain a sorting result with the shortest path traversing all target areas includes:

[0021] For each cluster, extracting a distance feature vector of each target area in the cluster; wherein the distance feature vector includes a center coordinate point, a pixel area, and an aspect ratio;

[0022] Normalizing the distance feature vector to obtain a normalized distance feature vector;

[0023] Arbitrarily selecting the target area from the cluster as a starting point, and in each iteration, selecting an unvisited point with the closest feature distance to the currently visited point according to the normalized distance feature vector, until all points are visited to form a current path;

[0024] Swapping any two edges in the current path, and determining whether the path after the swap is shorter than the path before the swap; wherein the edge is a connecting edge between two adjacent points in the initial path;

[0025] If it is determined that the path after the swap is shorter than the path before the swap, the swapped path is updated as the current path, and the process of swapping any two edges in the current path is continued to determine whether the path after the swap is shorter than the path before the swap. The iteration stops until the path after the swap is no longer shorter than the path before the swap, and the final current path is output.

[0026] According to the final current path, a ranking result of all target areas in the cluster is determined.

[0027] Preferably, performing target detection on the plurality of target areas in sequence according to the sorting results includes:

[0028] According to the ranking results, target detection is performed on the plurality of target areas in sequence through a wide-angle lens, and after each target detection, a target detection score is determined based on the target area obtained by the target detection and the expected target area;

[0029] Comparing the target detection score with a preset confidence threshold;

[0030] Determine initial target detection results for target areas within all target images based on the comparison results;

[0031] The initial target detection result is reviewed according to the sorting result through a telephoto lens, and the target detection result is determined based on the review result.

[0032] In a second aspect, the present invention provides a target detection system in a sparse scene, comprising:

[0033] An image acquisition module is used to acquire multiple target images in sparse scenes;

[0034] an area determination module, configured to perform edge detection on each of the target images and determine the area of ​​the target region within each of the target images according to the edge detection result;

[0035] A target clustering module, configured to cluster the target regions according to their areas to obtain a plurality of clusters;

[0036] A target sorting module is used to sort all target areas in each cluster according to the distances between the target areas in the cluster, and obtain a sorting result with the shortest path traversing all target areas;

[0037] The target detection module is used to perform target detection on the plurality of target areas in sequence according to the sorting result.

[0038] In a third aspect, the present invention provides an electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the target detection method in a sparse scenario as described in the first aspect.

[0039] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed, implements the steps of the target detection method in a sparse scene as described in the first aspect.

[0040] In a fifth aspect, the present invention provides a computer program product, comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions. When executed by a computer, the program instructions cause the computer to perform the steps of the object detection method in sparse scenes as described in the first aspect.

[0041] It can be seen from the above technical solutions that the present invention performs edge detection on multiple target images respectively, determines the area of ​​the target area in the target image according to the edge detection results, clusters the multiple target areas using the area to obtain multiple clusters, and for each cluster, sorts all the target areas in the cluster according to the distance between the target areas in the cluster, thereby obtaining a sorting result with the shortest path traversing all the target areas, thereby quickly performing target detection on multiple target areas in sequence according to the sorting, and greatly reducing the false detection rate and missed detection rate of target detection, thereby improving the reliability of target detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0043] Figure 1 A diagram illustrating an application environment of a target detection method in a sparse scene provided by an embodiment of the present invention;

[0044] Figure 2 A flowchart of a method for detecting an object in a sparse scene provided by an embodiment of the present invention;

[0045] Figure 3 A schematic diagram of the structure of a target detection system in a sparse scene provided by an embodiment of the present invention;

[0046] Figure 4 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0047] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0048] The target detection method in sparse scenes provided by the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 101 communicates with the server 102 through the network. The data storage system can store the data that the server 102 needs to process. The data storage system can be integrated on the server 102, or it can be placed on the cloud or other network servers. The terminal 101 or the server 102 obtains multiple target images in a sparse scene; performs edge detection on each target image respectively, and determines the area of ​​the target area in each target image according to the edge detection result; clusters the multiple target areas according to the area to obtain multiple clusters; for each cluster, sorts all the target areas in the cluster according to the distance between the target areas in the cluster, and obtains the sorting result with the shortest path traversing all the target areas; according to the sorting result, performs target detection on the multiple target areas in turn.

[0049] The terminal 101 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and the like.

[0050] The server 102 may be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.

[0051] like Figure 2 As shown, the embodiment of the present application provides a target detection method in a sparse scene, and the method is applied to Figure 1 The terminal 101 or the server 102 in the embodiment is used as an example to illustrate the method, which includes the following steps S1 to S5.

[0052] Step S1: Acquire multiple target images in a sparse scene.

[0053] To cope with sparse outdoor scenes, a wide-angle lens can be used to capture target images at different focal lengths in sparse scenes. With limited equipment, a wide-angle lens can capture a larger field of view. The wide-angle lens has a built-in liquid lens that can quickly capture targets at different focal lengths in sparse scenes, and a telephoto lens can be used to reconstruct them in high definition.

[0054] Step S2: perform edge detection on each target image, and determine the area of ​​the target region in each target image according to the edge detection result.

[0055] In object detection, a bounding box is used to enclose the object, but it does not completely enclose the object, and some redundant background information will be present. In order to determine the size of the object and improve detection efficiency, the embodiment of the present application uses an edge detection algorithm to perform edge detection on the target image, thereby segmenting the target area.

[0056] Edge detection involves detecting sudden changes in grayscale or structure, marking the end of one region and the beginning of another. This discontinuity is called an edge. Different images have different grayscale levels, and boundaries generally have distinct edges, which can be exploited to segment images. A detection operator is first applied to each pixel in the image. The output of the detection operator is then evaluated based on a defined criterion (such as the Prewitt, Sobel, or Roberts operators) to determine whether the pixel is an edge point. Certain boundary points are removed or edge discontinuities are filled, and these edges are connected into lines. The edge detection results are then used to determine the area of ​​the target region within each target image.

[0057] Step S3: cluster the multiple target areas according to their areas to obtain multiple clusters.

[0058] In large scenes, there are usually a large number of targets. To increase the density of effective information, it is usually desirable to detect as many targets as possible. However, not all detected targets are necessary. Therefore, these targets need to be screened to eliminate irrelevant targets and optimize the efficiency of subsequent processing.

[0059] In the embodiment of the present application, based on the K-means algorithm, area is selected as the clustering condition of the K-means algorithm, and multiple target areas are clustered to form multiple clusters.

[0060] The K-means algorithm is a classic unsupervised clustering method suitable for classifying object regions obtained through edge detection. It typically divides a dataset into K clusters, ensuring that objects within the same cluster are as similar as possible in their feature space, while objects across clusters differ significantly. The K-means algorithm iteratively adjusts the positions of cluster centers, optimizing the compactness of samples within a cluster, thereby achieving a more compact and separated cluster structure.

[0061] In an embodiment of the present application, the target area (number of pixels) is selected to cluster the target area, and the aspect ratio, bounding box size and other features of the target area can be used as a supplement to the area feature to improve the clustering accuracy.

[0062] The optimization goal of the K-Means algorithm is to minimize the within-cluster sum of squares (WCSS), which is expressed as follows:

[0063]

[0064] Among them, K is the number of clusters, C i is the point set of cluster i, x is the point set of cluster Ci Data points, μ i is the centroid of the i-th cluster. In order to measure the distance from the data point x to the cluster center μ i The distance between points, k-means usually uses Euclidean distance to measure the distance from a point to the cluster center, and its formula is:

[0065]

[0066] Where n is the dimension of the data. The k-means clustering process consists of the following steps: First, K data points are randomly selected as initial screening centers. Then, cluster assignment is performed. For each data point x in the dataset, its characteristic distance to all cluster centers μi is calculated and assigned to the nearest cluster:

[0067]

[0068] Finally, the cluster center is updated and the new center of each cluster is calculated, which is the mean of all points in the cluster:

[0069]

[0070] By repeatedly assigning clusters and updating cluster centers, the data points are finally clustered according to their area size, forming different clusters.

[0071] Step S4: For each cluster, all target areas in the cluster are sorted according to the distances between the target areas in the cluster, and a sorting result with the shortest path traversing all target areas is obtained.

[0072] For each cluster Ci, we calculate the distances between all points within the cluster. We then find a shortest path between these points that can reach all of them simultaneously and in the shortest possible way. This can be considered a traveling salesman problem (TSP). We use a heuristic method to traverse each target area within the cluster and obtain a ranking result that traverses all target areas with the shortest path.

[0073] Step S5: performing target detection on multiple target areas in sequence according to the sorting results.

[0074] It is understandable that after obtaining the sorting results, since each target area (target point) has a unique ID, target detection is performed on multiple target areas in sequence through the sorting results, thereby completing the detection of each target.

[0075] It should be noted that the embodiment of the present application performs edge detection on multiple target images respectively, determines the area of ​​the target area in the target image based on the edge detection results, and clusters the multiple target areas using the area to obtain multiple clusters. For each cluster, all target areas in the cluster are sorted according to the distance between the target areas in the cluster, thereby obtaining a sorting result with the shortest path traversing all target areas, thereby quickly performing target detection on multiple target areas in sequence according to the sorting, and greatly reducing the false detection rate and missed detection rate of target detection, thereby improving the reliability of target detection.

[0076] In some embodiments, performing edge detection on each target image and determining the area of ​​the target region within each target image based on the edge detection result includes:

[0077] Step S201: Perform edge detection on each target image using a local difference operator to obtain a mask of the target area in each target image.

[0078] The embodiment of the present application uses a local difference operator, namely the Roberts operator, to find edges. The difference between two diagonally adjacent pixels is used, so it is also called the quarter difference method. The horizontal and vertical gradients are defined as:

[0079]

[0080] Where, is the gradient, d is the total number of feature dimensions, is the feature vector of the i-th pixel, is the feature vector of the j-th pixel, is the feature vector of the i-th pixel in the k-th feature dimension, is the feature vector of the j-th pixel in the k-th feature dimension.

[0081] Step S202: binarize the mask to obtain a binary mask.

[0082] Step S203: Using the Grabcut algorithm to advance the foreground of the binary mask to obtain the foreground area.

[0083] The Grabcut algorithm is a graph-cut-based image segmentation algorithm that iteratively optimizes foreground and background models to accurately extract the target region. Specifically, a binary mask is used as input to the Grabcut algorithm, initial foreground and background labels are set, and the Gaussian mixture model (GMM) of the foreground and background is iteratively updated until convergence. Ultimately, each pixel is classified as foreground or background based on the converged GMM and the maximum a posteriori probability criterion, making the foreground more complete and eliminating small noise patches, thereby obtaining a precise foreground region.

[0084] Step S204: Determine the area of ​​the target area according to the total number of pixels in the foreground area.

[0085] In some embodiments, for each cluster, all target regions in the cluster are sorted according to the distances between target regions in the cluster to obtain a sorting result with the shortest path traversing all target regions, including:

[0086] Step S401: For each cluster, extract the distance feature vector of each target area in the cluster; wherein the distance feature vector includes the center coordinate point, pixel area and aspect ratio.

[0087] Among them, the distance feature vector can be expressed as:

[0088]

[0089] Where x i ,y i Indicates the center coordinates of the target in the image; S i Represents the pixel area of ​​the target, K i Indicates the aspect ratio of the target.

[0090] Step S402: normalize the distance feature vector to obtain a normalized distance feature vector.

[0091] Among them, normalization can avoid the deviation caused by different units of each feature (such as pixels, area). Its principle is as follows:

[0092]

[0093] Where, is the normalized distance feature vector, 、 are the minimum and maximum values ​​of the distance eigenvector respectively.

[0094] Step S403: arbitrarily select a target area from the cluster as the starting point, and in each iteration, select the unvisited point with the closest feature distance to the currently visited point according to the normalized distance feature vector, until all points are visited to form the current path.

[0095] Since we want the path to be as continuous as possible and the cost of switching shots to be as low as possible, this cost is affected not only by coordinates but also by the size and shape of the target. Therefore, by using the distance feature vector to measure the path cost, we can ensure smooth path changes. This not only minimizes spatial displacement but also minimizes changes in target characteristics (reducing focus time). The characteristic distance is calculated as follows:

[0096]

[0097] Where w k is the weight of each dimension, f i 、f j is the normalized eigenvector of the target, Represents the feature distance between pixels i and j.

[0098] Among them, we start to build the initial path, arbitrarily select a starting point f0, and select the nearest unvisited point of the current point at each step until all points are visited, forming an initial path as the current path P=[f0,f1,f2,……,f n ]:

[0099] .

[0100] Step S404: exchange any two edges in the current path, and determine whether the path after the exchange is shorter than the path before the exchange; wherein the edge is a connecting edge between two adjacent points in the initial path.

[0101] Step S405: If it is determined that the path after the exchange is shorter than the path before the exchange, the path after the exchange is updated as the current path, and any two edges in the current path are exchanged to determine whether the path after the exchange is shorter than the path before the exchange. The iteration stops until the path after the exchange is no longer shorter than the path before the exchange, and the final current path is output.

[0102] Among them, for the current path, for any two edges in the path , to determine whether the path will be shorter after the exchange. The exchange judgment conditions are:

[0103]

[0104] If it holds, the path segments are swapped and the process is repeated until the path cannot be optimized any further.

[0105] Step S406: Determine the sorting results of all target areas in the cluster according to the final current path.

[0106] Among them, according to the final order of each target in the current path, the sorting result of all target areas in the cluster can be determined.

[0107] In some embodiments, target detection is performed on multiple target areas in sequence according to the sorting results, including:

[0108] Step S501: Based on the sorting results, target detection is performed on multiple target areas in sequence through a wide-angle lens, and after each target detection, a target detection score is determined based on the target area obtained by target detection and the expected target area;

[0109] Step S502: Compare the target detection score with a preset confidence threshold;

[0110] Step S503: Determine the initial target detection results of the target areas in all target images according to the comparison results.

[0111] It's important to note that during the initial object detection phase, a wide-angle lens is used to perform preliminary detection of the entire scene. Given that objects in wide-angle images are smaller and lack detail, a lower confidence threshold is intentionally set to reduce missed detections, thereby increasing recall and detecting as many potential objects as possible. While this may result in a certain increase in false detections, it effectively avoids missing key objects.

[0112] For example, in common target detection algorithms, such as the YOLO algorithm, after detecting a target, a score is assigned to evaluate whether the target is the expected target. Based on this score, targets with a confidence level above a certain threshold are selected as the expected targets. In this case, the confidence threshold can be set very low to effectively avoid missing key targets. Generally, the confidence threshold can be set to less than 90%.

[0113] Step S504: review the initial target detection results according to the sorting results through the telephoto lens, and determine the target detection results based on the review results.

[0114] In the embodiments of this application, more refined feature extraction and identification are performed on each potential target, combined with area estimation, sub-target classification, and selection algorithms to further screen out true targets and eliminate falsely detected targets. This hierarchical detection strategy not only ensures a high recall rate, but also effectively reduces the false detection rate through a review mechanism, achieving a good balance between false detection rate and missed detection rate. At the same time, this strategy fully utilizes the advantages of wide-angle and telephoto lenses to improve the overall efficiency and accuracy of target detection.

[0115] By leveraging the high-resolution, detail-rich imaging advantages of telephoto lenses, we can extract finer target features, further evaluate the effectiveness of initial target detection, and accurately eliminate false detections. While maintaining a low missed detection rate, this effectively suppresses the false detection rate, significantly improving target detection accuracy and overall efficiency.

[0116] Based on the same inventive concept, an embodiment of the present application further provides a target detection system in a sparse scene for implementing the target detection method in a sparse scene mentioned above.

[0117] The implementation solution provided by the system to solve the problem is similar to the implementation solution recorded in the above method. Therefore, the specific limitations in the target detection system embodiments in one or more sparse scenarios provided below can be found in the above limitations on the target detection method in sparse scenarios, and will not be repeated here.

[0118] like Figure 3 As shown, the embodiment of the present application provides a target detection system in a sparse scene, including:

[0119] The image acquisition module 100 is used to acquire multiple target images in a sparse scene;

[0120] An area determination module 200 is configured to perform edge detection on each target image and determine the area of ​​the target region within each target image based on the edge detection result;

[0121] The target clustering module 300 is used to cluster multiple target areas according to their areas to obtain multiple clusters;

[0122] The target sorting module 400 is used to sort all target areas in each cluster according to the distances between target areas in the cluster, and obtain a sorting result with the shortest path traversing all target areas;

[0123] The target detection module 500 is used to perform target detection on multiple target areas in sequence according to the sorting results.

[0124] In some embodiments, the area determination module 200 is configured to:

[0125] Perform edge detection on each target image using a local difference operator to obtain a mask of the target area in each target image;

[0126] Binarizing the mask to obtain a binary mask;

[0127] Use Grabcut algorithm to advance the foreground of the binary mask to obtain the foreground area;

[0128] The area of ​​the target region is determined based on the total number of pixels in the foreground region.

[0129] In some embodiments, the target clustering module 300 is configured to:

[0130] Based on the K-means algorithm, the area is selected as the clustering condition of the K-means algorithm, and multiple target areas are clustered to form multiple clusters.

[0131] In some embodiments, the target ranking module 400 is configured to:

[0132] For each cluster, extract the distance feature vector of each target area in the cluster; the distance feature vector includes the center coordinate point, pixel area and aspect ratio;

[0133] Normalizing the distance feature vector to obtain a normalized distance feature vector;

[0134] A target area is randomly selected from the cluster as the starting point, and in each iteration, the unvisited point with the closest feature distance to the currently visited point is selected according to the normalized distance feature vector until all points are visited to form the current path;

[0135] Swap any two edges in the current path and determine whether the path after the swap is shorter than the path before the swap; an edge is a connecting edge between two adjacent points in the initial path;

[0136] If the path after the swap is shorter than the path before the swap, the swapped path is updated as the current path, and any two edges in the current path are swapped to determine whether the swapped path is shorter than the path before the swap. The iteration stops until the swapped path is no longer shorter than the path before the swap, and the final current path is output.

[0137] According to the final current path, the sorting results of all target areas in the cluster are determined.

[0138] In some embodiments, the target detection module 500 is configured to:

[0139] According to the sorting results, target detection is performed on multiple target areas in sequence through a wide-angle lens, and after each target detection, a target detection score is determined based on the target area obtained by target detection and the expected target area;

[0140] Compare the object detection score with a preset confidence threshold;

[0141] Determine initial target detection results for target areas within all target images based on the comparison results;

[0142] The initial target detection results are reviewed according to the sorting results through a telephoto lens, and the target detection results are determined based on the review results.

[0143] like Figure 4 As shown, an embodiment of the present application provides an electronic device, the electronic device 10 includes a memory 20 and a processor 30, the memory 20 stores a computer program, and when the computer program is executed by the processor 30, the processor 30 performs the steps of the target detection method in the sparse scenario as in the above embodiment.

[0144] An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed, the steps of the target detection method in a sparse scenario as described in the above embodiment are implemented.

[0145] An embodiment of the present application provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer performs the steps of the target detection method in a sparse scenario as described in the above embodiment.

[0146] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, electronic devices, computer storage media, and computer program products can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0147] It should be noted that the terms "including" and "having" and any variations thereof in the specification and claims of the present invention and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or are inherent to these processes, methods, products or apparatuses.

[0148] It should be understood that, although the various steps in the flowcharts involved in the above embodiments are shown in sequence as indicated by the arrows, these steps are not necessarily performed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0149] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, electronic devices, computer storage media, computer program products and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0150] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0151] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0152] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for executing all or part of the steps of the method described in each embodiment of the present invention via a computer device (which can be a personal computer, server, or network device, etc.). The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0153] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A target detection method in a sparse scene, characterized in that: include: Acquire multiple target images in sparse scenes; Performing edge detection on each of the target images, and determining the area of ​​the target region within each of the target images according to the edge detection results; Clustering the target areas according to their areas to obtain a plurality of clusters; For each cluster, sort all target areas in the cluster according to the distances between the target areas in the cluster, and obtain a sorting result with the shortest path traversing all target areas; According to the sorting result, target detection is performed on the plurality of target areas in sequence.

2. The target detection method in sparse scenes according to claim 1, characterized in that The acquiring of multiple target images in a sparse scene includes: The target images at different focal lengths in sparse scenes are captured using a wide-angle lens.

3. The target detection method in sparse scenes according to claim 1, characterized in that The performing edge detection on each of the target images and determining the area of ​​the target region within each of the target images according to the edge detection results includes: Performing edge detection on each target image using a local difference operator to obtain a mask of the target area in each target image; performing a binarization process on the mask to obtain a binarized mask; Using Grabcut algorithm to advance the foreground of the binary mask to obtain a foreground area; The area of ​​the target area is determined according to the total number of pixels in the foreground area.

4. The target detection method in sparse scenes according to claim 1, characterized in that The clustering of the plurality of target areas according to the areas to obtain a plurality of clusters includes: Based on the K-means algorithm, the area is selected as a clustering condition of the K-means algorithm, and the plurality of target areas are clustered to form a plurality of clusters.

5. The target detection method in sparse scenes according to claim 1, characterized in that: For each cluster, sorting all target areas in the cluster according to the distances between the target areas in the cluster to obtain a sorting result with the shortest path traversing all target areas includes: For each cluster, extracting a distance feature vector of each target area in the cluster; wherein the distance feature vector includes a center coordinate point, a pixel area, and an aspect ratio; Normalizing the distance feature vector to obtain a normalized distance feature vector; Arbitrarily selecting the target area from the cluster as a starting point, and in each iteration, selecting an unvisited point with the closest feature distance to the currently visited point according to the normalized distance feature vector, until all points are visited to form a current path; Swapping any two edges in the current path, and determining whether the path after the swap is shorter than the path before the swap; wherein the edge is a connecting edge between two adjacent points in the initial path; If it is determined that the path after the swap is shorter than the path before the swap, the swapped path is updated as the current path, and the process of swapping any two edges in the current path is continued to determine whether the path after the swap is shorter than the path before the swap. The iteration stops until the path after the swap is no longer shorter than the path before the swap, and the final current path is output. According to the final current path, a ranking result of all target areas in the cluster is determined.

6. The target detection method in sparse scenes according to claim 1, characterized in that: The step of sequentially performing target detection on the plurality of target areas according to the sorting results includes: According to the ranking results, target detection is performed on the plurality of target areas in sequence through a wide-angle lens, and after each target detection, a target detection score is determined based on the target area obtained by the target detection and the expected target area; Comparing the target detection score with a preset confidence threshold; Determine initial target detection results for target areas within all target images based on the comparison results; The initial target detection result is reviewed according to the sorting result through a telephoto lens, and the target detection result is determined based on the review result.

7. A target detection system in a sparse scene, characterized in that: include: An image acquisition module is used to acquire multiple target images in sparse scenes; an area determination module, configured to perform edge detection on each of the target images and determine the area of ​​the target region within each of the target images according to the edge detection result; A target clustering module, configured to cluster the target regions according to their areas to obtain a plurality of clusters; A target sorting module is used to sort all target areas in each cluster according to the distances between the target areas in the cluster, and obtain a sorting result with the shortest path traversing all target areas; The target detection module is used to perform target detection on the plurality of target areas in sequence according to the sorting result.

8. An electronic device, characterized in that: The electronic device includes a memory and a processor, wherein a computer program is stored in the memory. When the computer program is executed by the processor, the processor performs the steps of the target detection method in a sparse scene according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed, the steps of the target detection method in a sparse scene according to any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The computer program product includes a computer program stored on a non-transitory computer-readable storage medium, wherein the computer program includes program instructions, wherein when the program instructions are executed by a computer, the computer performs the steps of the target detection method in a sparse scene according to any one of claims 1 to 6.