Target detection method, electronic equipment and computer readable storage medium

By employing dual verification standards in the target detection method, including size verification and region verification, the problem of high false positives in target object detection in existing technologies is solved, and the accuracy of target object statistics is improved.

CN121982276APending Publication Date: 2026-05-05ZHEJIANG DAHUA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG DAHUA TECH CO LTD
Filing Date
2025-12-09
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

The existing technology has a high false positive rate in target object detection, resulting in low accuracy in target object statistics.

Method used

By acquiring the target object type and projection area within the target recognition region, and combining verification size and region verification, a dual verification standard is adopted to ensure the accuracy of the target object.

Benefits of technology

It reduces the probability of missed and incorrect judgments, and improves the accuracy of target object statistics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121982276A_ABST
    Figure CN121982276A_ABST
Patent Text Reader

Abstract

The invention discloses a target detection method, electronic equipment and a computer readable storage medium. The method comprises the steps of obtaining a target object type of a to-be-recognized object in a target recognition area and a target projection area and a target projection size of the to-be-recognized object on a projection plane; obtaining a verification size matched with the target object type, and performing size verification on the to-be-identified object based on the verification size and the target projection size; in response to the fact that the to-be-recognized object passes size verification, obtaining a reference object in a preset range of the target recognition area, and determining a reference recognition area of the reference object and a reference projection area of the reference object on the projection plane; based on at least one of a recognition region combination of the target recognition region and the reference recognition region and a projection region combination of the target projection region and the reference projection region, performing region verification on the to-be-recognized object; and taking the to-be-identified object passing the region verification as a target object. According to the scheme, the accuracy of target object statistics can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer vision technology, and in particular to a target detection method, electronic device, and computer-readable storage medium. Background Technology

[0002] With the rapid development and widespread adoption of mobile internet technology, as well as the advancement of transportation, a massive amount of video frames have been generated. Currently, target object detection and statistical analysis are typically performed based on these video frames. However, existing technologies suffer from a high rate of false positives in target object detection, resulting in low accuracy in target object statistics. Therefore, improving the accuracy of target object statistics has become an urgent problem to be solved. Summary of the Invention

[0003] The main technical problem addressed by this application is to provide a target detection method, electronic device, and computer-readable storage medium that can improve the accuracy of target object statistics.

[0004] To address the aforementioned technical problems, a first aspect of this application provides a target detection method, comprising: acquiring the target object type of an object to be identified within a target identification region, as well as the target projection area and target projection size of the object to be identified on a projection plane; acquiring a verification size matching the target object type, and performing size verification on the object to be identified based on the verification size and the target projection size; in response to the object to be identified passing the size verification, acquiring a reference object within a preset range of the target identification region, and determining a reference identification region of the reference object and a reference projection region of the reference object on the projection plane; performing region verification on the object to be identified based on at least one of the identification region combination corresponding to the target identification region and the reference identification region, and the projection region combination corresponding to the target projection region and the reference projection region; and identifying the object to be identified that passes the region verification as the target object.

[0005] To address the aforementioned technical problems, a second aspect of this application provides an electronic device including a memory and a processor coupled to each other, wherein the memory stores program instructions and the processor executes the program instructions to implement the method described in the first aspect.

[0006] To address the aforementioned technical problems, a third aspect of this application provides a computer-readable storage medium storing program instructions executable by a processor, the program instructions being used to implement the method described in the first aspect.

[0007] The above scheme obtains the target object type of the object to be identified within the target recognition area, as well as the target projection area and target projection size of the object to be identified on the projection plane. It also obtains a verification size that matches the target object type and performs size verification on the object to be identified based on the verification size and the target projection size. When the object to be identified passes the size verification, it obtains a reference object within a preset range of the target recognition area, determines the reference recognition area corresponding to the reference object and the reference projection area of ​​the reference object on the projection plane, and performs region verification on the object to be identified based on at least one of the combination of the recognition area corresponding to the target recognition area and the reference recognition area, and the combination of the projection area corresponding to the target projection area and the reference projection area. The object to be identified that passes the region verification is taken as the target object to be counted. By first clarifying the target object type and unifying the verification standard, and then combining the dual verification of size verification and region verification to form a complementary system, it not only filters out objects with abnormal sizes but also excludes suspected misaligned objects, reducing the probability of missed or incorrect judgments, thereby improving the accuracy of target object statistics. Attached Figure Description

[0008] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein: Figure 1 This is a flowchart illustrating one embodiment of the target detection method of this application; Figure 2 This is a flowchart illustrating another embodiment of the target detection method of this application; Figure 3 This is a flowchart illustrating another implementation of the target detection method of this application; Figure 4 This is a schematic diagram of the structure of one embodiment of the electronic device of this application; Figure 5 This is a schematic diagram of one embodiment of the computer-readable storage medium of this application. Detailed Implementation

[0009] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments, and different implementation methods can be adaptively combined. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0010] In this paper, the terms "system" and "network" are often used interchangeably. The term "and / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Additionally, the character " / " generally indicates that the preceding and following related objects have an "or" relationship. Furthermore, "many" in this paper means two or more.

[0011] Please see Figure 1 , Figure 1 This is a flowchart illustrating one embodiment of the target detection method of this application. The target detection method includes: S101: Obtain the target object type of the object to be identified within the target recognition area, as well as the target projection area and target projection size of the object to be identified on the projection plane.

[0012] Specifically, the target object type of the object to be identified within the target recognition area is obtained, as well as the target projection area and target projection size of the object to be identified on the projection plane are obtained.

[0013] In one application, a monocular image is acquired using a monocular camera. The monocular image includes the object to be identified. A target detection model is used to identify the target recognition region and the target object type within the target recognition region. A monocular localization algorithm (such as key point detection and geometric constraints) is used to obtain the projection region of the object to be identified on the monocular image. The projection region of the object to be identified on the monocular image is projected onto a projection plane using a pre-calibrated homography transformation matrix, thereby obtaining the target projection region and target projection size of the object to be identified on the projection plane.

[0014] In another application, a synchronously triggered binocular camera acquires a left and right view containing the object to be identified. It is necessary to ensure that the intrinsic and extrinsic parameters of the two cameras have been preliminarily calibrated or online calibration is supported. The target recognition area and the target object type of the object to be identified within the target recognition area are identified using a target detection model on the left (or right) view. The three-dimensional spatial coordinates of the object to be identified with the left camera as the origin are obtained using a binocular matching and 3D point cloud reconstruction algorithm. The three-dimensional spatial coordinates are then transformed by a projection plane transformation and size calculation algorithm to obtain the target projection area and target projection size of the object to be identified on the projection plane.

[0015] S102: Obtain the verification size that matches the target object type, and perform size verification on the object to be identified based on the verification size and the target projection size.

[0016] Specifically, the verification size that matches the target object type is obtained, and the size of the object to be identified is verified based on the verification size and the target projection size.

[0017] In one application method, the mapping relationship between target object type and verification size is pre-stored in the configuration file. When the corresponding target object type is identified, the corresponding verification size is directly queried and matched. Based on the verification size and the target projection size, the size of the object to be identified is verified.

[0018] In another application, multiple qualified samples corresponding to the same target object type are collected, their actual measured projected dimensions are recorded and stored in a database. When the corresponding target object type is identified, the historical qualified data of that type is queried, and a verification dimension is generated through statistical methods. Based on the verification dimension and the target projected dimension, the size of the object to be identified is verified. Furthermore, when a new qualified sample is added, the statistical results are automatically updated to optimize the range of the verification dimension.

[0019] S103: In response to the object to be identified passing the size verification, obtain the reference object within the preset range of the target identification area, and determine the reference identification area of ​​the reference object and the reference projection area of ​​the reference object on the projection plane.

[0020] Specifically, once the object to be identified has passed the size verification, a reference object within the preset range of the target identification area is obtained, and the reference identification area corresponding to the reference object and the reference projection area of ​​the reference object on the projection plane are determined.

[0021] In one application, when the object to be identified passes the size verification, the target detection model is used to identify the reference object and its corresponding reference identification area within the preset range of the target identification area. The monocular localization algorithm is used to obtain the projection area of ​​the reference object on the image. The projection area of ​​the reference object on the image is projected onto the projection plane through the pre-calibrated homography transformation matrix to obtain the reference projection area of ​​the reference object on the projection plane.

[0022] In another application, once the object to be identified has passed the size verification, 3D point cloud data within a preset range of the target recognition area is acquired using a binocular camera. Based on the 3D features of the reference object, point sets that meet the conditions in the point cloud are selected. The selected point sets are clustered to obtain the 3D point set corresponding to the reference object. Its projection on the image plane is the reference recognition area. The 3D point set is then projected onto the projection plane to obtain the reference projection area of ​​the reference object on the projection plane.

[0023] S104: Perform region verification on the object to be identified based on at least one of the combination of the identification regions corresponding to the target identification region and the reference identification region, and the combination of the projection regions corresponding to the target projection region and the reference projection region.

[0024] Specifically, the object to be identified is verified based on at least one of the combination of the identification regions corresponding to the target identification region and the reference identification region, and the combination of the projection regions corresponding to the target projection region and the reference projection region.

[0025] In one application method, the region verification of the object to be identified is performed only based on the combination of the target recognition region and the reference recognition region.

[0026] In another application, the region verification of the object to be identified is performed only based on the combination of the projection regions corresponding to the target projection region and the reference projection region.

[0027] In another application, the object to be identified is verified by combining the identification regions corresponding to the target identification region and the reference identification region, as well as the projection regions corresponding to the target projection region and the reference projection region.

[0028] S105: Use the objects to be identified that pass the area inspection as the target objects.

[0029] Specifically, the objects to be identified that pass the regional verification are taken as the target objects to be counted.

[0030] The above scheme obtains the target object type of the object to be identified within the target recognition area, as well as the target projection area and target projection size of the object to be identified on the projection plane. It also obtains a verification size that matches the target object type and performs size verification on the object to be identified based on the verification size and the target projection size. When the object to be identified passes the size verification, it obtains a reference object within a preset range of the target recognition area, determines the reference recognition area corresponding to the reference object and the reference projection area of ​​the reference object on the projection plane, and performs region verification on the object to be identified based on at least one of the combination of the recognition area corresponding to the target recognition area and the reference recognition area, and the combination of the projection area corresponding to the target projection area and the reference projection area. The object to be identified that passes the region verification is taken as the target object to be counted. By first clarifying the target object type and unifying the verification standard, and then combining the dual verification of size verification and region verification to form a complementary system, it not only filters out objects with abnormal sizes but also excludes suspected misaligned objects, reducing the probability of missed or incorrect judgments, thereby improving the accuracy of target object statistics.

[0031] In one implementation, please refer to Figure 2 , Figure 2 This is a flowchart illustrating another embodiment of the target detection method of this application. The target detection method includes: S201: Obtain the target object type of the object to be identified within the target recognition area, as well as the target projection area and target projection size of the object to be identified on the projection plane.

[0032] Specifically, the target object type of the object to be identified within the target recognition area is obtained, as well as the target projection area and target projection size of the object to be identified on the projection plane are obtained.

[0033] S202: Obtain the tolerance coefficient and size threshold that match the target object type, and obtain the verification size based on the tolerance coefficient and size threshold.

[0034] Specifically, each target object type is matched with a corresponding tolerance coefficient and size threshold. Based on the obtained tolerance coefficient and size threshold, the verification size corresponding to the target object type is obtained.

[0035] In one implementation scenario, the object to be identified is a vehicle target. The target object types of the vehicle target include small cars, medium cars, and large cars. The tolerance coefficient ranges from 0.15 to 0.25. Specifically, the tolerance coefficient for small cars is 0.15, and the size threshold is 2.0m; the tolerance coefficient for medium cars is 0.2, and the size threshold is 2.3m; and the tolerance coefficient for large cars is 0.25, and the size threshold is 2.8m. According to the calculation formula: Validation size = Size threshold × (1 + Tolerance coefficient), the validation size corresponding to the target object type is calculated.

[0036] In other implementation scenarios, the tolerance coefficient can be preset to a fixed value, such as 0.15, 0.2, and 0.25, and can be flexibly adjusted according to the actual situation. This application does not impose specific restrictions here.

[0037] It should be noted that since the width of the vehicle target changes less than its length, using the width as a size threshold to obtain the verification size and supplementing it with the length for judgment can achieve better verification results. Of course, in other implementation scenarios, the length can also be used as a scale threshold to obtain the verification size and supplementing it with the width for judgment. This application does not impose any specific restrictions here.

[0038] S203: Use the verification dimensions to verify the target projection dimensions of the object to be identified.

[0039] Specifically, the obtained verification dimensions are used to verify the size of the target projection corresponding to the object to be identified. Since the actual size ranges of different target object types are different, a tolerance coefficient and size threshold are set in a targeted manner to avoid misjudgment caused by using a uniform standard, thereby further improving the accuracy of subsequent target object statistics.

[0040] In one implementation scenario, the object to be identified is a small car with a corresponding target projection size of 2.8m. The size threshold for matching a small car is 2.0m, and the tolerance coefficient is 0.15. According to the calculation formula: verification size = size threshold × (1 + tolerance coefficient), the calculated verification size is 2.3m. Since 2.8m is greater than 2.3m, the small car is marked as an abnormal vehicle and filtered out.

[0041] In another implementation scenario, the object to be identified is a medium-sized vehicle, and the corresponding target projection size is 2.5m. The size threshold for matching a medium-sized vehicle is 2.3m, and the tolerance coefficient is 0.2. According to the calculation formula: verification size = size threshold × (1 + tolerance coefficient), the calculated verification size is 2.76m. Since 2.5m is less than 2.76m, the medium-sized vehicle is marked as a normal vehicle and retained.

[0042] S204: Obtain the historical projection size of the identified target object corresponding to the target object type, and determine the verification adjustment size that matches the target object type based on the historical projection size.

[0043] Specifically, the historical projection size of the target object that has been identified is obtained, and the verification adjustment size that matches the target object type is determined based on the historical projection size.

[0044] In one implementation scenario, step S204, which determines the verification adjustment size matching the target object type based on historical projection sizes, specifically includes: determining the mean projection size, standard deviation of projection size, and distribution of projection size matching the target object type based on historical projection sizes; wherein, the projection size distribution corresponds to a confidence interval; obtaining the limit coefficient based on the confidence interval corresponding to the projection size distribution; and obtaining the verification adjustment size based on the mean projection size, standard deviation of projection size, and limit coefficient.

[0045] Specifically, based on historical projection dimensions, the mean projection dimension, standard deviation projection dimension, and projection dimension distribution matching the target object type are determined. The mean projection dimension is the average projection dimension of normal objects. The standard deviation projection dimension reflects the dispersion of normal object projection dimensions; a smaller value indicates more concentrated dimensions, while a larger value indicates greater size variation. The projection dimension distribution is a statistically derived distribution pattern based on a large amount of collected normal object projection dimension data, and the distribution corresponds to a confidence interval. Based on the confidence interval corresponding to the projection dimension distribution, the boundary coefficient k is obtained. Statistically, a boundary coefficient k of 1.96 corresponds to a 95% confidence interval, indicating that 95% of the target object type is within a certain range. The projected dimensions of objects are within this confidence interval, while only 5% of the projected dimensions are outside this confidence interval. Based on the formula: Verification Adjustment Size = Mean Projected Dimension + k × Standard Deviation of Projected Dimension, the verification adjustment size is calculated. Based on a large amount of historical normal data, the calculation of the mean, standard deviation, and distribution reflects the true size characteristics, avoiding biases caused by subjective experience. Furthermore, the introduction of confidence intervals and limit coefficients clarifies the reasonable range of normal sizes, accurately distinguishing between normal and abnormal object projected dimensions. Moreover, the calculation logic of the verification adjustment size is quantifiable and traceable, resulting in stable and reliable results that can adapt to the size verification needs of different types of target objects, thereby improving the accuracy of subsequent size verification using the verification adjustment size.

[0046] S205: Use the verification adjustment size to perform size verification on the target projection size of the object to be identified.

[0047] Specifically, the obtained calibration adjustment dimensions are used to perform dimensional calibration on the target projection dimensions.

[0048] S206: In response to the object to be identified passing the size verification, obtain the reference object within the preset range of the target identification area, and determine the reference identification area of ​​the reference object and the reference projection area of ​​the reference object on the projection plane.

[0049] Specifically, once the object to be identified has passed the size verification, a reference object within the preset range of the target identification area is obtained, and the reference identification area corresponding to the reference object and the reference projection area of ​​the reference object on the projection plane are determined.

[0050] In one implementation scenario, step S206, obtaining a reference object within a preset range of the target recognition region, specifically includes: obtaining candidate objects within the preset range of the target recognition region; and using the candidate objects that are distinct from the target object type of the object to be recognized as the reference objects.

[0051] Specifically, candidate objects within a preset range of the target recognition area are obtained, and candidate objects that are different from the target object category of the object to be recognized are used as reference objects.

[0052] In one application scenario, both the object to be identified and the reference object are vehicle targets. The vehicle type distinction corresponding to the vehicle target includes coarse classification and fine classification. Specifically, the vehicle type corresponding to the vehicle target can be coarsely classified into small cars, medium cars, and large cars based on the vehicle shape. When the target recognition area is full of small cars, medium cars, or large cars within a preset range, the vehicle type corresponding to the vehicle target can be finely classified into transport vehicles, trucks, buses, and cars, etc., based on the vehicle's function.

[0053] In a specific application scenario, the object to be identified in the video frame is a small car, and there is a candidate object, a large car, within the preset range of the target recognition area of ​​the small car. The large car is used as the reference object.

[0054] In another specific application scenario, the object to be identified in the video frame is a small car, and there are multiple candidate objects within the preset range of the target recognition area of ​​the small car, including small cars, medium-sized cars and large cars. In this case, medium-sized cars and large cars can be used as reference objects.

[0055] In another specific application scenario, the object to be identified in the video frame is a large vehicle, and there is a candidate object that is also a large vehicle within the preset range of the target recognition area of ​​the large vehicle. In this case, the object to be identified is subdivided into trucks according to the function of the vehicle, and the candidate object is a transport vehicle, which is used as the reference object.

[0056] It should be noted that if the reference object is a transport vehicle, and the object to be identified is a car transported by the transport vehicle, then the number of cars on the transport vehicle may be more than one, and these cars may be new cars or faulty cars, etc. Alternatively, if the object to be identified is a bus or truck transported by the transport vehicle, since buses or trucks are larger, the number of buses or trucks on the transport vehicle is generally only one.

[0057] S207: Perform region verification on the object to be identified based on at least one of the combination of the target recognition region and the reference recognition region, and the combination of the projection region and the reference projection region.

[0058] Specifically, the object to be identified is verified based on at least one of the combination of the identification regions corresponding to the target identification region and the reference identification region, and the combination of the projection regions corresponding to the target projection region and the reference projection region.

[0059] In one embodiment, the identification region combination corresponds to the identification intersection region between the target identification region and the reference identification region, and the identification intersection region matches the target identification region by a first proportion; the projection region combination corresponds to the projection intersection region between the target projection region and the reference projection region, and the projection intersection region matches the target projection region by a second proportion; wherein, the object to be identified and the reference object are identified from video frames, and the region verification is performed based on the number of frames in multiple video frames whose first proportion exceeds a first threshold, and / or the number of frames in multiple video frames whose second proportion exceeds a second threshold.

[0060] Specifically, if the target recognition region intersects with the reference recognition region, there is a corresponding recognition intersection region, and the recognition intersection region matches the target recognition region with a first proportion. The target object is verified based on the number of frames in multiple video frames where the first proportion exceeds a first threshold. Alternatively, if the target projection region overlaps with the reference projection region, there is a corresponding projection intersection region, and the projection intersection region matches the target projection region with a second proportion. The target object is verified based on the number of frames in multiple video frames where the second proportion exceeds a second threshold. Alternatively, if the target recognition region intersects with the reference recognition region and the target projection region overlaps with the reference projection region, there are corresponding recognition intersection regions and projection intersection regions, and the recognition intersection region matches the target recognition region with a first proportion, and the projection intersection region matches the target projection region with a second proportion. The target object is verified based on the number of frames in multiple video frames where the first proportion exceeds the first threshold and the number of frames where the second proportion exceeds the second threshold. By using multi-frame recognition, the instantaneous misjudgment caused by single-frame recognition is avoided, thereby improving the stability of subsequent target detection filtering results.

[0061] In some implementation scenarios, the first percentage can be in the range of 0.7-0.9, such as 0.7, 0.75, 0.8, 0.85 and 0.9, and the second percentage can be in the range of 0.4-0.6, such as 0.4, 0.45, 0.5, 0.55 and 0.6. It can be flexibly set according to the actual situation, and this application does not impose specific restrictions here. In one implementation scenario, step S207, which involves performing region verification on the object to be identified, specifically includes: obtaining matching frames from multiple video frames whose first proportion exceeds a first threshold and whose second proportion exceeds a second threshold, and determining the number of verification frames corresponding to the matching frames; and determining the region verification result of the object to be identified based on the temporal correlation between the matching frames and the relationship between the number of verification frames and the frame number threshold.

[0062] Specifically, matching frames with a first proportion exceeding a first threshold and a second proportion exceeding a second threshold are obtained from multiple video frames. The number of verification frames corresponding to the matching frames is determined. Based on the temporal correlation between the matching frames and the relationship between the number of verification frames and the frame number threshold, the region verification result of the object to be identified is obtained.

[0063] In a specific implementation scenario, 10 consecutive video frames are acquired, in which the object to be identified and the reference object are included. Matching frames with a first proportion exceeding a first threshold and a second proportion exceeding a second threshold are obtained from these 10 consecutive video frames. For example, frames 2, 5, 6, 8, and 10 all meet this condition, resulting in a corresponding verification frame count of 5 frames. When the interval between two consecutive matching frames does not exceed 3 frames and the frame count threshold corresponding to the verification frame count is not less than 5 frames, the region verification result of the object to be identified is determined to be filtered; otherwise, it is retained.

[0064] In other implementation scenarios, in order to further improve the accuracy of subsequent target object statistics, the filtering condition can be that 10 consecutive video frames are matching frames, and the frame number threshold corresponding to the number of verification frames is not less than 10 frames. The region verification result of the object to be identified is then filtered. This application does not impose specific restrictions on how the filtering conditions are set, and can be flexibly adjusted according to the actual application scenario.

[0065] S208: Use the objects to be identified that pass the area inspection as the target objects.

[0066] Specifically, the objects to be identified that pass the regional verification are taken as the target objects to be counted.

[0067] Please see Figure 3 , Figure 3 This is a flowchart illustrating another embodiment of the target detection method of this application. The target detection method includes: S301: Obtain the target object type of the object to be identified within the target recognition area, as well as the target projection area and target projection size of the object to be identified on the projection plane.

[0068] Specifically, the target object type of the object to be identified within the target recognition area is obtained, as well as the target projection area and target projection size of the object to be identified on the projection plane are obtained.

[0069] S302: Obtain the historical projection size of the identified target object corresponding to the target object type, and determine the verification size that matches the target object type based on the historical projection size.

[0070] Specifically, the historical projection size of the target object that has been identified is obtained, and a verification size matching the target object type is determined based on the historical projection size. The steps for obtaining the verification size have been described in the above embodiments and will not be repeated here.

[0071] S303: Use the verification dimensions to verify the target projection dimensions of the object to be identified.

[0072] Specifically, the obtained verification dimensions are used to verify the dimensions of the target projection.

[0073] S304: In response to the object to be identified passing the size verification, obtain the reference object within the preset range of the target identification area, and determine the reference identification area of ​​the reference object and the reference projection area of ​​the reference object on the projection plane.

[0074] Specifically, once the object to be identified has passed the size verification, a reference object within the preset range of the target identification area is obtained, and the reference identification area corresponding to the reference object and the reference projection area of ​​the reference object on the projection plane are determined.

[0075] S305: Perform region verification on the object to be identified based on at least one of the combination of the target recognition region and the reference recognition region, and the combination of the projection region and the reference projection region.

[0076] Specifically, the object to be identified is verified based on at least one of the combination of the identification regions corresponding to the target identification region and the reference identification region, and the combination of the projection regions corresponding to the target projection region and the reference projection region.

[0077] S306: Use the objects to be identified that pass the area inspection as the target objects.

[0078] Specifically, the objects to be identified that pass the regional verification are taken as the target objects to be counted.

[0079] The above scheme can further improve the efficiency of target detection by directly using a dynamically adjustable verification size to detect the object to be identified.

[0080] Please see Figure 4 , Figure 4This is a schematic diagram of an embodiment of the electronic device of this application. The electronic device 40 includes a memory 400 and a processor 402 coupled to each other. The memory 400 stores program data (not shown). The processor 402 calls the program data to implement the method in any of the above embodiments. For related descriptions, please refer to the detailed description of the above method embodiments, which will not be repeated here. Specifically, the electronic device 40 includes: desktop computers, laptops, tablet computers, servers, etc., which are not limited here. In addition, the processor 402 can also be called a CPU (Center Processing Unit). The processor 402 may be an integrated circuit chip with signal processing capabilities. The processor 402 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor. In addition, the processor 402 can be implemented by integrated circuit chips.

[0081] Please see Figure 5 , Figure 5 This is a schematic diagram of a computer-readable storage medium according to an embodiment of the present application. The computer-readable storage medium 50 stores program data 500. When the program data 500 is executed by a processor, it implements the method in any of the above embodiments. For related descriptions, please refer to the detailed description of the above method embodiments, which will not be repeated here.

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

[0083] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0084] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0085] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A target detection method, characterized in that, include: Obtain the target object type of the object to be identified within the target recognition area, as well as the target projection area and target projection size of the object to be identified on the projection plane; Obtain the verification size that matches the target object type, and perform size verification on the object to be identified based on the verification size and the target projection size; In response to the object to be identified passing size verification, a reference object within a preset range of the target identification area is obtained, and the reference identification area of ​​the reference object and the reference projection area of ​​the reference object on the projection plane are determined. Based on at least one of the combination of the target recognition region and the reference recognition region, and the combination of the projection region corresponding to the target projection region and the reference projection region, the region of the object to be identified is verified. The object to be identified that passes the region verification is taken as the target object.

2. The method according to claim 1, characterized in that, The step of obtaining a verification size that matches the target object type, and performing size verification on the object to be identified based on the verification size and the target projection size, includes: Obtain the tolerance coefficient and size threshold that match the target object type, and obtain the verification size based on the tolerance coefficient and the size threshold; The target projection size of the object to be identified is verified using the verification size.

3. The method according to claim 2, characterized in that, After performing size verification on the target projection size of the object to be identified using the verification size, the method further includes: Obtain the historical projection size of the identified target object corresponding to the target object type, and determine the verification adjustment size that matches the target object type based on the historical projection size; The target projection size of the object to be identified is verified using the verification adjustment size.

4. The method according to claim 3, characterized in that, The step of determining the verification adjustment size that matches the target object type based on the historical projection size includes: Based on the historical projection dimensions, determine the mean projection dimensions, standard deviation projection dimensions, and projection dimension distribution that match the target object type; wherein, the projection dimension distribution corresponds to a confidence interval; Based on the confidence intervals corresponding to the projected size distribution, the boundary coefficients are obtained; The calibration adjustment size is obtained based on the mean of the projected size, the standard deviation of the projected size, and the limit coefficient.

5. The method according to claim 1, characterized in that, The step of obtaining a verification size that matches the target object type, and performing size verification on the object to be identified based on the verification size and the target projection size, includes: Obtain the historical projection size of the identified target object corresponding to the target object type, and determine the verification size that matches the target object type based on the historical projection size; The target projection size of the object to be identified is verified using the verification size.

6. The method according to claim 1, characterized in that, The combination of recognition regions corresponds to the recognition intersection region between the target recognition region and the reference recognition region, and the recognition intersection region matches the target recognition region with a first proportion; the combination of projection regions corresponds to the projection intersection region between the target projection region and the reference projection region, and the projection intersection region matches the target projection region with a second proportion; The object to be identified and the reference object are identified from video frames. The region verification is based on the number of frames in multiple video frames whose first proportion exceeds a first threshold and / or the number of frames in multiple video frames whose second proportion exceeds a second threshold.

7. The method according to claim 6, characterized in that, The process of performing region verification on the object to be identified includes: From multiple video frames, obtain matching frames whose first proportion exceeds a first threshold and whose second proportion exceeds a second threshold, and determine the number of verification frames corresponding to the matching frames; Based on the temporal correlation between the matching frames and the relationship between the number of verification frames and the frame number threshold, the region verification result of the object to be identified is determined.

8. The method according to claim 1, characterized in that, The step of obtaining a reference object within a preset range of the target recognition region includes: Obtain candidate objects within a preset range of the target recognition region; The candidate object that is distinct from the target object type of the object to be identified is used as the reference object.

9. An electronic device, characterized in that, The method includes a memory and a processor coupled to each other, the memory storing program instructions, and the processor executing the program instructions to implement the method according to any one of claims 1-8.

10. A computer-readable storage medium, characterized in that, The system stores program instructions that can be executed by a processor, the program instructions being used to implement the method according to any one of claims 1-8.