Target detection method, apparatus, device, and medium
By acquiring motion maps and object detection models from video sequences, the system determines whether the bounding boxes of target objects are false detections, thus solving the problem of false detections caused by low light and complex backgrounds and improving the accuracy of object detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN MICROBT ELECTRONICS TECH CO LTD
- Filing Date
- 2024-12-09
- Publication Date
- 2026-06-09
AI Technical Summary
Existing target detection methods are prone to false detections under conditions such as low light, complex backgrounds, and diverse pose variations, leading to non-target objects being incorrectly identified as target objects, resulting in unnecessary disturbances and resource waste.
By acquiring the motion map of the video sequence, the bounding box of the target object is determined using the object detection model. The bounding box is then judged as a false detection based on the motion map, and the motion probability is used to distinguish between the target object and the non-target object.
It effectively reduces the number of non-target objects being falsely detected as target objects, improves the accuracy of target detection, and reduces unnecessary disturbances and resource waste caused by false detections.
Smart Images

Figure CN122176584A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer vision technology, and in particular to a target detection method, apparatus, device, and medium. Background Technology
[0002] Object detection is an important application of computer vision technology, used to detect objects of a specific category (such as people, buildings, or cars) in images. Object detection has been widely used in scenarios such as home security, surveillance security, autonomous driving, and traffic monitoring.
[0003] Current object detection methods typically use deep learning networks to extract image features from images and, based on these features, detect whether a target object of a predefined category exists in the image. If so, a corresponding prompt is issued.
[0004] In practical applications, factors such as low lighting, complex backgrounds, and varied poses in images can easily lead to false detections. False detection occurs when a non-target object is incorrectly identified as the target object; for example, identifying a light source in low light as a car. False detection can cause unnecessary disruption and waste of resources for users. For instance, in home security scenarios, once a false detection occurs, videos containing incorrect target objects will be pushed to the user, consuming their data and time with frequent pushes. Summary of the Invention
[0005] This application provides a target detection method that can reduce the number of non-target objects being falsely detected as target objects, thereby improving the accuracy of target detection.
[0006] Accordingly, embodiments of this application also provide a target detection device, an electronic device, and a machine-readable medium to ensure the implementation and application of the above methods.
[0007] To address the aforementioned problems, this application discloses a target detection method, the method comprising:
[0008] Obtain the video sequence to be detected; the video sequence includes: multiple video frames;
[0009] Determine the motion map of the i-th video frame in the video sequence; the pixel value in the motion map represents the motion probability corresponding to the pixel position; i is a positive integer;
[0010] Using an object detection model, determine the bounding box of the target object contained in the i-th video frame of the video sequence;
[0011] Based on the motion map of the i-th video frame, determine whether the bounding box of the target object contained in the i-th video frame is a false bounding box.
[0012] This application also discloses a target detection device, the device comprising:
[0013] The video acquisition module is used to acquire the video sequence to be detected; the video sequence includes multiple video frames;
[0014] A motion map determination module is used to determine the motion map of the i-th video frame in the video sequence; the pixel value in the motion map represents the motion probability corresponding to the pixel position; i is a positive integer;
[0015] The bounding box determination module is used to determine the bounding box of the target object contained in the i-th video frame of the video sequence using the target detection model;
[0016] The first-order judgment module is used to determine whether the bounding box of the target object contained in the i-th video frame is a false bounding box based on the motion map of the i-th video frame.
[0017] Optionally, the motion map determination module includes:
[0018] The first histogram determination module is used to determine the first directional gradient histogram feature corresponding to the i-th video frame in the video sequence;
[0019] The second histogram determination module is used to determine the second directional gradient histogram feature corresponding to the j-th video frame in the video sequence; j is a positive integer different from i; the number of frames between the i-th video frame and the j-th video frame in the time series does not exceed M;
[0020] The matching determination module is used to determine the motion map of the i-th video frame based on the matching degree between the features of the first directional gradient histogram and the features of the second directional gradient histogram.
[0021] Optionally, the first histogram determination module includes:
[0022] The partitioning module is used to divide the i-th video frame into multiple units;
[0023] The gradient determination module is used to determine the gradient intensity and gradient direction of each pixel in each unit.
[0024] The histogram feature determination module is used to determine the first-direction gradient histogram feature of each unit in the i-th video frame based on the gradient intensity of each unit's pixel in different gradient direction ranges.
[0025] Optionally, the matching determination module includes:
[0026] The metric module is used to determine the degree of matching between the features of the first directional gradient histogram and the features of the second directional gradient histogram using a metric method.
[0027] The motion probability determination module is used to determine the motion probability corresponding to the unit position in the motion map of the i-th video frame based on the matching degree corresponding to the unit position.
[0028] Optionally, the first-order determination module includes:
[0029] The pixel motion probability determination module is used to determine the motion probability corresponding to the pixel position in the motion map based on the motion probability corresponding to the unit position in the motion map.
[0030] The motion probability determination module is used to determine whether a bounding box is a false detection based on the motion probability corresponding to the pixel position in the bounding box.
[0031] Optionally, the motion probability determination module includes:
[0032] The position determination module is used to determine whether a pixel position is a moving position based on the motion probability corresponding to the pixel position in the bounding box and the preset probability value.
[0033] The bounding box determination module is used to determine whether a bounding box is a false detection based on the proportion of the number of moving positions in the bounding box to the total number of pixel positions in the bounding box.
[0034] Optionally, the device further includes:
[0035] The target bounding box determination module is used to take the corresponding bounding box as the target bounding box when the bounding box of the target object contained in the i-th video frame is not a falsely detected bounding box.
[0036] The secondary judgment module is used to determine whether the target bounding box is a falsely detected bounding box based on the proportion of the target bounding box in multiple consecutive video frames.
[0037] This application also discloses an electronic device, including: a processor; and a memory storing executable code thereon, which, when executed, causes the processor to perform the method described in this application.
[0038] This application also discloses a machine-readable medium storing executable code thereon, which, when executed, causes a processor to perform the method described in this application.
[0039] The embodiments of this application have the following advantages:
[0040] In the technical solution of this application embodiment, after determining the bounding box of the target object contained in the i-th video frame using the target detection model, it is determined whether the bounding box of the target object contained in the i-th video frame is a falsely detected bounding box based on the motion map of the i-th video frame. Since target objects and non-target objects usually differ in motion characteristics, this difference is reflected in motion probabilities, and the motion map can provide the motion probability corresponding to the pixel position. Thus, this application embodiment can effectively determine whether the target object corresponding to the bounding box is a non-target object that has been incorrectly identified as a target object based on the motion probability provided by the motion map. Since the above determination can filter out stationary objects that have been incorrectly identified as target objects, this application embodiment can reduce the number of non-target objects that are falsely detected as target objects, thereby improving the accuracy of target detection. Attached Figure Description
[0041] Figure 1 This is a schematic flowchart of a target detection method according to an embodiment of this application;
[0042] Figure 2 This is a schematic flowchart of the target detection method according to an embodiment of this application;
[0043] Figure 3 This is a schematic diagram of the structure of a target detection device according to an embodiment of this application;
[0044] Figure 4 This is a schematic diagram of the structure of an apparatus provided in one embodiment of this application. Detailed Implementation
[0045] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0046] The target detection method of this application can be applied to scenarios such as home security, surveillance security, autonomous driving, and traffic monitoring. Specifically, in home security scenarios, the target detection method is used to detect intruding individuals or objects. In surveillance security scenarios, the target detection method is used to discover specific targets exhibiting abnormal behavior (such as loitering, climbing over fences, etc.). In autonomous driving scenarios, the target detection method is used to provide surrounding target information for vehicle movement. In traffic monitoring scenarios, the target detection method is used to detect vehicle type and vehicle location.
[0047] The target detection method of this application is used to determine whether the bounding box of a target object contained in a video frame is a falsely detected bounding box. This determination can effectively reduce the number of non-target objects being falsely detected as target objects, thereby improving the accuracy of target detection.
[0048] In this embodiment, the target object refers to an object of a preset category that needs to be detected. For example, in a home security scenario, the target object could be an intruding person or a moving pet. In a surveillance security scenario, the target object might be a suspicious person exhibiting abnormal behavior. In an autonomous driving scenario, the target object could be other vehicles, pedestrians, traffic signs, and traffic lights around the vehicle. In a traffic monitoring scenario, the target object could be various vehicles and damage to traffic facilities.
[0049] Non-target objects are objects or phenomena other than the target object. In the application scenarios mentioned above, stationary objects and regular background elements unrelated to the target object are usually considered non-target objects. For example, in home security scenarios, stationary items such as furniture are non-target objects; in traffic monitoring scenarios, stationary trees along the roadside are non-target objects. Even lights in low light conditions in an image can be considered non-target objects.
[0050] Current object detection methods typically use deep learning networks to extract image features from images and, based on these features, detect whether a target object of a predefined category exists in the image. If so, a corresponding prompt is issued.
[0051] The above prompts serve the following purposes:
[0052] On the one hand, alerts can be quickly transmitted to relevant personnel or systems, allowing them to focus their attention on the target. For example, in home security scenarios, once an unauthorized intruder is detected, the homeowner will immediately receive an alert and can review the security monitoring footage to understand the situation. If the situation is critical, they can choose to call the police to ensure the safety of family members and property. On the other hand, in surveillance security scenarios, when a target detection method identifies a specific target exhibiting abnormal behavior, security personnel can immediately obtain an alert, based on which they can conduct further observation, questioning, and other investigations of the specific target, thereby effectively preventing and responding to potential security threats and maintaining security and order in the monitored area.
[0053] On the other hand, in scenarios such as autonomous driving and traffic management, the alerts provide a crucial foundation for subsequent operations. In autonomous driving scenarios, alerts indicating the approach of pedestrians or other vehicles allow the autonomous driving system to adjust its speed and change direction. In traffic monitoring scenarios, alerts regarding speeding and illegal lane changes help traffic management departments enforce the law and control traffic.
[0054] However, factors such as low lighting, complex backgrounds, and varied poses in images can easily lead to false detections. False detection occurs when a non-target object is incorrectly identified as the target object; for example, identifying lights in low light as a car.
[0055] To address the problem of false detection in related technologies that erroneously identify non-target objects as target objects, embodiments of this application provide a target detection method, which specifically includes the following steps:
[0056] Obtain the video sequence to be detected; the video sequence specifically includes: multiple video frames;
[0057] Determine the motion map of the i-th video frame in the above video sequence; the pixel values in the motion map represent the motion probability corresponding to the pixel position; i can be a positive integer.
[0058] Using an object detection model, determine the bounding box of the target object contained in the i-th video frame of the above video sequence;
[0059] Based on the motion map of the i-th video frame, determine whether the bounding box of the target object contained in the i-th video frame is a false bounding box.
[0060] In this embodiment, after determining the bounding box of the target object contained in the i-th video frame using the target detection model, it determines whether the bounding box of the target object contained in the i-th video frame is a falsely detected bounding box based on the motion map of the i-th video frame. Since target objects and non-target objects typically differ in motion characteristics, this difference is reflected in motion probabilities, and the motion map provides the motion probability corresponding to pixel positions. Thus, this embodiment can effectively determine whether the target object corresponding to the bounding box is a non-target object that has been incorrectly identified as a target object based on the motion probability provided by the motion map. Because the above determination can filter out stationary objects that have been incorrectly identified as target objects, this embodiment can reduce the number of non-target objects that are falsely detected as target objects, thereby improving the accuracy of target detection.
[0061] Method Example 1
[0062] refer to Figure 1 The diagram illustrates a step-by-step flowchart of a target detection method according to an embodiment of this application. The method specifically includes the following steps:
[0063] Step 101: Obtain the video sequence to be detected; the video sequence specifically includes: multiple video frames;
[0064] Step 102: Determine the motion map of the i-th video frame in the above video sequence; the pixel values in the motion map represent the motion probability corresponding to the pixel position; i can be a positive integer;
[0065] Step 103: Using the object detection model, determine the bounding box of the target object contained in the i-th video frame of the above video sequence;
[0066] Step 104: Based on the motion map of the i-th video frame, determine whether the bounding box of the target object contained in the i-th video frame is a false bounding box.
[0067] Figure 1 The illustrated method embodiments can be applied to electronic devices. These electronic devices can be smart devices, such as smart door locks, cameras, surveillance cameras, or other electronic devices with shooting capabilities. They can also be computer devices deploying the von Neumann architecture, such as desktop computers, laptops, servers, etc.
[0068] In step 101, a video sequence refers to a continuous video content, typically composed of multiple video frames arranged sequentially in chronological order, following a certain pattern. These video frames can originate from image acquisition devices such as cameras or surveillance equipment. Common video frame rates include 24 frames per second (fps) and 30 frames per second (fps), meaning a fixed number of video frames appear sequentially every second. Video sequences provide rich dynamic image data for object detection and are a crucial foundation for object detection. The video frame rate refers to the number of video frames per second, determining the smoothness of the video; for example, 24 fps means 24 video frames are played sequentially per second.
[0069] In step 102, the i-th video frame in the video sequence refers to the i-th image frame arranged in chronological order within the video sequence. The motion map of the i-th video frame provides the motion probability corresponding to the pixel position in the video frame, which is used to determine whether the bounding box of the target object is a false detection.
[0070] In a specific implementation, determining the motion map of the i-th video frame in the video sequence includes the following steps:
[0071] Step A1: Determine the first directional gradient histogram feature corresponding to the i-th video frame in the video sequence;
[0072] Step A2: Determine the second directional gradient histogram feature corresponding to the j-th video frame in the video sequence; j is a positive integer different from i; the number of frames between the i-th video frame and the j-th video frame in the time series does not exceed M;
[0073] Step A3: Determine the motion map of the i-th video frame based on the matching degree between the features of the first directional gradient histogram and the features of the second directional gradient histogram.
[0074] The first-direction gradient histogram feature is a statistical representation of the direction of local pixel intensity change of an object in the i-th video frame of a video sequence. It describes the features of an image by calculating the gradient direction distribution of pixels in the image.
[0075] The first directional gradient histogram feature is used for subsequent matching with the second directional gradient histogram feature. By comparing the matching degree between the two directional gradient histogram features, the motion map of the i-th video frame is determined.
[0076] The above-mentioned determination of the first directional gradient histogram feature corresponding to the i-th video frame in the video sequence specifically includes the following steps:
[0077] Step A11: Divide the i-th video frame into multiple units;
[0078] Step A12: Determine the gradient intensity and gradient direction of each pixel in each unit;
[0079] Step A13: Determine the first-direction gradient histogram feature of each unit in the i-th video frame based on the gradient intensity of each unit's pixel in different gradient directions.
[0080] In step A11, the size of the unit can be m×m, where m can be a positive integer. For example, a 64×128 video frame can be divided into 8×8 units, meaning each unit includes 8×8 pixels. Of course, this embodiment does not limit the specific size of the unit.
[0081] In step A12, gradient intensity represents the degree of change in pixel value, while gradient direction indicates the direction of change in pixel value.
[0082] Each pixel in each unit contains two values: gradient strength and gradient direction.
[0083] For a pixel l(x,y), its 8-neighborhood is shown in Table 1.
[0084] Table 1
[0085] A0 A1 A2 A7 I(x, y) A3 A6 A5 A4
[0086] The horizontal gradient of pixel l(x,y) is: Gx = A3 - A7. The vertical gradient is: Gy = A5 - A1.
[0087] The gradient intensity G of pixel I(x,y) is:
[0088]
[0089] The gradient direction θ of pixel I(x,y) is:
[0090] θ = tan⁻¹(Gy / Gx) (2)
[0091] After determining the gradient intensity and gradient direction of each pixel in each unit, step A13 can further statistically analyze the gradient intensity distribution of each unit within different gradient direction ranges.
[0092] Specifically, the gradient direction can be divided into several gradient direction ranges, and then the total gradient intensity of each unit in each gradient direction range can be calculated to obtain the first-direction gradient histogram feature of each unit.
[0093] In one example, the 180-degree range is first divided into 20-degree gradient direction ranges, resulting in nine different gradient direction ranges. Then, for each pixel within a unit, its gradient direction range is determined based on its gradient direction, and the pixel's gradient intensity is mapped to the corresponding gradient direction range. For example, if a pixel's gradient direction is near the boundary between two ranges, its gradient intensity will be distributed proportionally across those two ranges. Next, the gradient intensity of each unit within each gradient direction range is statistically analyzed, resulting in a vector containing nine values. This vector is the first-direction gradient histogram feature of that unit. This first-direction gradient histogram feature reflects the intensity distribution of pixels within that unit across different gradient directions.
[0094] Since the gradient intensities of all pixels within a unit have been mapped to the corresponding gradient direction range, the gradient intensities from each pixel within each gradient direction range can be accumulated during the statistical analysis of the gradient intensities for each unit. This process is repeated for all nine gradient direction ranges. Ultimately, a vector containing nine values is obtained, each corresponding to the sum of the accumulated gradient intensities for one gradient direction range.
[0095] Because the gradient direction is continuous, while the defined gradient direction ranges are discrete, interpolation can be used to map the gradient intensity of a pixel to different gradient direction ranges. For example, when the gradient direction of a pixel is near the boundary between two ranges, it is not possible to simply assign its gradient intensity to a single range. Therefore, interpolation is needed to distribute its gradient intensity to two adjacent ranges according to a certain ratio, thus enabling a more accurate statistical analysis of the gradient intensity distribution.
[0096] When determining whether a pixel needs interpolation, we can first check if the pixel's gradient direction coincides with the center angle of a certain gradient direction range. If so, the pixel does not need interpolation, and its gradient intensity can be directly included in the corresponding range. The center angle of a certain gradient direction range can be half the sum of the two boundary values of that gradient direction range.
[0097] If the gradient direction of a pixel does not coincide with the center angle of any gradient direction range, its relationship with the range boundary can be determined. If the distance from the range boundary is greater than a certain small angle, interpolation is not needed, and its gradient intensity can be directly included in the range. For example, if a pixel's gradient direction is 15 degrees and its distance from any range boundary is greater than 3 degrees, then this pixel does not need interpolation, and its gradient intensity can be directly included in the range.
[0098] If the distance to the boundary of a range is less than or equal to a specific small angle, it indicates that the pixel is close to the range boundary and may affect the two adjacent ranges. In this case, interpolation is needed to distribute the gradient intensity to the two adjacent ranges according to the proportion of the distance to the center of the two ranges. For example, if a pixel's gradient direction is 17 degrees, and it is close to the boundaries of the 0-20 degree and 20-40 degree ranges, and the distance to the boundary is less than or equal to 3 degrees, then this pixel needs interpolation to distribute the gradient intensity to the two adjacent ranges according to the proportion of the distance to the center angle of the gradient direction range.
[0099] The following is an example of using interpolation to map the gradient intensity of a pixel to different gradient direction ranges:
[0100] Assuming the gradient direction of a pixel is 15 degrees, and assuming the 180-degree range is divided into 20-degree ranges, then 0 degrees to 20 degrees is the first range, 20 degrees to 40 degrees is the second range, and so on.
[0101] Since the gradient direction of the pixel is 15 degrees, which is near the boundary of the first range (0 degrees to 20 degrees) and the second range (20 degrees to 40 degrees), an allocation ratio can be set, such as allocating the gradient intensity according to the ratio of the gradient direction to the center of the two ranges.
[0102] Assume the gradient intensity of this pixel is 15. The center of the first range is 10 degrees, and the center of the second range is 30 degrees. This pixel is 5 degrees from the center of the first range and 15 degrees from the center of the second range. Therefore, the total distance is 5 + 15 = 20 degrees. Thus, the gradient intensity allocated to the first range is 10 × 15 ÷ 20 = 7.5; the gradient intensity allocated to the second range is 10 × 5 ÷ 20 = 2.5. In this way, through interpolation, the gradient intensity of this pixel is distributed proportionally across the two adjacent gradient direction ranges.
[0103] In the previous example, the first directional gradient histogram feature can include: a vector corresponding to each cell. That is, for a single cell, after determining the gradient direction range, interpolating, and statistically analyzing the gradient strength as described above, the resulting vector containing a specific number of values (such as the 9 values mentioned earlier) is the first directional gradient histogram feature of that cell.
[0104] Alternatively, 2×2 units can be combined into an image patch. In this case, the same steps of determining the gradient direction range, interpolation, and calculating gradient strength are performed, but this time the operation is applied to an image patch composed of 2×2 units. The final vector obtained is the first-direction gradient histogram feature corresponding to that image patch. This feature reflects the intensity distribution of pixels within the image patch in different gradient directions.
[0105] In step A2, from a time series perspective, the j-th video frame and the i-th video frame have two possible temporal relationships: the j-th video frame can be before or after the i-th video frame. Furthermore, the time interval between the i-th and j-th video frames does not exceed M, where the specific value of M can be determined by those skilled in the art based on actual application requirements; for example, M can be 5. In one example, the second-direction gradient histogram feature can be determined for the (i-5)-th video frame.
[0106] Since the process of determining the features of the second directional gradient histogram is similar to that of the first directional gradient histogram, it will not be elaborated here; they can be referred to interchangeably. The features of the second directional gradient histogram may include: the vector corresponding to each unit.
[0107] In step A3, the first directional gradient histogram feature comes from a specific video frame (e.g., the i-th video frame), and the second directional gradient histogram feature comes from video frames that are at a certain interval from the i-th video frame in the time series (e.g., the i-5th video frame). These two types of directional gradient histogram features are extracted from video frames at different time points, reflecting the information of the video at different time points. Since the motion of objects in the video is continuous in time, the changes in the image information of video frames at different time points are related to the motion of the object. By analyzing the matching degree between these two features from video frames at different time points, the motion change relationship of the object in the time dimension can be captured, thereby determining the motion mapping map of the i-th video frame.
[0108] In the specific implementation, the motion map of the i-th video frame is determined based on the matching degree between the features of the first directional gradient histogram and the features of the second directional gradient histogram. This includes the following steps:
[0109] Step A31: Using a metric method, determine the degree of matching between the features of the first directional gradient histogram and the features of the second directional gradient histogram;
[0110] Step A32: Determine the motion probability corresponding to the unit position in the motion map of the i-th video frame based on the matching degree corresponding to the unit position.
[0111] In step A31, the matching degree reflects the similarity of two video frames at different time points in terms of image features.
[0112] Since the first-direction gradient histogram features and the second-direction gradient histogram features can be regarded as vectors, the similarity measurement method between vectors can be used to determine the matching degree between the two.
[0113] This application does not limit the specific similarity measurement methods used. For example, Euclidean distance measures similarity by calculating the straight-line distance between vectors in space; the smaller the Euclidean distance value, the higher the matching degree. Manhattan distance is the sum of distances in all dimensions and can also reflect the relationship between vectors. Cosine similarity is judged from the cosine value of the angle between vectors; the closer the cosine similarity value is to 1, the higher the matching degree. Mahalanobis distance considers the covariance structure of the data and is suitable for data with different scales and correlations. Hamming distance is used for binary vectors and measures the degree of difference by calculating the number of different elements to reflect the matching degree.
[0114] In one example, the matching degree can be set to a cosine similarity value. Generally, a smaller cosine similarity value means a lower similarity between the features in the first direction gradient histogram and the features in the second direction gradient histogram, i.e., a lower matching degree. In this case, the motion probability corresponding to the cell position in the motion map of the i-th video frame will be higher. This is because a low matching degree may suggest a large change in that cell position between the two video frames, thus increasing the probability of motion. Of course, the matching degree can also be set to other types of metrics such as Euclidean distance.
[0115] The first-direction gradient histogram (HDH) feature contains the first vector corresponding to the cell position, while the second-direction gradient histogram (HDH) feature contains the second vector corresponding to the cell position. When processing each cell position, the matching degree corresponding to that cell position can be obtained by measuring the first and second vectors at that position, such as by calculating the cosine similarity value. The size of the motion map can be the same as that of the i-th video frame, which ensures the spatial correspondence between the motion map and the video frame. Dividing the motion map into several cells, and making the size of these cells consistent with the cell size in the i-th video frame, helps to analyze different regions of the video frame more precisely.
[0116] Based on this, the matching degree corresponding to the unit position is assigned to the corresponding unit in the motion map, so that the motion map can clearly reflect the motion tendency or motion possibility of each unit in the i-th video frame.
[0117] In step 103, the object detection model is a deep learning model in the field of computer vision. It can identify target objects in video stream images and determine target information such as the location and category of the target objects. Object detection models are usually implemented based on convolutional neural networks.
[0118] This application does not limit the specific object detection model. For example, examples of object detection models may include: YOLO (You Only Look Once) series, SSD (Single Shot MultiBox Detector), etc.
[0119] The target information specifically includes the bounding box corresponding to the target object. The bounding box is used to represent the position and extent of the target object in a video frame. The bounding box is usually a rectangle whose four sides are aligned with the outermost edge of the target object, thus enclosing the entire target object. The information of the bounding box may include: the coordinates of the top-left corner of the rectangle, its width, and its height; or, the information of the bounding box may include: the coordinates of the center point of the rectangle, its width, and its height.
[0120] In this embodiment, the i-th video frame can be input into the target detection model to obtain the bounding box output by the target detection model.
[0121] In step 104, based on the motion probability of the bounding box region in the motion map of the i-th video frame, it is determined whether the bounding box of the target object in that video frame is a false detection. Generally speaking, if the motion probability of the pixel positions within the bounding box is high and relatively uniform, the detection result of the bounding box is usually correct. Alternatively, if the motion probability of the pixel positions within the bounding box is low or randomly distributed, the bounding box is likely a false detection.
[0122] In practical applications, based on the motion map of the i-th video frame, determining whether the bounding box of the target object contained in the i-th video frame is a false bounding box involves the following steps:
[0123] Step B1: Determine the motion probability corresponding to the pixel position in the motion map based on the motion probability corresponding to the unit position in the motion map;
[0124] Step B2: Determine whether the bounding box is a false detection based on the motion probability corresponding to the pixel position in the bounding box.
[0125] For step B1, since the pixels within a unit usually have similar motion characteristics, the motion probability of the unit can be directly assigned to these pixels within the unit, thereby achieving a preliminary conversion from unit to pixel motion probability.
[0126] Considering that pixels at the edge of a cell interact with other cells, their motion probabilities may exhibit certain trends. For these pixels, interpolation can be performed based on their position within the cell and the motion probabilities of adjacent cells. For example, for a pixel at the cell edge, its motion probability can be determined comprehensively using linear interpolation or other suitable interpolation methods based on the motion probabilities of adjacent cells, thus more accurately converting cell motion probability to pixel motion probability.
[0127] For example, in linear interpolation, for pixels at the edge of a cell, the distance between the pixel and the center of the cell, as well as its distance from the centers of adjacent cells, is first determined. These distances are then used to determine the pixel's weight relative to its cell and adjacent cells. Generally, the closer a pixel is to the center of a cell, the greater the weight that cell gives to the pixel's motion probability. These weights are then normalized so that their sum equals 1. Finally, the motion probability of the pixel is obtained by weighting the normalized weights with the motion probabilities of each cell.
[0128] In step B2, based on the motion probability corresponding to the pixel position in the bounding box, it is determined whether the bounding box is a false detection bounding box. Specifically, this includes: determining whether the pixel position is a moving position based on the motion probability corresponding to the pixel position in the bounding box and a preset probability value; and determining whether the bounding box is a false detection bounding box based on the proportion of the number of moving positions in the bounding box to the total number of pixel positions in the bounding box.
[0129] The preset probability value can be determined by those skilled in the art based on actual application requirements. For example, when using cosine similarity values to represent motion probability, generally speaking, the smaller the cosine similarity value, the greater the motion probability. Therefore, pixel positions with cosine similarity values no greater than the preset motion probability can be considered as moving positions. Similarly, pixel positions with cosine similarity values greater than the preset probability value can be considered as non-moving or stationary positions.
[0130] In practical implementation, a preset probability value can be determined based on experiments. For example, if the preset probability value α <= 0.85 is obtained from experiments, it can effectively filter out camera noise in low light and also accurately determine whether the pixel represents a real motion change.
[0131] The experimental process may include collecting and analyzing image data from different scenarios. Using cosine similarity values as motion probabilities, the performance of images under different cosine similarity values can be observed, with particular attention paid to the correspondence between cosine similarity values and actual motion. For example, by continuously adjusting the conversion relationship between cosine similarity values and motion probabilities, the filtering effect on camera low-light noise and the accuracy of judging real motion changes can be observed under different preset motion probabilities. When a preset probability value is found to effectively filter out camera low-light noise while also accurately determining whether a pixel represents a real motion change, this value can be determined as the preset motion probability.
[0132] The percentage refers to the proportion of moving pixels within a bounding box to the total number of pixels within that bounding box. Specifically, the percentage is the number of moving pixels divided by the total number of pixels within the bounding box. This percentage reflects the proportion of moving pixels within the bounding box relative to the total number of pixels in the entire bounding box. For example, suppose there is a bounding box containing 100 pixels, and after analysis, 30 of these pixels are identified as moving pixels. Then, the percentage of moving pixels in this bounding box is 30 ÷ 100 = 0.3, or 30%.
[0133] In this embodiment, the proportion can be compared with a threshold. If the proportion is greater than or equal to the threshold, the area enclosed by the bounding box can be considered to correspond to a real moving object, meaning the bounding box is not a false detection. This is because a higher proportion means that a relatively large number of pixels within the bounding box are identified as moving positions, indicating a relatively obvious motion state within the region. In this case, the bounding box is less likely to be caused by false detection or other errors, and more likely to accurately define a moving target object. If the proportion is greater than or equal to the threshold, the bounding box can be preserved.
[0134] If the proportion is less than the threshold, the bounding box can be considered a false detection. In this case, discarding the false detection bounding boxes can effectively filter out those that may be caused by noise, false detection, or other interference factors.
[0135] The process for determining the threshold is as follows:
[0136] First, set the threshold range.
[0137] Then, performance evaluation is performed for different thresholds within this threshold range.
[0138] By processing a large amount of image data with different motion scenes and features, the proportion of moving pixels in each bounding box is calculated using object detection algorithms and motion maps. Then, for each threshold, the number of bounding boxes of correctly preserved real moving objects and the number of falsely detected bounding boxes are counted to calculate performance metrics such as precision and recall.
[0139] Next, based on the performance of different thresholds, the optimal threshold is selected from the range that meets the requirements. For example, if the application scenario is very sensitive to false detections, a threshold that can guarantee a high accuracy rate may be selected; if more emphasis is placed on detecting all moving objects, a threshold that can guarantee a high recall rate may be selected, or a balance may be struck between the two to select the threshold with the best overall performance.
[0140] For the retained target bounding boxes, embodiments of this application can further determine whether the target bounding boxes are falsely detected. Alternatively, for the retained target bounding boxes, embodiments of this application can designate the target object corresponding to the target bounding box as the target object of user interest and issue corresponding prompt information. For example, in a security monitoring system, when a target object with abnormal behavior is detected, an alarm can be issued to the user in a timely manner so that the user can take appropriate measures. The prompt information can take various forms such as sound alarms, image flashing, and SMS notifications, and can be selected according to specific application requirements.
[0141] In summary, the target detection method of this application, after determining the bounding box of the target object contained in the i-th video frame using the target detection model, determines whether the bounding box of the target object contained in the i-th video frame is a falsely detected bounding box based on the motion map of the i-th video frame. Since target objects and non-target objects typically differ in motion characteristics, this difference is reflected in motion probabilities, and the motion map can provide the motion probability corresponding to the pixel position. Thus, this application embodiment can effectively determine whether the target object corresponding to the bounding box is a non-target object that has been incorrectly identified as a target object based on the motion probability provided by the motion map. Because the above determination can filter out stationary objects that have been incorrectly identified as target objects, this application embodiment can reduce the number of non-target objects that are falsely detected as target objects, thereby improving the accuracy of target detection.
[0142] Method Example 2
[0143] refer to Figure 2 The diagram illustrates a step-by-step flowchart of a target detection method according to an embodiment of this application. The method specifically includes the following steps:
[0144] Step 201: Obtain the video sequence to be detected; the video sequence specifically includes: multiple video frames;
[0145] Step 202: Determine the motion map of the i-th video frame in the above video sequence; the pixel value in the above motion map represents the motion probability corresponding to the pixel position; i can be a positive integer;
[0146] Step 203: Using the object detection model, determine the bounding box of the target object contained in the i-th video frame of the above video sequence;
[0147] Step 204: Based on the motion map of the i-th video frame, determine whether the bounding box of the target object contained in the i-th video frame is a false bounding box.
[0148] Compared to Figure 1 The method shown in Embodiment 1 may further include:
[0149] Step 205: If the bounding box of the target object contained in the i-th video frame is not a false bounding box, then the corresponding bounding box is taken as the target bounding box.
[0150] Step 206: Determine whether the target bounding box is a falsely detected bounding box based on the proportion of the target bounding box in multiple consecutive video frames.
[0151] The embodiments of this application can utilize target tracking technology to track target bounding boxes in order to obtain the proportion of the target bounding boxes appearing in multiple consecutive video frames.
[0152] Multiple consecutive video frames may contain one or more bounding boxes. Target tracking technology can assign trajectory IDs (identifiers) to these bounding boxes, allowing for clear differentiation and tracking of different target bounding boxes. Using trajectory IDs, the position changes and motion trajectories of each bounding box in different video frames can be accurately recorded, thereby calculating the proportion of the target bounding box appearing in multiple consecutive video frames.
[0153] The occurrence ratio of a target bounding box across multiple consecutive video frames can be defined as the ratio of the number of times the target bounding box appears in multiple consecutive video frames to the total number of consecutive video frames. If the occurrence ratio is greater than or equal to a ratio threshold, the target bounding box can be considered an accurately detected bounding box. Similarly, if the occurrence ratio is less than the ratio threshold, the target bounding box can be considered a false detection. The ratio threshold can be determined by those skilled in the art based on actual application requirements; for example, the ratio threshold could be a value such as 2 / 5.
[0154] This application embodiment can preserve accurately detected target bounding boxes. The target objects corresponding to the accurately detected target bounding boxes are then designated as the target objects of interest to the user, and corresponding prompts are issued.
[0155] The embodiments of this application can discard falsely detected target bounding boxes, effectively filtering out those falsely detected bounding boxes that may be caused by noise, false detection or other interference factors.
[0156] Because real target objects in a video sequence typically maintain a certain state of existence and motion trajectory over a continuous period of time. If a bounding box appears in a low proportion across multiple consecutive video frames, it may be a false detection, possibly due to noise or momentary interference. Conversely, if a bounding box appears in a high proportion across multiple consecutive video frames, it is more likely to represent a real target object.
[0157] Based on the initial judgment of falsely detected bounding boxes using motion mapping, this embodiment of the application performs a secondary judgment of falsely detected bounding boxes based on the proportion of the target bounding box's occurrence across multiple consecutive video frames. This secondary judgment fully utilizes the continuous characteristics of the target object in the temporal dimension, accurately filtering out false bounding boxes caused by accidental factors (such as instantaneous changes in light or brief equipment malfunctions) or transient interference (such as birds flying by or leaves swaying). This significantly improves the accuracy and reliability of target detection, making the detection results more accurately reflect the actual situation of the target object. For practical applications such as security monitoring and traffic monitoring, this can more accurately identify the truly relevant target objects, reduce false alarms, and provide a more reliable basis for related decisions and actions.
[0158] In summary, the embodiments of this application perform two determinations of the falsely detected bounding box.
[0159] One of the judgments is based on the motion map, which can identify or filter out most false detections that do not conform to motion characteristics, such as false bounding boxes that appear to be moving due to noise interference in some static backgrounds.
[0160] However, a single judgment may have the following omissions: First, for those interferences that are similar to real motion in local features, such as false signals with a certain motion probability generated by changes in light and shadow in complex lighting environments, they may be misjudged as target bounding boxes; Second, in the process of motion map calculation, due to the limitations of the algorithm itself or parameter setting issues, some transient and seemingly regular interferences may not be effectively identified, such as the influence of flashing lights at a specific frequency.
[0161] Secondary judgment can make up for these omissions. It starts by analyzing the proportion of the target bounding box in multiple consecutive video frames and uses the continuity of the target object in the time dimension to further filter out false bounding boxes caused by accidental factors or brief interference, thereby improving the accuracy and reliability of overall target detection.
[0162] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of this application are not limited to the described order of actions, because according to the embodiments of this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of this application.
[0163] Based on the above embodiments, this embodiment also provides a target detection device, referring to... Figure 3 The structural diagram shown indicates that the device specifically includes: a motion detection module 301, a motion mapping determination module 302, a bounding box determination module 303, and a first-order judgment module 304.
[0164] The video acquisition module 301 is used to acquire the video sequence to be detected; the video sequence includes multiple video frames.
[0165] The motion map determination module 302 is used to determine the motion map of the i-th video frame in the video sequence; the pixel value in the motion map represents the motion probability corresponding to the pixel position; i is a positive integer.
[0166] The bounding box determination module 303 is used to determine the bounding box of the target object contained in the i-th video frame of the video sequence using the target detection model;
[0167] The first judgment module 304 is used to determine whether the bounding box of the target object contained in the i-th video frame is a false bounding box based on the motion map of the i-th video frame.
[0168] Optionally, the motion map determination module includes:
[0169] The first histogram determination module is used to determine the first directional gradient histogram feature corresponding to the i-th video frame in the video sequence;
[0170] The second histogram determination module is used to determine the second directional gradient histogram feature corresponding to the j-th video frame in the video sequence; j is a positive integer different from i; the number of frames between the i-th video frame and the j-th video frame in the time series does not exceed M;
[0171] The matching determination module is used to determine the motion map of the i-th video frame based on the matching degree between the features of the first directional gradient histogram and the features of the second directional gradient histogram.
[0172] Optionally, the first histogram determination module includes:
[0173] The partitioning module is used to divide the i-th video frame into multiple units;
[0174] The gradient determination module is used to determine the gradient intensity and gradient direction of each pixel in each unit.
[0175] The histogram feature determination module is used to determine the first-direction gradient histogram feature of each unit in the i-th video frame based on the gradient intensity of each unit's pixel in different gradient direction ranges.
[0176] Optionally, the matching determination module includes:
[0177] The metric module is used to determine the degree of matching between the features of the first directional gradient histogram and the features of the second directional gradient histogram using a metric method.
[0178] The motion probability determination module is used to determine the motion probability corresponding to the unit position in the motion map of the i-th video frame based on the matching degree corresponding to the unit position.
[0179] Optionally, the first-order determination module includes:
[0180] The pixel motion probability determination module is used to determine the motion probability corresponding to the pixel position in the motion map based on the motion probability corresponding to the unit position in the motion map.
[0181] The motion probability determination module is used to determine whether a bounding box is a false detection based on the motion probability corresponding to the pixel position in the bounding box.
[0182] Optionally, the motion probability determination module includes:
[0183] The position determination module is used to determine whether a pixel position is a moving position based on the motion probability corresponding to the pixel position in the bounding box and the preset probability value.
[0184] The bounding box determination module is used to determine whether a bounding box is a false detection based on the proportion of the number of moving positions in the bounding box to the total number of pixel positions in the bounding box.
[0185] Optionally, the device further includes:
[0186] The target bounding box determination module is used to take the corresponding bounding box as the target bounding box when the bounding box of the target object contained in the i-th video frame is not a falsely detected bounding box.
[0187] The secondary judgment module is used to determine whether the target bounding box is a falsely detected bounding box based on the proportion of the target bounding box in multiple consecutive video frames.
[0188] This application also provides a non-volatile readable storage medium storing one or more modules (programs). When these modules are applied to a device, they enable the device to execute the instructions for the method steps in this application.
[0189] This application provides one or more machine-readable media storing instructions that, when executed by one or more processors, cause an electronic device to perform one or more of the methods described in the above embodiments. In this application, the electronic device includes various types of devices such as terminal devices and servers (clusters).
[0190] The embodiments of this disclosure can be implemented as an apparatus configured as desired using any suitable hardware, firmware, software, or any combination thereof, including electronic devices such as terminal devices and servers (clusters). Figure 4 An exemplary apparatus 1100 is schematically shown that can be used to implement the various embodiments described in this application.
[0191] In one embodiment, Figure 4 An exemplary device 1100 is shown, which includes one or more processors 1102, a control module (chipset) 1104 coupled to at least one of the processors 1102, a memory 1106 coupled to the control module 1104, a non-volatile memory / storage device 1108 coupled to the control module 1104, one or more input / output devices 1110 coupled to the control module 1104, and a network interface 1112 coupled to the control module 1104.
[0192] Processor 1102 may include one or more single-core or multi-core processors, and processor 1102 may include any combination of general-purpose processors or special-purpose processors (e.g., graphics processors, application processors, baseband processors, etc.). In some embodiments, device 1100 can serve as a terminal device, server (cluster), or other device as described in the embodiments of this application.
[0193] In some embodiments, apparatus 1100 may include one or more computer-readable media (e.g., memory 1106 or non-volatile memory / storage device 1108) having instructions 1114 and one or more processors 1102 that are combined with the one or more computer-readable media and configured to execute instructions 1114 to implement modules and thus perform the actions described in this disclosure.
[0194] In one embodiment, the control module 1104 may include any suitable interface controller to provide any suitable interface to at least one of the processors 1102 and / or any suitable device or component communicating with the control module 1104.
[0195] The control module 1104 may include a memory controller module to provide an interface to the memory 1106. The memory controller module may be a hardware module, a software module, and / or a firmware module.
[0196] Memory 1106 may be used, for example, to load and store data and / or instructions 1114 for device 1100. In one embodiment, memory 1106 may include any suitable volatile memory, such as suitable DRAM (Dynamic Random Access Memory). In some embodiments, memory 1106 may include double data rate type quad synchronous dynamic random access memory.
[0197] In one embodiment, the control module 1104 may include one or more input / output controllers to provide an interface to the non-volatile memory / storage device 1108 and (one or more) input / output devices 1110.
[0198] For example, non-volatile memory / storage device 1108 may be used to store data and / or instructions 1114. Non-volatile memory / storage device 1108 may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable (one or more) non-volatile storage devices (e.g., one or more hard disk drives, one or more optical disk drives, and / or one or more digital universal optical disk drives).
[0199] The non-volatile memory / storage device 1108 may include storage resources that are physically part of a device on which the device 1100 is mounted, or that are accessible by the device but do not necessarily have to be part of the device. For example, the non-volatile memory / storage device 1108 may be accessed via a network via one or more input / output devices 1110.
[0200] One or more input / output devices 1110 may provide an interface for device 1100 to communicate with any other suitable device. Input / output devices 1110 may include communication components, audio components, sensor components, etc. Network interface 1112 may provide an interface for device 1100 to communicate via one or more networks. Device 1100 may wirelessly communicate with one or more components of a wireless network according to any of one or more wireless network standards and / or protocols, such as accessing wireless networks based on communication standards, such as WiFi (Wireless Fidelity), 2G (2-Generation wireless telephone technology), 3G (3-Generation wireless telephone technology), 4G (4-Generation wireless telephone technology), 5G (5-Generation wireless telephone technology), etc., or combinations thereof.
[0201] In one embodiment, at least one of the processors 1102 may be logically packaged with one or more controllers (e.g., memory controller modules) of the control module 1104. In one embodiment, at least one of the processors 1102 may be logically packaged with one or more controllers of the control module 1104 to form a system-in-package. In one embodiment, at least one of the processors 1102 may be integrated with the logic of one or more controllers of the control module 1104 on the same die. In one embodiment, at least one of the processors 1102 may be integrated with the logic of one or more controllers of the control module 1104 on the same die to form a system-on-a-chip.
[0202] In various embodiments, device 1100 may be, but is not limited to, a server, desktop computing device, or mobile computing device (e.g., laptop computing device, handheld computing device, touchscreen device, netbook, etc.). In various embodiments, device 1100 may have more or fewer components and / or different architectures. For example, in some embodiments, device 1100 includes one or more cameras, a keyboard, a liquid crystal display screen (including a touchscreen display), a non-volatile memory port, multiple antennas, a graphics chip, an application-specific integrated circuit (ASIC), and a speaker.
[0203] The detection device may use a main control chip as a processor or control module, and sensor data, position information, etc. may be stored in a memory or non-volatile memory / storage device. The sensor group may be used as an input / output device, and the communication interface may include a network interface.
[0204] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0205] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0206] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, create means for implementing the functions specified in one or more blocks of the flowchart illustrations and / or one or more blocks of the block diagrams.
[0207] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more blocks of a block diagram.
[0208] These computer program instructions may also be loaded onto a computer or other programmable data processing terminal equipment to cause a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable terminal equipment, provide steps for implementing the functions specified in one or more flowcharts and / or one or more blocks of a block diagram.
[0209] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present application.
[0210] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0211] The above provides a detailed description of a target detection method and apparatus, an electronic device, and a machine-readable medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and its core ideas. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application sets based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A target detection method, characterized in that, The method includes: Obtain the video sequence to be detected; the video sequence includes: multiple video frames; Determine the motion map of the i-th video frame in the video sequence; the pixel value in the motion map represents the motion probability corresponding to the pixel position; i is a positive integer; Using an object detection model, determine the bounding box of the target object contained in the i-th video frame of the video sequence; Based on the motion map of the i-th video frame, determine whether the bounding box of the target object contained in the i-th video frame is a false bounding box.
2. The method according to claim 1, characterized in that, Determining the motion map of the i-th video frame in the video sequence includes: Determine the first directional gradient histogram feature corresponding to the i-th video frame in the video sequence; Determine the second directional gradient histogram feature corresponding to the j-th video frame in the video sequence; j is a positive integer different from i; the number of frames between the i-th video frame and the j-th video frame in the time series does not exceed M; The motion map of the i-th video frame is determined based on the matching degree between the features of the first directional gradient histogram and the features of the second directional gradient histogram.
3. The method according to claim 2, characterized in that, Determining the first directional gradient histogram feature corresponding to the i-th video frame in the video sequence includes: Divide the i-th video frame into multiple units; Determine the gradient intensity and gradient direction of each pixel in each unit; Based on the gradient intensity of each pixel in different gradient directions, the first directional gradient histogram feature of each unit in the i-th video frame is determined.
4. The method according to claim 2, characterized in that, The step of determining the motion map of the i-th video frame based on the matching degree between the features of the first directional gradient histogram and the features of the second directional gradient histogram includes: The matching degree between the features of the first directional gradient histogram and the features of the second directional gradient histogram is determined using a metric method. Based on the matching degree corresponding to the unit position, determine the motion probability corresponding to the unit position in the motion map of the i-th video frame.
5. The method according to claim 1, characterized in that, The step of determining whether the bounding box of the target object contained in the i-th video frame is a false detection bounding box based on the motion map of the i-th video frame includes: Based on the motion probability corresponding to the unit position in the motion map, determine the motion probability corresponding to the pixel position in the motion map; Based on the motion probability corresponding to the pixel position in the bounding box, determine whether the bounding box is a false detection.
6. The method according to claim 5, characterized in that, The step of determining whether a bounding box is a false detection based on the motion probability corresponding to the pixel position within the bounding box includes: Based on the motion probability corresponding to the pixel position in the bounding box and the preset probability value, determine whether the pixel position is a moving position; Based on the proportion of the number of moving positions in the bounding box to the total number of pixel positions in the bounding box, determine whether the bounding box is a false detection.
7. The method according to any one of claims 1 to 5, characterized in that, The method further includes: If the bounding box of the target object contained in the i-th video frame is not a false bounding box, the corresponding bounding box is taken as the target bounding box. Based on the proportion of the target bounding box appearing in multiple consecutive video frames, it is determined whether the target bounding box is a false detection.
8. A target detection device, characterized in that, The device includes: The video acquisition module is used to acquire the video sequence to be detected; the video sequence includes multiple video frames; A motion map determination module is used to determine the motion map of the i-th video frame in the video sequence; the pixel value in the motion map represents the motion probability corresponding to the pixel position; i is a positive integer. The bounding box determination module is used to determine the bounding box of the target object contained in the i-th video frame of the video sequence using the target detection model; The first-order judgment module is used to determine whether the bounding box of the target object contained in the i-th video frame is a false bounding box based on the motion map of the i-th video frame.
9. An electronic device, characterized in that, include: processor; and A memory having executable code stored thereon, which, when executed, causes the processor to perform the method as described in any one of claims 1-7.
10. A machine-readable medium having executable code stored thereon, which, when executed, causes a processor to perform the method as claimed in any one of claims 1-7.