Target filtering method, device, equipment, storage medium and program product

By filtering targets according to preset conditions in the target detection algorithm, the problem of false positives in complex scenarios is solved, and the accuracy and adaptability of target detection are improved.

CN115601534BActive Publication Date: 2026-05-15GUANGZHOU ANYKA MICROELECTRONICS CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGZHOU ANYKA MICROELECTRONICS CO LTD
Filing Date
2022-11-07
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing object detection algorithms suffer from false positives in complex scenarios, resulting in low accuracy of detection results.

Method used

By obtaining the initial target detection results and filtering the targets according to preset conditions, including judgments on size, position, features and motion patterns, positive and negative sample sets are established to retain or filter the targets, and the filtered target detection results are obtained.

Benefits of technology

It effectively reduces false positives in target detection results, improves the accuracy of target detection results, reduces the complexity of the filtering process, and improves adaptability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115601534B_ABST
    Figure CN115601534B_ABST
Patent Text Reader

Abstract

The application relates to a target filtering method, device, equipment, storage medium and program product. The method comprises the following steps: obtaining an initial target detection result; performing filtering processing on at least one target according to a preset condition to obtain a filtered target detection result; and the preset condition is determined according to at least one of the size, position, feature and motion law of the target. By using the method, the target detection result of an image can be further filtered according to the preset condition, the false positive target is reduced, and the accuracy of the target detection result is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of machine vision technology, and in particular to a target filtering method, apparatus, device, storage medium, and program product. Background Technology

[0002] Object detection is one of the fundamental tasks in the field of machine vision. It can determine whether there are one or more categories of objects in a scene and determine their location in the scene.

[0003] Currently, object detection algorithms often employ deep neural network models. However, existing object detection algorithms still suffer from false positives when applied to complex scenarios, resulting in low accuracy of the object detection results. Summary of the Invention

[0004] This application provides a target filtering method, apparatus, device, storage medium, and program product, which can further filter the target detection results of an image based on preset conditions to reduce false target detections.

[0005] Firstly, this application provides a target filtering method. The method includes:

[0006] Obtain the initial target detection results;

[0007] At least one target is filtered according to preset conditions to obtain the filtered target detection result; the preset conditions are determined based on at least one of the target's size, position, features and motion laws.

[0008] In one embodiment, the preset conditions include preset retention conditions. Filtering at least one target according to the preset conditions to obtain filtered target detection results includes: for each target, if it is determined that the target meets the preset retention conditions, then the target is determined as a retained target; filtering targets other than the retained targets is performed to obtain filtered target detection results.

[0009] In one embodiment, the target filtering method further includes: comparing the target with positive samples in the positive sample set; if there are positive samples in the positive sample set that match the target size and motion pattern, then the target is determined to meet the preset retention conditions.

[0010] In one embodiment, the process of establishing a positive sample set includes: traversing multiple consecutive frames of target detection results and determining the number of frames with the same target based on the multiple frames of target detection results; if the number of frames is greater than a first preset frame number threshold and the position of the target detection results with the same target conforms to a preset rule, then the target is determined as a positive sample; and a positive sample set is established based on the positive samples.

[0011] In one embodiment, the preset retention conditions include a preset size, and the method further includes: for each target, if the size of the target matches the preset size, then the target is determined to meet the preset retention conditions.

[0012] In one embodiment, the preset size includes preset width and height dimensions; if the size of the target matches the preset size, then the target is determined to meet the preset retention conditions, including: if the width and height dimensions of the target match the preset width and height dimensions, then the target is determined to meet the preset retention conditions.

[0013] In one embodiment, the preset size includes a preset aspect ratio; if the size of the target matches the preset size, then the target is determined to meet the preset retention conditions, including: if the aspect ratio of the target matches the preset aspect ratio, then the target is determined to meet the preset retention conditions.

[0014] In one embodiment, the target filtering method further includes: for each target, determining the overlapping area between the feature region of the target and the region where the target is located; if the ratio of the overlapping area to the region where the target is located is greater than a second preset ratio, and the feature region is within a preset area range on the target, then the target is determined to meet the preset retention conditions.

[0015] In one embodiment, the target filtering method further includes: determining the motion region in the image corresponding to the target; for each target, determining the overlapping region between the target's region and the motion region; if the ratio of the overlapping region to the target's region is greater than a first preset ratio, then determining that the target meets the preset retention conditions.

[0016] In one embodiment, the preset conditions include preset filtering conditions. Filtering at least one target according to the preset conditions to obtain a filtered target detection result includes: for each target, if it is determined that the target meets the preset filtering conditions, then the target is identified as a filtered target; filtering the filtered target to obtain a filtered target detection result.

[0017] In one embodiment, the target filtering method further includes: comparing the target with historical targets in the target detection result set of historical time periods; if there are historical targets in the target detection result set of historical time periods that match the target size and motion pattern, then comparing the target with negative samples in the negative sample set; if there are negative samples in the negative sample set that match the target size and motion pattern, then determining that the target meets the preset filtering conditions.

[0018] In one embodiment, the process of establishing a negative sample set includes: traversing multiple consecutive frames of target detection results, and determining candidate samples with matching size and motion patterns that meet the static condition based on the multiple frames of target detection results; determining the number of frames with candidate samples based on the multiple frames of target detection results; if the number of frames is greater than a second preset frame number threshold, then the candidate sample is determined as a negative sample; and establishing a negative sample set based on the negative samples.

[0019] In one embodiment, the target filtering method further includes: for each target, determining the overlapping area between the region of interest and the region where the target is located; if the ratio of the overlapping area to the region where the target is located is less than a third preset ratio, then determining that the target meets the preset filtering conditions.

[0020] Secondly, this application also provides a target filtering device. The device includes:

[0021] The acquisition module is used to obtain the initial target detection results;

[0022] The filtering module is used to filter at least one target according to preset conditions to obtain the filtered target detection result; the preset conditions are determined based on at least one of the target's size, position, features and motion laws.

[0023] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:

[0024] Obtain the initial target detection results;

[0025] At least one target is filtered according to preset conditions to obtain the filtered target detection result; the preset conditions are determined based on at least one of the target's size, position, features, and motion patterns.

[0026] Fourthly, this application also provides a computer-readable storage medium. This computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:

[0027] Obtain the initial target detection results;

[0028] At least one target is filtered according to preset conditions to obtain the filtered target detection result; the preset conditions are determined based on at least one of the target's size, position, features, and motion patterns.

[0029] Fifthly, this application also provides a computer program product. This computer program product includes a computer program that, when executed by a processor, performs the following steps:

[0030] Obtain the initial target detection results;

[0031] At least one target is filtered according to preset conditions to obtain the filtered target detection result; the preset conditions are determined based on at least one of the target's size, position, features, and motion patterns.

[0032] This application provides a target filtering method, apparatus, device, storage medium, and program product. After the target detection algorithm performs target detection on an image to obtain an initial target detection result, it further filters the targets in the initial target detection result according to preset conditions, filtering out targets that do not meet the preset conditions, thereby obtaining a filtered target detection result. This effectively reduces false positive targets in the target detection result and improves the accuracy of the target detection result. Attached Figure Description

[0033] Figure 1 This is a diagram illustrating the application environment of a target filtering method in one embodiment;

[0034] Figure 2 This is another flowchart illustrating the target filtering method in one embodiment;

[0035] Figure 3 This is another flowchart illustrating the target filtering method in one embodiment;

[0036] Figure 4 This is another flowchart illustrating the target filtering method in one embodiment;

[0037] Figure 5 This is another flowchart illustrating the target filtering method in one embodiment;

[0038] Figure 6 This is another flowchart illustrating the target filtering method in one embodiment;

[0039] Figure 7 This is another flowchart illustrating the target filtering method in one embodiment;

[0040] Figure 8 This is another flowchart illustrating the target filtering method in one embodiment;

[0041] Figure 9 This is another flowchart illustrating the target filtering method in one embodiment;

[0042] Figure 10 This is another flowchart illustrating the target filtering method in one embodiment;

[0043] Figure 11 This is another flowchart illustrating the target filtering method in one embodiment;

[0044] Figure 12 This is a structural block diagram of a target filtering device in one embodiment. Detailed Implementation

[0045] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0046] The target filtering method provided in this application embodiment can be applied to, for example... Figure 1 The server shown includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data related to the target filtering method described in this embodiment. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a target filtering method. The server can be implemented using a standalone server or a server cluster consisting of multiple servers.

[0047] Those skilled in the art will understand that Figure 1 The structure shown is merely a block diagram of a portion of the structure related to the solution of this application and does not constitute a limitation on the server to which the solution of this application is applied. A specific server may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0048] In one embodiment, such as Figure 2 As shown, a target filtering method is provided, which is applied to... Figure 1 Taking the server in the example, the following steps are included:

[0049] Step 101: Obtain the initial target detection results;

[0050] The initial target detection result is the target detection result obtained by processing the image with a traditional target detection algorithm, which includes at least one target detected by the target detection algorithm.

[0051] In this embodiment of the application, when the target detection device uses a target detection algorithm to perform target detection processing on the image, after obtaining the target detection result, the target detection result can be directly sent to the server so that the server can obtain the initial target detection result.

[0052] The target detection device can be a terminal or a server as described in this application embodiment.

[0053] Step 102: Filter at least one target according to preset conditions to obtain the filtered target detection result; the preset conditions are determined based on at least one of the target's size, position, features, and motion patterns.

[0054] For a single frame of target detection results, the size can be the actual size of the target (e.g., width and height) or the aspect ratio of the target; the position can be the location of the target in the image; and the feature can be the key parts of the target. For example, if the target is a person, the feature can be a face.

[0055] For target detection results across multiple frames, the size can be the size difference of the same target in different frames; the motion pattern can be the distance the same target moves in different frames.

[0056] In this embodiment of the application, after the server obtains the initial target detection result, it can traverse each target in the initial target detection result, and then determine whether each target meets the preset conditions according to the preset conditions, filter out the targets that do not meet the preset conditions, and obtain the filtered target detection result.

[0057] For example, when the preset conditions are determined by the size of the target, the server can determine whether the size of each target is within the preset size range, filter out targets whose size is not within the preset size range, and obtain the filtered target detection results.

[0058] For example, when the preset conditions are determined by the location of the target, the server can determine whether each target is within a preset region of interest in the image, filter out targets that are not located within the preset region of interest, and obtain the filtered target detection results.

[0059] For example, when the preset conditions are determined by features, the server can determine whether the features of each target are within a preset area on the target. Targets whose features are within the preset area are retained to avoid being filtered out, thus obtaining the processed target detection result. For example, if the target is a person and the feature is a face, targets whose faces are within the upper body area of ​​the person are retained.

[0060] For example, when the preset conditions are determined by motion laws, the server can determine whether the actual movement distance of each target between any two frames is within the preset distance range based on the target detection results of multiple frames, filter out targets whose movement distance is not within the preset distance range, and obtain the filtered target detection results.

[0061] In this embodiment, for each target in the initial target detection result, the server can also determine whether each target meets the preset conditions according to preset conditions, and filter out the targets that meet the preset conditions to obtain the filtered target detection result. Specifically, whether to filter targets that meet the preset conditions or targets that do not meet the preset conditions can be adjusted according to different preset conditions, and this application does not limit this.

[0062] The target filtering method provided in this application embodiment can further filter the targets in the initial target detection result according to preset conditions after the target detection algorithm performs target detection on the image to obtain the initial target detection result, and filter out the targets that do not meet the preset conditions to obtain the filtered target detection result, thereby effectively reducing the false targets in the target detection result and improving the accuracy of the target detection result.

[0063] The embodiments described above introduced a scheme for filtering targets based on preset conditions. In another embodiment of this application, the preset conditions may include preset retention conditions and preset filtering conditions. When the preset condition is a preset retention condition, the embodiments of this application filter targets that do not meet the preset retention conditions. Specifically, this includes, for example... Figure 3 The steps shown are as follows:

[0064] Step 201: For each target, if it is determined that the target meets the preset retention conditions, then the target is determined as a retained target;

[0065] Step 202: Filter the targets other than the retained targets to obtain the filtered target detection results.

[0066] In this embodiment, the preset conditions can be divided into preset retention conditions and preset filtering conditions according to specific preset conditions. For example, when the preset conditions are determined by size or motion law, the preset conditions can be preset retention conditions.

[0067] In this embodiment of the application, when the server traverses each target in the initial target detection result, it can determine whether each target meets the preset retention conditions, determine the target that meets the preset retention conditions as the retained target, and filter the targets in the initial target detection result other than the retained targets to obtain the filtered target detection result, that is, the detection result corresponding to the retained target.

[0068] For example, when the preset conditions are determined by size, the server can identify targets whose size is within the preset size range as retained targets, and filter targets outside the retained targets (i.e. targets whose size is not within the preset size range) to obtain the filtered target detection results.

[0069] For example, when the preset conditions are determined by motion laws, the server can determine targets whose actual movement distance between any two frames is within a preset distance range as retained targets based on the target detection results of multiple frames, and filter targets other than retained targets (i.e. targets whose movement distance is not within the preset distance range) to obtain filtered target detection results.

[0070] The target filtering method provided in this application can filter targets in the initial target detection results using preset conditions as preset retention conditions. Targets that meet the preset retention conditions are identified as retained targets, and targets other than the retained targets in the target detection results are filtered to obtain filtered target detection results. This application embodiment can filter targets in the initial target detection results according to specific preset conditions, reducing the complexity of the target filtering process and improving the adaptability of the target filtering method.

[0071] This application provides various target filtering methods. In practical applications, any one or more methods can be selected to filter targets in the target detection results.

[0072] In one embodiment, one target filtering method may be to directly compare the targets in the target detection results with positive samples in a pre-established positive sample set, and filter out targets that do not match. Specifically, this includes, for example... Figure 4 The steps shown are as follows:

[0073] Step 301: Compare the target with the positive samples in the positive sample set;

[0074] The positive sample set can be a set of targets that meet the preset retention conditions.

[0075] In this embodiment, when the image consists of multiple frames and the initial target detection result is the target detection result corresponding to the multiple frames, the server can select positive samples and establish a positive sample set during the filtering process of the target detection result of each frame. In subsequent target filtering processes, the server can directly compare the target with the positive samples in the positive sample set.

[0076] Step 302: If there are positive samples in the positive sample set that match the target size and motion pattern, then the target is determined to meet the preset retention conditions.

[0077] Among them, size matching can be that the size difference between the target size and the positive sample size is less than a first preset threshold; motion pattern matching can be that the actual distance between the target and the positive sample is greater than a second preset threshold and less than a third preset threshold.

[0078] In this embodiment of the application, the comparison between the target and the positive samples in the positive sample set can be to determine whether the size of the target matches the size of the positive sample and whether the motion pattern of the target matches the motion pattern of the positive sample. When the size and motion pattern of the target match the positive sample, the target is determined to meet the preset retention conditions.

[0079] Because image acquisition devices acquire multiple frames quickly, the actual movement distance of the same target between any two consecutive frames, or between two frames acquired at similar times, is small and should be less than the third preset threshold. Furthermore, since falsely detected targets (targets that do not meet the preset retention conditions and need to be filtered) exhibit small positional shifts across multiple frames, the movement distance of the same target between any two consecutive frames should also be greater than the aforementioned small positional shift value, i.e., greater than the second preset threshold, to avoid identifying the same target as a falsely detected target and filtering it out.

[0080] Therefore, when the size difference between the target size and the positive sample size is less than the first preset threshold, and the actual distance between the target and the positive sample is greater than the second preset threshold and less than the third preset threshold, it can be determined that the target and the positive sample are the same target. Therefore, it can be directly determined that the target meets the preset retention conditions.

[0081] The process of establishing the aforementioned positive sample set includes, for example: Figure 5 The steps shown are as follows:

[0082] Step 401: Traverse multiple consecutive target detection results and determine the number of frames with the same target based on the multiple target detection results;

[0083] Step 402: If the number of frames is greater than the first preset frame number threshold, and the positions of the target detection results with the same target conform to the preset rules, then the target is determined as a positive sample.

[0084] Step 403: Establish a positive sample set based on the positive samples.

[0085] In this embodiment of the application, after the server obtains the target detection results of multiple consecutive frames, it can traverse the obtained target detection results of multiple consecutive frames, and then determine the targets in each frame whose size difference is less than a first preset threshold as the same target, and determine the number of frames with the same target.

[0086] For example, after the server obtains target detection results for 7 consecutive frames, it can iterate through these 7 frames. If it determines that there is a target in the 2nd frame whose size difference with a target in the 1st frame is less than a fourth preset threshold, then the target in the 2nd frame and the target in the 1st frame are determined to be the same target. The server continues to iterate, and if it determines that there is a target in the 4th, 5th, and 6th frames whose size difference with a target in the 1st frame is less than the fourth preset threshold, then the corresponding targets in the 1st, 2nd, 4th, 5th, and 6th frames are determined to be the same target. The number of frames containing the same target is 5.

[0087] When the server determines that the number of frames containing the same target in the multi-frame detection results is greater than a first preset frame number threshold, it then judges the position of each frame containing the same target. If the positions of the frames containing the same target conform to a preset rule, then the same target is determined as a positive sample. The server puts all the positive samples determined during the multi-frame traversal into the positive sample set, thereby realizing the establishment of the positive sample set.

[0088] The positions of frames containing the same target conforming to a preset rule can be either consecutive frames or a set of consecutive frames. That is, the number of frames containing the same target can be discontinuous, but the number of discontinuities is less than or equal to 1. For example, in the example above, the positions of the frames containing the same target are frames 1, 2, 4, 5, and 6, with a break in frame 3, and the number of discontinuities is 1. Therefore, the server can identify the frames containing the same target as positive samples and add them to the positive sample set.

[0089] In the case of multi-frame detection, the method provided in this application allows the server to establish a positive sample set during the filtering process of target detection results for each frame. In subsequent target filtering processes, the target can be directly compared with the positive samples in the positive sample set. When a target matches a positive sample, the target is determined to meet preset retention conditions. The method provided in this application reduces the complexity of the target filtering process and improves the efficiency of target filtering.

[0090] In one embodiment, when the preset retention condition includes a preset size, one of the various target filtering methods provided in this application embodiment can be to filter targets whose size does not conform to the preset size in the target detection results. Specifically, this includes:

[0091] For each target, if the target's size matches the preset size, then the target is determined to meet the preset retention conditions.

[0092] In this embodiment, targets in the target detection results can be filtered by size. The server can preset a size range, and then traverse each target in the target detection results. If the size of a target is within the preset size range, then the target is determined to meet the preset retention conditions.

[0093] The dimensions can include the width and height dimensions and the aspect ratio.

[0094] Correspondingly, when the preset size is the preset width and height, the target filtering method is to determine that the target meets the preset retention conditions if the target's width and height match the preset width and height.

[0095] In this embodiment, the server first presets a width and height range, and then determines the actual width and height of each target in the target detection result using a preset algorithm and the parameters of the image acquisition device. Next, it determines whether the actual width and height of each target is within the preset range. If the actual width and height of a target is within the preset range, then the target is determined to meet the preset retention conditions.

[0096] Correspondingly, when the preset size is the preset aspect ratio, the target filtering method is to determine that the target meets the preset retention conditions if the aspect ratio of the target matches the preset aspect ratio.

[0097] In this embodiment, the server first presets a width-to-height range, and then determines the width-to-height ratio of the target detection box corresponding to each target in the target detection results as the target's width-to-height ratio. Next, it determines whether the width-to-height ratio of each target is within the preset width-to-height range. If the target's width-to-height ratio is within the preset width-to-height range, then it is determined that the target meets the preset retention conditions.

[0098] The method provided in this application embodiment can use size as a preset condition, and determine targets whose size is within the preset size range in the target detection results as retained targets. Targets other than the retained targets are then filtered to obtain filtered target detection results. This application embodiment can filter out targets that do not meet the preset size condition, thereby effectively reducing false positives in the target detection results and improving the accuracy of the target detection results.

[0099] In one embodiment, among the various target filtering methods provided in this application, one method may involve first determining the location of the key parts of the target, and then retaining targets whose key parts locations conform to conventional methods. Specifically, this includes, for example... Figure 6 The steps shown are as follows:

[0100] Step 501: For each target, determine the overlapping area between the target's feature region and the region where the target is located;

[0101] Step 502: If the ratio of the overlapping area to the target area is greater than the second preset ratio, and the feature area is outside the preset area range on the target, then the target is determined to meet the preset filtering conditions.

[0102] In this embodiment, when the server acquires the target detection result from the image acquisition device, it can simultaneously acquire the target's feature detection result. For example, when the target is a person, the server can simultaneously acquire the face detection result. The server can then determine the overlapping area between the feature region and the target region, and determine the ratio of the overlapping area to the target region. If the ratio is greater than a second preset ratio, the feature is determined to be a feature of the target.

[0103] The server can then determine whether the features of the target are within a preset area using parameters such as the center point position and the vertex position of the detection box. For example, it can determine whether the face is above the person's shoulders. If the feature area is determined to be within the preset area of ​​the target, then the target is determined to meet the preset retention conditions.

[0104] The method provided in this application embodiment can use features as preset conditions to determine targets in the target detection results whose feature regions are within a preset expected range as retained targets, avoiding filtering of retained targets and obtaining filtered target detection results. This application embodiment can retain targets that meet preset feature conditions, avoiding filtering, thereby effectively reducing false positive targets in the target detection results and improving the accuracy of target detection results.

[0105] When the target filtering method provided in this application is applied to moving target detection, one of the various target filtering methods provided in this application can be to filter targets that are not moving. Specifically, this includes, for example... Figure 7 The steps shown are as follows:

[0106] Step 601: Determine the motion region in the image corresponding to the target;

[0107] Step 602: For each target, determine the overlapping area between the target's location area and the movement area;

[0108] Step 603: If the ratio of the overlapping area to the target area is greater than the first preset ratio, then the target is determined to meet the preset retention conditions.

[0109] In this embodiment of the application, the server can determine the motion region in the image through a motion detection algorithm, and then, for each target in the target detection result, determine the overlapping region between the region where each target is located (which may be the region corresponding to the target detection box) and the motion region. Then, determine the ratio of the overlapping region corresponding to each target to the region where the target is located, and compare the ratio with a first preset ratio.

[0110] Since the size of the overlap between the target's location area and the movement area reflects whether the target is moving, the overlap is larger when the target is moving and smaller when the target is stationary. Therefore, if the ratio is greater than a first preset ratio, the target is determined to be moving and meets the preset retention criteria; if the ratio is less than the first preset ratio, the target is determined to be stationary and is filtered out.

[0111] The method provided in this application embodiment can, for moving targets, use the size of the overlapping area between the target's location and the moving area as a preset condition, and determine targets whose overlapping area ratio is greater than a first preset ratio as retained targets. Targets other than the retained targets are then filtered to obtain filtered target detection results. This application embodiment can filter out stationary targets by using the overlapping area with the moving area, thereby effectively reducing false positives in the target detection results and improving the accuracy of the target detection results.

[0112] The embodiments described above introduce a scheme for filtering targets based on preset conditions. These preset conditions may include preset retention conditions and preset filtering conditions. When the preset condition is a preset filtering condition, this embodiment directly filters targets that meet the preset filtering conditions. Specifically, this includes... Figure 8 The steps shown are as follows:

[0113] Step 701: For each target, if it is determined that the target meets the preset filtering conditions, then the target is determined as the filtering target;

[0114] Step 702: Filter the target to obtain the filtered target detection result.

[0115] In this embodiment, preset conditions can be divided into preset retention conditions and preset filtering conditions based on specific preset conditions. For example, when preset conditions are determined by position, features, or motion patterns, preset conditions can be preset filtering conditions.

[0116] In this embodiment of the application, when the server traverses each target in the initial target detection result, it can determine whether each target meets the preset filtering conditions, determine the targets that meet the preset filtering conditions as filtering targets, and perform filtering processing on the filtering targets in the initial target detection result to obtain the filtered target detection result.

[0117] For example, when the preset conditions are determined by location, the server can identify targets whose locations are outside the preset region of interest as filtering targets, perform filtering on the filtering targets, and obtain the filtered target detection results.

[0118] For example, when the preset conditions are determined by features, the server can identify targets whose feature locations are not within the preset feature area as filtering targets, perform filtering processing on the filtering targets, and obtain the filtered target detection results.

[0119] The target filtering method provided in this application can use preset conditions as preset filtering conditions to filter targets in the initial target detection results. Targets that meet the preset filtering conditions are identified as filtered targets, and the filtered targets in the target detection results are then filtered to obtain the filtered target detection results. This application embodiment can filter targets in the initial target detection results according to specific preset conditions, reducing the complexity of the target filtering process and improving the adaptability of the target filtering method.

[0120] In one embodiment, when the target filtering method is applied to moving target detection, but there are targets that are far from the image acquisition device, one of the various target filtering methods provided in this application embodiment can be to compare the target with negative samples in a pre-established negative sample set, and filter the matching targets. Specifically, this includes, for example... Figure 9 The steps shown are as follows:

[0121] Step 801: Compare the target with historical targets in the target detection result set for historical time periods;

[0122] During image acquisition, some targets are far away from the image acquisition device. Therefore, the image of this type of target is small in the image, and the image acquisition device can not capture this type of target in every frame.

[0123] In this embodiment of the application, when the server traverses the targets in the initial target detection results of the current frame, it can compare the target with the historical targets in the target detection result set of the historical time period. For example, it can compare the target with each target in the target detection result set of the previous dozen frames. If there is a historical target whose size matches the target of the current frame, and the number of frames with the historical target is not continuous, then the target of the current frame is determined to be a target that is far away from the image acquisition device.

[0124] For example, when the server iterates through the targets in the initial target detection results of frame 16, it can compare the target with the historical targets in the target detection result set of frames 1-15. If there are historical targets in frames 1, 7, and 12 whose target size matches that of frame 16, then the target in frame 16 is determined to be a target that is far away from the image acquisition device.

[0125] Step 802: If there is a historical target in the target detection result set that matches the target size and motion pattern, then compare the target with the negative samples in the negative sample set.

[0126] The negative sample set can be a set of targets that meet preset filtering conditions. For example, when the target filtering method provided in this application is applied to moving target detection, the negative sample set can be a set of stationary targets.

[0127] In this embodiment, when the image consists of multiple frames and the initial target detection result is the target detection result corresponding to the multiple frames, the server can select negative samples and establish a negative sample set during the filtering process of the target detection result of each frame. In subsequent target filtering processes, for targets that are far away from the image acquisition device, the server can directly compare the target with the negative samples in the negative sample set.

[0128] Step 803: If there are negative samples in the negative sample set that match the target size and motion pattern, then the target is determined to meet the preset filtering conditions.

[0129] Among them, size matching can be defined as the size difference between the target size and the negative sample size being less than a first preset threshold; motion pattern matching can be defined as the actual distance between the target and the negative sample being less than a third preset threshold.

[0130] In this embodiment of the application, the comparison between the target and the negative sample in the negative sample set can be to determine whether the size of the target matches the size of the negative sample and whether the motion pattern of the target matches the motion pattern of the negative sample. When both the size and motion pattern of the target match the negative sample, it is determined that the target and the matched negative sample are the same target, and the target meets the preset filtering conditions.

[0131] The process of establishing the aforementioned negative sample set includes, for example: Figure 10 The steps shown are as follows:

[0132] Step 901: Traverse multiple consecutive frames of target detection results, and determine candidate samples whose size matches and whose motion patterns conform to the static condition based on the multiple frames of target detection results;

[0133] Step 902: Determine the number of frames with candidate samples based on the multi-frame target detection results;

[0134] Step 903: If the number of frames is greater than the second preset frame number threshold, then the candidate sample is determined as a negative sample;

[0135] Step 904: Establish a negative sample set based on the negative samples.

[0136] In this embodiment, after obtaining target detection results for multiple consecutive frames, the server can iterate through these frames and identify targets in each frame whose size difference is less than a first preset threshold as the same target. Then, the server determines the distance between two consecutive frames for the same target, and the distance between the first and last frames. When both distances are less than a fourth preset threshold, the target is identified as a candidate sample meeting the stationary condition, and the number of frames containing the candidate sample is determined. When the server determines that the number of frames containing the candidate sample in the multi-frame detection results is greater than a second preset frame number threshold, the candidate sample is identified as a negative sample. The server then places all negative samples identified during the multi-frame traversal into a negative sample set, thereby establishing the negative sample set.

[0137] For example, after the server obtains target detection results for 10 consecutive frames, it can iterate through these 10 frames. If it is determined that there is a target in each of the 1st, 2nd, 4th, 5th, 6th, 8th, and 10th frames, and the size difference is less than a first preset threshold, then the corresponding targets in the above 8 frames are identified as the same target. Then, the distances between the target and the 1st and 2nd frames, the 2nd and 4th frames, the 4th and 5th frames, the 5th and 6th frames, the 6th and 8th frames, the 8th and 10th frames, and the 1st and 10th frames are determined. When all distances are less than a preset threshold, the target is identified as a candidate sample that meets the static condition, and the number of frames containing this candidate sample is determined to be 8. Since this number of frames is greater than a second preset frame number threshold, the candidate sample is identified as a negative sample, thereby establishing a negative sample set.

[0138] In the case of multi-frame detection, the method provided in this application allows the server to establish a negative sample set during the filtering process of target detection results for each frame. In subsequent target filtering processes, the target can be directly compared with the negative samples in the negative sample set. When a target and a negative sample match, the target is determined to meet the preset filtering conditions. The method provided in this application reduces the complexity of the target filtering process and improves the efficiency of target filtering. Furthermore, the target filtering method provided in this application can be applied to filtering targets at considerable distances, improving the adaptability of the target filtering method.

[0139] In one embodiment, when the server establishes a positive sample set and a negative sample set during the target filtering process for multiple frames of images, during the update of the positive sample set, the candidate positive sample (the target to be updated to the positive sample set) is first compared with the negative sample in the negative sample set. If it is determined that there is no negative sample that matches the candidate positive sample, the candidate positive sample is then updated to the positive sample set as a positive sample. If it is determined that there is a negative sample that matches the candidate positive sample, the candidate positive sample is filtered out.

[0140] For example, as illustrated in the example of the positive sample set above, after the server obtains the target detection results of 7 consecutive frames, it can iterate through these 7 frames. When it is determined that there is a target in the 2nd frame, and the size difference between this target and a target in the 1st frame is less than a fourth preset threshold, then the target in the 2nd frame and the target in the 1st frame are determined to be the same target, and this target is taken as a temporary target.

[0141] The server continues its iteration. When it determines that a target in frame 4 has a size difference less than a fourth preset threshold and a distance less than a preset distance threshold with the target in frame 2, it determines that the target in frame 4 and the corresponding targets in frames 1 and 2 are the same target, i.e., all are temporary targets. Then, it compares the target in frame 4 with the negative samples in the negative sample set. If a negative sample matches the target in frame 4, the temporary sample set is deleted, and the target is filtered out; if no negative sample matches the target in frame 4, the target in frame 4 is added to the temporary sample set, and the server continues its iteration.

[0142] If, in frame 5, a target is found whose size difference with a target in frame 4 is less than a fourth preset threshold, and whose distance is less than a preset distance threshold, then the target in frame 5 is determined to be the same target as the corresponding targets in frames 1, 2, and 4; that is, all are temporary targets. Then, the target in frame 5 is compared with negative samples in the negative sample set. If a negative sample matches the target in frame 5, the temporary sample set is deleted, and the target is filtered out. If no negative sample matches the target in frame 5, the target in frame 5 is added to the temporary sample set, and the server continues traversing.

[0143] If, in frame 6, a target is found whose size difference with a target in frame 5 is less than a fourth preset threshold, and whose distance is less than a preset distance threshold, then the target in frame 6 is determined to be the same target as the corresponding targets in frames 1, 2, 4, and 5; that is, all are temporary targets. Then, the target in frame 6 is compared with negative samples in the negative sample set. If a negative sample matches the target in frame 6, the temporary sample set is deleted, and the target is filtered out; if no negative sample matches the target in frame 6, the target in frame 6 is added to the temporary sample set. If the server determines that the number of temporary samples in this temporary sample set is 5, which is greater than a first preset frame number threshold, then the temporary target can be identified as a positive sample and updated to the positive sample set.

[0144] In the process of determining a positive sample, this embodiment can also compare the sample with negative samples in the negative sample set. Only when no matching negative sample exists in the negative sample set will the server determine the sample as a positive sample and update it to the positive sample set. This improves the accuracy of the positive sample set and further enhances the accuracy of the target filtering method based on the positive sample set.

[0145] In one embodiment, among the various target filtering methods provided in this application, one target filtering method can be to filter targets that are not within the region of interest. Specifically, this includes, for example... Figure 11 The steps shown are as follows:

[0146] Step 1001: For each target, determine the overlapping area between the region of interest and the region where the target is located;

[0147] Step 1002: If the ratio of the overlapping area to the target area is less than the third preset ratio, then the target is determined to meet the preset filtering conditions.

[0148] In this embodiment, the server can preset a region of interest (ROI) within the area captured by the image acquisition device, excluding areas where no target exists from the ROI. For example, when the target is a person, the sky area is excluded from the ROI, and the remaining area is used as the ROI.

[0149] The server can then determine the overlapping area between the target region and the region of interest, as well as the ratio of the overlapping area to the target region. If the ratio is less than a third preset ratio, the target is determined to be outside the region of interest, and therefore, the target meets the preset filtering conditions.

[0150] The method provided in this application embodiment can use a region of interest (ROI) as a preset condition to identify targets located outside the ROI in the target detection results as filtered targets. Filtering these targets yields a filtered target detection result. This application embodiment can filter out targets that do not meet the location feature conditions, thereby effectively reducing false positives in the target detection results and improving the accuracy of the target detection results.

[0151] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0152] Based on the same inventive concept, this application also provides a target filtering device for implementing the target filtering method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more target filtering device embodiments provided below can be found in the limitations of the target filtering method described above, and will not be repeated here.

[0153] In one embodiment, such as Figure 12 As shown, a target filtering device is provided, including: an acquisition module 1101 and a filtering module 1102, wherein:

[0154] The acquisition module 1101 is used to acquire the initial target detection results;

[0155] The filtering module 1102 is used to filter the at least one target according to preset conditions to obtain a filtered target detection result; the preset conditions are determined according to at least one of the target's size, position, features and motion laws.

[0156] In one embodiment, the preset conditions include preset retention conditions. The filtering module 1102 is specifically used to determine the target as a retained target if it is determined that the target meets the preset retention conditions; and to filter the targets other than the retained targets to obtain the filtered target detection results.

[0157] In one embodiment, the target filtering device is further configured to compare the target with positive samples in the positive sample set; if there are positive samples in the positive sample set that match the target size and motion pattern, then the target is determined to meet the preset retention conditions.

[0158] In one embodiment, the process of establishing a positive sample set includes: traversing multiple consecutive frames of target detection results and determining the number of frames with the same target based on the multiple frames of target detection results; if the number of frames is greater than a first preset frame number threshold and the position of the target detection results with the same target conforms to a preset rule, then the target is determined as a positive sample; and a positive sample set is established based on the positive samples.

[0159] In one embodiment, the preset retention conditions include a preset size, and the target filtering device is further configured to determine that a target meets the preset retention conditions if the size of the target matches the preset size.

[0160] In one embodiment, the preset size includes preset width and height dimensions; the target filtering device is further configured to determine that the target meets preset retention conditions if the width and height dimensions of the target match the preset width and height dimensions.

[0161] In one embodiment, the preset size includes a preset aspect ratio; the target filtering device is further configured to determine that the target meets the preset retention conditions if the aspect ratio of the target matches the preset aspect ratio.

[0162] In one embodiment, the target filtering device is further configured to determine, for each target, the overlapping area between the feature region of the target and the area where the target is located; if the ratio of the overlapping area to the area where the target is located is greater than a second preset ratio, and the feature region is within a preset area range on the target, then the target is determined to meet the preset retention conditions.

[0163] In one embodiment, the target filtering device is further configured to determine the motion region in the image corresponding to the target; for each target, determine the overlapping region between the target's region and the motion region; if the ratio of the overlapping region to the target's region is greater than a first preset ratio, then determine that the target meets the preset retention conditions.

[0164] In one embodiment, the preset conditions include preset filtering conditions. The filtering module 1102 is specifically used to determine the target as a filtering target if it is determined that the target meets the preset filtering conditions; and to perform filtering processing on the filtering target to obtain the filtered target detection result.

[0165] In one embodiment, the target filtering device is further configured to compare the target with historical targets in the target detection result set of historical time periods; if there are historical targets in the target detection result set of historical time periods that match the target size and motion pattern, then the target is compared with negative samples in the negative sample set; if there are negative samples in the negative sample set that match the target size and motion pattern, then the target is determined to meet the preset filtering conditions.

[0166] In one embodiment, the process of establishing a negative sample set includes: traversing multiple consecutive frames of target detection results, and determining candidate samples whose size matches and whose motion patterns conform to the static condition based on the multiple frames of target detection results; determining the number of frames in which candidate samples exist based on the multiple frames of target detection results; if the number of frames is greater than a second preset frame number threshold, then the candidate sample is determined as a negative sample; and establishing a negative sample set based on the negative samples.

[0167] In one embodiment, the target filtering device is further configured to determine, for each target, the overlapping area between the region of interest and the region where the target is located; if the ratio of the overlapping area to the region where the target is located is less than a third preset ratio, then the target is determined to meet the preset filtering conditions.

[0168] Each module in the aforementioned target filtering device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0169] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0170] Obtain the initial target detection results;

[0171] At least one target is filtered according to preset conditions to obtain the filtered target detection result; the preset conditions are determined based on at least one of the target's size, position, features, and motion patterns.

[0172] In one embodiment, the preset conditions include preset retention conditions, and the processor, when executing the computer program, further implements the following steps: for each target, if it is determined that the target meets the preset retention conditions, the target is determined as a retained target; the targets other than the retained targets are filtered to obtain the filtered target detection results.

[0173] In one embodiment, when the processor executes the computer program, it further performs the following steps: comparing the target with positive samples in the positive sample set; if there are positive samples in the positive sample set that match the target size and motion pattern, then the target is determined to meet the preset retention conditions.

[0174] In one embodiment, when the processor executes the computer program, it further implements the following steps: traversing multiple consecutive frames of target detection results and determining the number of frames with the same target based on the multiple frames of target detection results; if the number of frames is greater than a first preset frame number threshold and the position of the target detection results with the same target conforms to a preset rule, then the target is determined as a positive sample; and a positive sample set is established based on the positive samples.

[0175] In one embodiment, the preset retention conditions include a preset size, and the processor, when executing the computer program, further implements the following steps: for each target, if the size of the target matches the preset size, then the target is determined to meet the preset retention conditions.

[0176] In one embodiment, the preset size includes preset width and height dimensions, and when the processor executes the computer program, it further implements the following steps: if the width and height dimensions of the target match the preset width and height dimensions, then the target is determined to meet the preset retention conditions.

[0177] In one embodiment, the preset size includes a preset aspect ratio, and when the processor executes the computer program, it further implements the following steps: if the aspect ratio of the target matches the preset aspect ratio, then the target is determined to meet the preset retention conditions.

[0178] In one embodiment, when the processor executes the computer program, it further performs the following steps: for each target, determining the overlapping area between the feature region of the target and the region where the target is located; if the ratio of the overlapping area to the region where the target is located is greater than a second preset ratio, and the feature region is within a preset area range on the target, then the target is determined to meet the preset retention conditions.

[0179] In one embodiment, when the processor executes the computer program, it further performs the following steps: determining the motion region in the image corresponding to the target; for each target, determining the overlapping region between the target's region and the motion region; if the ratio of the overlapping region to the target's region is greater than a first preset ratio, then determining that the target meets the preset retention conditions.

[0180] In one embodiment, the preset conditions include preset filtering conditions, and the processor, when executing the computer program, further implements the following steps: for each target, if it is determined that the target meets the preset filtering conditions, then the target is determined as a filtered target; the filtered target is filtered to obtain the filtered target detection result.

[0181] In one embodiment, when the processor executes the computer program, it further performs the following steps: comparing the target with historical targets in the target detection result set of historical time periods; if there are historical targets in the target detection result set of historical time periods that match the target size and motion pattern, then comparing the target with negative samples in the negative sample set; if there are negative samples in the negative sample set that match the target size and motion pattern, then determining that the target meets the preset filtering conditions.

[0182] In one embodiment, when the processor executes the computer program, it further implements the following steps: traversing multiple consecutive frames of target detection results, and determining candidate samples whose size matches and whose motion patterns conform to the static condition based on the multiple frames of target detection results; determining the number of frames in which candidate samples exist based on the multiple frames of target detection results; if the number of frames is greater than a second preset frame number threshold, then the candidate sample is determined as a negative sample; and establishing a negative sample set based on the negative samples.

[0183] In one embodiment, when the processor executes the computer program, it further performs the following steps: for each target, determining the overlapping region between the region of interest and the region where the target is located; if the ratio of the overlapping region to the region where the target is located is less than a third preset ratio, then determining that the target meets the preset filtering conditions.

[0184] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0185] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0186] Obtain the initial target detection results;

[0187] At least one target is filtered according to preset conditions to obtain the filtered target detection result; the preset conditions are determined based on at least one of the target's size, position, features, and motion patterns.

[0188] In one embodiment, the preset conditions include preset retention conditions, and when the computer program is executed by the processor, it further implements the following steps: for each target, if it is determined that the target meets the preset retention conditions, the target is determined as a retained target; the targets other than the retained targets are filtered to obtain the filtered target detection results.

[0189] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: comparing the target with positive samples in the positive sample set; if there are positive samples in the positive sample set that match the target size and motion pattern, then the target is determined to meet the preset retention conditions.

[0190] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: traversing multiple consecutive frames of target detection results and determining the number of frames with the same target based on the multiple frames of target detection results; if the number of frames is greater than a first preset frame number threshold and the position of the target detection results with the same target conforms to a preset rule, then the target is determined as a positive sample; and a positive sample set is established based on the positive samples.

[0191] In one embodiment, the preset retention conditions include a preset size, and when the computer program is executed by the processor, it further implements the following steps: for each target, if the size of the target matches the preset size, then the target is determined to meet the preset retention conditions.

[0192] In one embodiment, the preset size includes preset width and height dimensions. When the computer program is executed by the processor, it further implements the following steps: if the width and height dimensions of the target match the preset width and height dimensions, then the target is determined to meet the preset retention conditions.

[0193] In one embodiment, the preset size includes a preset aspect ratio, and when the computer program is executed by the processor, it further implements the following steps: if the aspect ratio of the target matches the preset aspect ratio, then the target is determined to meet the preset retention conditions.

[0194] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: for each target, determining the overlapping area between the feature region of the target and the region where the target is located; if the ratio of the overlapping area to the region where the target is located is greater than a second preset ratio, and the feature region is within a preset area range on the target, then determining that the target meets the preset retention conditions.

[0195] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: determining the motion region in the image corresponding to the target; for each target, determining the overlapping region between the target's region and the motion region; if the ratio of the overlapping region to the target's region is greater than a first preset ratio, then determining that the target meets the preset retention conditions.

[0196] In one embodiment, the preset conditions include preset filtering conditions, and when the computer program is executed by the processor, it further implements the following steps: for each target, if it is determined that the target meets the preset filtering conditions, the target is determined as a filtered target; the filtered target is filtered to obtain the filtered target detection result.

[0197] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: comparing the target with historical targets in the target detection result set of historical time periods; if there are historical targets in the target detection result set of historical time periods that match the target size and motion pattern, then comparing the target with negative samples in the negative sample set; if there are negative samples in the negative sample set that match the target size and motion pattern, then determining that the target meets the preset filtering conditions.

[0198] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: traversing multiple consecutive frames of target detection results, and determining candidate samples whose size matches and whose motion patterns conform to the static condition based on the multiple frames of target detection results; determining the number of frames in which candidate samples exist based on the multiple frames of target detection results; if the number of frames is greater than a second preset frame number threshold, then the candidate sample is determined as a negative sample; and establishing a negative sample set based on the negative samples.

[0199] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: for each target, determining the overlapping region between the region of interest and the region where the target is located; if the ratio of the overlapping region to the region where the target is located is less than a third preset ratio, then determining that the target meets the preset filtering conditions.

[0200] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:

[0201] Obtain the initial target detection results;

[0202] At least one target is filtered according to preset conditions to obtain the filtered target detection result; the preset conditions are determined based on at least one of the target's size, position, features, and motion patterns.

[0203] In one embodiment, the preset conditions include preset retention conditions, and when the computer program is executed by the processor, it further implements the following steps: for each target, if it is determined that the target meets the preset retention conditions, the target is determined as a retained target; the targets other than the retained targets are filtered to obtain the filtered target detection results.

[0204] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: comparing the target with positive samples in the positive sample set; if there are positive samples in the positive sample set that match the target size and motion pattern, then the target is determined to meet the preset retention conditions.

[0205] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: traversing multiple consecutive frames of target detection results and determining the number of frames with the same target based on the multiple frames of target detection results; if the number of frames is greater than a first preset frame number threshold and the position of the target detection results with the same target conforms to a preset rule, then the target is determined as a positive sample; and a positive sample set is established based on the positive samples.

[0206] In one embodiment, the preset retention conditions include a preset size, and when the computer program is executed by the processor, it further implements the following steps: for each target, if the size of the target matches the preset size, then the target is determined to meet the preset retention conditions.

[0207] In one embodiment, the preset size includes preset width and height dimensions. When the computer program is executed by the processor, it further implements the following steps: if the width and height dimensions of the target match the preset width and height dimensions, then the target is determined to meet the preset retention conditions.

[0208] In one embodiment, the preset size includes a preset aspect ratio, and when the computer program is executed by the processor, it further implements the following steps: if the aspect ratio of the target matches the preset aspect ratio, then the target is determined to meet the preset retention conditions.

[0209] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: for each target, determining the overlapping area between the feature region of the target and the region where the target is located; if the ratio of the overlapping area to the region where the target is located is greater than a second preset ratio, and the feature region is within a preset area range on the target, then determining that the target meets the preset retention conditions.

[0210] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: determining the motion region in the image corresponding to the target; for each target, determining the overlapping region between the target's region and the motion region; if the ratio of the overlapping region to the target's region is greater than a first preset ratio, then determining that the target meets the preset retention conditions.

[0211] In one embodiment, the preset conditions include preset filtering conditions, and when the computer program is executed by the processor, it further implements the following steps: for each target, if it is determined that the target meets the preset filtering conditions, the target is determined as a filtered target; the filtered target is filtered to obtain the filtered target detection result.

[0212] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: comparing the target with historical targets in the target detection result set of historical time periods; if there are historical targets in the target detection result set of historical time periods that match the target size and motion pattern, then comparing the target with negative samples in the negative sample set; if there are negative samples in the negative sample set that match the target size and motion pattern, then determining that the target meets the preset filtering conditions.

[0213] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: traversing multiple consecutive frames of target detection results, and determining candidate samples whose size matches and whose motion patterns conform to the static condition based on the multiple frames of target detection results; determining the number of frames in which candidate samples exist based on the multiple frames of target detection results; if the number of frames is greater than a second preset frame number threshold, then the candidate sample is determined as a negative sample; and establishing a negative sample set based on the negative samples.

[0214] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: for each target, determining the overlapping region between the region of interest and the region where the target is located; if the ratio of the overlapping region to the region where the target is located is less than a third preset ratio, then determining that the target meets the preset filtering conditions.

[0215] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0216] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, 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, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0217] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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.

[0218] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A target filtering method, characterized in that, The method includes: Obtain the initial target detection results output by the target detection model after performing target detection processing on multiple consecutive frames of images; The system iterates through each target in the initial target detection results and filters at least one target according to preset conditions to obtain filtered target detection results. The preset conditions are determined based on at least one of the target's size, position, features, and motion patterns. The size is the size difference of the same target in different frames. The features are the key parts of the target. The motion patterns are the distance the same target moves in different frames. The preset conditions include preset filtering conditions; the step of filtering at least one of the targets according to the preset conditions to obtain the filtered target detection result includes: The target is compared with historical targets in the target detection result set of historical time periods; If there is a historical target in the target detection result set of the historical period that matches the target size and movement pattern, then the target is compared with the negative samples in the negative sample set; If there is a negative sample in the negative sample set that matches the target size and motion pattern, then the target is determined to meet the preset filtering conditions; the negative sample set is a set of targets that meet the preset filtering conditions; the negative samples are selected and the negative sample set is established during the filtering process of the target detection results of each frame; wherein, when the detected target is a moving target, the negative sample set is a set of stationary targets; size matching includes the size difference between the target size and the size of the negative sample being less than a first preset threshold; motion pattern matching includes the actual distance between the target and the negative sample being less than a third preset threshold; For each of the aforementioned targets, if it is determined that the target meets the preset filtering conditions, then the target is identified as a filtering target; The target to be filtered is then filtered to obtain the filtered target detection result.

2. The method according to claim 1, characterized in that, The preset conditions include preset retention conditions. The step of filtering at least one target according to the preset conditions to obtain the filtered target detection result includes: For each of the aforementioned targets, if it is determined that the target meets the preset retention conditions, then the target is determined as a retained target; Targets other than the retained targets are filtered to obtain the filtered target detection results.

3. The method according to claim 2, characterized in that, The method further includes: The target is compared with the positive samples in the positive sample set; If there is a positive sample in the set of positive samples that matches the target size and motion pattern, then the target is determined to meet the preset retention conditions.

4. The method according to claim 3, characterized in that, The process of establishing the positive sample set includes: Traverse multiple consecutive frames of target detection results, and determine the number of frames containing the same target based on the target detection results of the multiple frames; If the number of frames is greater than the first preset frame number threshold, and the positions of the target detection results with the same target conform to a preset rule, then the target is determined as the positive sample; The positive sample set is established based on the positive samples.

5. The method according to claim 2, characterized in that, The preset retention conditions include a preset size, and the method further includes: For each of the targets, if the size of the target matches the preset size, then the target is determined to meet the preset retention condition.

6. The method according to claim 5, characterized in that, The preset dimensions include preset width and height dimensions; The step of determining that the target meets the preset retention condition if the target size matches the preset size includes: If the width and height of the target match the preset width and height, then the target is determined to meet the preset retention conditions.

7. The method according to claim 5, characterized in that, The preset size includes a preset aspect ratio; the step of determining that the target meets the preset retention condition if the target size matches the preset size includes: If the aspect ratio of the target matches the preset aspect ratio, then the target is determined to meet the preset retention condition.

8. The method according to claim 2, characterized in that, The method further includes: For each of the aforementioned targets, the overlapping region between the feature region of the target and the region where the target is located is determined; If the ratio of the overlapping region to the region where the target is located is greater than a second preset ratio, and the feature region is within a preset region on the target, then the target is determined to meet the preset retention condition.

9. The method according to claim 2, characterized in that, The method further includes: Determine the motion region in the image corresponding to the target; For each of the aforementioned targets, determine the overlapping area between the target's location area and the motion area; If the ratio of the overlapping region to the region where the target is located is greater than a first preset ratio, then the target is determined to meet the preset retention condition.

10. The method according to claim 1, characterized in that, The process of establishing the negative sample set includes: Traverse multiple consecutive frames of target detection results, and based on the target detection results of the multiple frames, determine candidate samples whose size matches and whose motion patterns conform to the static condition; The number of frames containing candidate samples is determined based on the target detection results of multiple frames. If the number of frames is greater than the second preset frame number threshold, then the candidate sample is determined as the negative sample; The negative sample set is established based on the negative samples.

11. The method according to claim 1, characterized in that, The method further includes: For each of the aforementioned targets, determine the overlapping region between the region of interest and the region where the target is located; If the ratio of the overlapping region to the region where the target is located is less than a third preset ratio, then the target is determined to meet the preset filtering conditions.

12. A target filtration device, characterized in that, The device includes: The acquisition module is used to acquire the initial target detection results output by the target detection model after performing target detection processing on multiple consecutive frames of images; A filtering module is used to traverse each target in the initial target detection result and filter at least one target according to preset conditions to obtain a filtered target detection result. The preset conditions are determined based on at least one of the target's size, position, features, and motion patterns. The size is the size difference of the same target in different frames. The features are the key parts of the target. The motion patterns are the distance the same target moves in different frames. The preset conditions include preset filtering conditions; the filtering module is specifically used for: The target is compared with historical targets in the target detection result set of historical time periods; If there is a historical target in the target detection result set of the historical period that matches the target size and movement pattern, then the target is compared with the negative samples in the negative sample set; If there is a negative sample in the negative sample set that matches the target size and motion pattern, then the target is determined to meet the preset filtering conditions; the negative sample set is a set of targets that meet the preset filtering conditions; the negative samples are selected and the negative sample set is established during the filtering process of the target detection results of each frame; wherein, when the detected target is a moving target, the negative sample set is a set of stationary targets; size matching includes the size difference between the target size and the size of the negative sample being less than a first preset threshold; motion pattern matching includes the actual distance between the target and the negative sample being less than a third preset threshold; For each of the aforementioned targets, if it is determined that the target meets the preset filtering conditions, then the target is identified as a filtering target; The target to be filtered is then filtered to obtain the filtered target detection result.

13. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 11.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 11.

15. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 11.