A method and apparatus for detecting

By obtaining the initial target area from traffic monitoring videos and combining it with the results of the target detection model, the problem of low accuracy in detecting small targets at long distances is solved, and efficient and accurate small target recognition is achieved.

CN113989752BActive Publication Date: 2025-12-19ALIBABA GROUP HOLDING LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010652030.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-08
Publication Date
2025-12-19
Estimated Expiration
2040-07-08

AI Technical Summary

Technical Problem

In existing technologies, it is difficult to accurately detect small targets at a distance in traffic videos because image scaling leads to pixel loss, which affects detection accuracy.

Method used

By obtaining the initial target region of the image to be detected, the target detection model is used to obtain the initial objects and their results in the image and the target region respectively, and the final target object is determined based on these results. The detection results are then combined to accurately detect small targets.

Benefits of technology

It improves the detection accuracy and computational efficiency of small targets at long distances, enhances the user experience, and achieves accurate identification of small targets at long distances.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113989752B_ABST
    Figure CN113989752B_ABST
Patent Text Reader

Abstract

Embodiments of the present specification provide a detection method and device, wherein the detection method comprises: acquiring a to-be-detected image, and determining an initial target region of the to-be-detected image; acquiring a first initial object in the to-be-detected image and a first result of the first initial object, and a second initial object in the initial target region and a second result of the second initial object; and determining a target object based on the first initial object and the first result, the second initial object and the second result. The detection method first extracts the initial target region of the small target in the to-be-detected image, and then simultaneously performs target detection and fusion on the to-be-detected image and the initial target region of the small target, and finally combines the detection results to realize accurate detection of the small target.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present specification relate to the technical field of computer technology, and particularly relate to a detection method. One or more embodiments of the present specification also relate to a detection device, a computing device, and a computer-readable storage medium. BACKGROUND

[0002] Most of the existing target detection algorithms use deep learning models. In order to facilitate calculation and reduce storage overhead, such models usually need to reduce the input image to a specific size. Small targets in the image will contain fewer pixels after being reduced, and even cause the loss of pixels, which brings challenges to the detection of small targets. In traffic videos, small targets usually appear in the distance, which makes it difficult to accurately detect distant targets, greatly limiting the ability boundary of the product.

[0003] Therefore, it is necessary to provide a detection method for accurately detecting small targets at a distance. SUMMARY

[0004] Therefore, the embodiments of the present specification provide a detection method. One or more embodiments of the present specification also relate to a detection device, a computing device, and a computer-readable storage medium to solve the technical defects in the prior art.

[0005] According to a first aspect of the embodiments of the present specification, a detection method is provided, comprising:

[0006] obtaining a to-be-detected image, and determining an initial target region of the to-be-detected image;

[0007] obtaining a first initial object and a first result in the to-be-detected image, and

[0008] obtaining a second initial object and a second result in the initial target region;

[0009] determining a target object based on the first initial object and the first result, the second initial object and the second result.

[0010] According to a second aspect of the embodiments of the present specification, a detection method is provided, comprising:

[0011] based on a user's call request, an image input interface is displayed for the user;

[0012] receiving a to-be-detected image input by the user based on the image input interface, and determining an initial target region of the to-be-detected image;

[0013] obtaining a first initial object in the to-be-detected image and a first result of the first initial object and a second initial object in the initial target region and a second result of the second initial object according to a target detection model;

[0014] determining a target object based on the first initial object and the first result, the second initial object and the second result, and returning the target object to the user.

[0015] According to a third aspect of the embodiments of the present specification, a detection method is provided, comprising:

[0016] receiving a calling request sent by a user, wherein the calling request carries a to-be-detected image;

[0017] determining an initial target region of the to-be-detected image;

[0018] obtaining a first initial object in the to-be-detected image and a first result of the first initial object and a second initial object in the initial target region and a second result of the second initial object according to a target detection model;

[0019] determining a target object based on the first initial object and the first result, the second initial object and the second result, and returning the target object to the user.

[0020] According to a fourth aspect of the embodiments of the present specification, a detection device is provided, comprising:

[0021] an image acquisition module configured to acquire a to-be-detected image and determine an initial target region of the to-be-detected image;

[0022] a first obtaining module configured to obtain a first initial object in the to-be-detected image and a first result, and

[0023] obtain a second initial object in the initial target region and a second result;

[0024] a first target object determining module configured to determine a target object based on the first initial object and the first result, the second initial object and the second result.

[0025] According to a fifth aspect of the embodiments of the present specification, a detection device is provided, comprising:

[0026] an interface display module configured to display an image input interface for a user based on a calling request of the user;

[0027] a first initial region determining module configured to receive a to-be-detected image input by the user based on the image input interface, and determine an initial target region of the to-be-detected image;

[0028] The second obtaining module is configured to obtain, according to the target detection model, a first initial object in the image to be detected and a first result of the first initial object, and a second initial object in the initial target region and a second result of the second initial object.

[0029] The second target object determination module is configured to determine a target object based on the first initial object and the first result, the second initial object and the second result, and return the target object to the user.

[0030] According to a sixth aspect of an embodiment of the present specification, a detection device is provided, comprising:

[0031] The request receiving module is configured to receive a calling request sent by a user, wherein the calling request carries an image to be detected.

[0032] The second initial region determination module is configured to determine an initial target region of the image to be detected.

[0033] The third obtaining module is configured to obtain, according to the target detection model, a first initial object in the image to be detected and a first result of the first initial object, and a second initial object in the initial target region and a second result of the second initial object.

[0034] The third target object determination module is configured to determine a target object based on the first initial object and the first result, the second initial object and the second result, and return the target object to the user.

[0035] According to a seventh aspect of an embodiment of the present specification, a computing device is provided, comprising:

[0036] A memory and a processor;

[0037] The memory is configured to store computer executable instructions, and the processor is configured to execute the computer executable instructions, wherein the processor executes the computer executable instructions to implement the steps of the detection method.

[0038] According to an eighth aspect of an embodiment of the present specification, a computer readable storage medium is provided, which stores computer executable instructions, and the instructions are executed by a processor to implement the steps of the detection method.

[0039] One embodiment of the present specification realizes a detection method and device, wherein the detection method comprises obtaining a to-be-detected image, and determining an initial target region of the to-be-detected image; obtaining a first initial object and a first result in the to-be-detected image, and a second initial object and a second result in the initial target region; determining a target object based on the first initial object and the first result, and the second initial object and the second result; the detection method first extracts an initial target region of a small target in a to-be-detected image, and then simultaneously performs target detection and fusion on the to-be-detected image and the initial target region of the small target, finally combines the detection results to realize accurate detection of the small target. BRIEF DESCRIPTION OF DRAWINGS

[0040] Figure 1 is a specific example diagram of a detection method applied to a traffic monitoring scene provided by one embodiment of the present specification;

[0041] Figure 2 is a flowchart of a first detection method provided by one embodiment of the present specification;

[0042] Figure 3 is a schematic diagram of an initial object obtained from a to-be-detected image and an initial target region in the detection method provided by one embodiment of the present specification;

[0043] Figure 4 is a flowchart of determining a final long-distance region in a traffic monitoring scene by a detection method provided by one embodiment of the present specification;

[0044] Figure 5 is a flowchart of a second detection method provided by one embodiment of the present specification;

[0045] Figure 6 is a flowchart of a third detection method provided by one embodiment of the present specification;

[0046] Figure 7 is a structural schematic diagram of a first detection device provided by one embodiment of the present specification;

[0047] Figure 8 is a structural schematic diagram of a second detection device provided by one embodiment of the present specification;

[0048] Figure 9 is a structural schematic diagram of a third detection device provided by one embodiment of the present specification;

[0049] Figure 10 is a structural block diagram of a computing device provided by one embodiment of the present specification. DETAILED DESCRIPTION

[0050] In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present description. However, the present description can be practiced without the specific details. In other instances, well-known methods, procedures, components, and circuits have not been described in detail so as not to obscure the present description. The present description can be practiced with the specific details presented and / or by appropriately applying the concepts described with the disclosure.

[0051] The terminology used in this description is for the purpose of describing particular embodiments only and is not intended to be limiting of one or more embodiments of the present description. As used in this description and the appended claims, the singular forms "a," "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0052] It will be understood that, although the terms first, second, etc. can be used herein to describe various information, these terms are not intended to denote a temporal or chronological order. Rather, these terms are used solely to distinguish one from another only. For example, a first entity discussed below could later be discussed as a second entity, and similarly, a second entity discussed below could later be discussed as a first entity without departing from the scope of one or more embodiments of the present description. As used herein, the term "if' can be interpreted to mean "when" or "upon" or "in response to determining" taking into account the context in which the term is used.

[0053] First, the noun terms related to one or more embodiments of the present description are explained.

[0054] Target detection algorithm: a computer vision algorithm that takes an image as input and outputs the locations and categories of different targets in the image.

[0055] Far distance perception: refers to the ability to accurately detect and recognize targets (e.g., vehicles, pedestrians, etc.) in a traffic monitoring scenario when the targets are far away from the monitoring device.

[0056] In the present description, a detection method is provided. One or more embodiments of the present description also relate to a detection apparatus, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.

[0057] In a traffic monitoring scenario, small targets (such as vehicles, pedestrians, etc.) in a monitoring video image usually appear in the upper and far distance area of the monitoring video image. In order to facilitate calculation and reduce storage overhead, the small target detection method in the prior art usually needs to reduce the input image to a specific size, and then use the bottom layer features of the deep network to fully mine the target information in the high resolution feature map. However, the scaling process of the image will cause the small target in the image to be reduced or even lost, which makes it difficult to accurately detect the small target. Based on this, one or more embodiments of the present specification provide a detection method to solve the above technical problems. However, in actual application, the detection method provided by one or more embodiments of the present specification can not only be applied to the traffic monitoring scenario, but also can be applied to any scenario that needs to detect small targets in images and videos, such as sports competition scenarios, various performance scenarios, etc. The present application does not make any limitation on this.

[0058] For ease of understanding, the detection method is applied to the detection of small target vehicles in a traffic monitoring scenario.

[0059] Referring to Figure 1 , Figure 1 FIG. 1 shows a specific example diagram of a detection method applied to a traffic monitoring scenario according to one embodiment of the present specification.

[0060] Figure 1 The application scenario includes an image acquisition terminal 102, an image receiving terminal 104 and a server 106. Specifically, the image receiving terminal 104 receives a traffic scene image a collected by the image acquisition terminal 102 in real time, wherein the traffic scene image a includes but is not limited to road information, vehicle information and pedestrian information. After receiving the traffic scene image a, the image receiving terminal 104 determines and labels an initial far distance area in the traffic scene image a (see the dotted box area in FIG. 1) according to historical experience (i.e. generally the upper part of the image in the traffic scene is a far distance area), and then sends the traffic scene image a with the labeled initial far distance area to the server 106. After receiving the traffic scene image a, the server 106 calculates a target far distance area containing a road in the initial far distance area of the traffic scene image a by using intelligent algorithms such as manual labeling, road segmentation algorithm or vehicle detection algorithm. Figure 1

[0061] ​Then the server 106 inputs the traffic scene image a into the pre-trained vehicle detection model to obtain first initial objects (such as vehicles, pedestrians, etc.) in the traffic scene image a, and inputs the target long-distance region into the pre-trained vehicle detection model to obtain second initial objects (such as vehicles, pedestrians, etc.) in the target long-distance region; at this time, the first initial objects and the second initial objects are matched, the second initial objects that can be detected in the target long-distance region but cannot be detected in the traffic scene image a are taken as the first target objects, and the second initial objects that are detected in both the target long-distance region and the traffic scene image a but have a smaller score in the traffic scene image a than in the target long-distance region are taken as the second target objects.

[0062] Finally, the first target objects and the second target objects are combined to form the final small target objects.

[0063] The detection method for long-distance small targets in a traffic monitoring video provided by the embodiments of the present specification first determines a target long-distance region in a traffic scene image a based on historical experience and various intelligent algorithms, etc., and then uses the detection results based on the original image (i.e., the traffic scene image a) and the target long-distance region to obtain higher-precision small targets in the traffic monitoring scene, thereby improving the long-distance perception ability of the detection method.

[0064] Referring to Figure 2 , Figure 2 A flowchart of a first detection method provided according to an embodiment of the present specification is shown, including the following steps:

[0065] Step 202: Obtain a to-be-detected image, and determine an initial target region of the to-be-detected image.

[0066] The to-be-detected image can be any scene image, for example, in a traffic monitoring scene, the to-be-detected image includes a traffic video frame image, and the first initial objects and the second initial objects include vehicles; specifically, the to-be-detected image can be a monitoring video frame collected by an image collection terminal and containing vehicles, pedestrians, roads, etc., wherein the image collection terminal can be a camera; in a sports competition scene, the to-be-detected image can be a shooting video frame collected by an image collection terminal and containing athletes, competition venues, and audiences, etc.

[0067] Specifically, in this embodiment, obtaining a to-be-detected image can be to obtain a to-be-detected image collected by an image collection terminal in real time, or to obtain a to-be-detected image collected by an image collection terminal and stored in a certain storage area in advance.

[0068] In specific implementation, the determination of the initial target region of the to-be-detected image includes:

[0069] determining an initial region of the to-be-detected image;

[0070] perform calculation on the initial region based on a preset algorithm to obtain an initial target region in the initial region.

[0071] In actual application, the initial region of the to-be-detected image can be determined through historical data. For example, it is known through historical data that the initial region is generally located at the top of the to-be-detected image. Therefore, the top of the to-be-detected image can be defined as the initial region. Specifically, the size of the initial region of the to-be-detected image can be determined by averaging the size of the initial region in historical data.

[0072] After the initial region of the to-be-detected image is determined in the above manner, the initial region can be calculated based on a preset algorithm to obtain an initial target region in the initial region. When the target object in the initial target region is obtained through the target detection model subsequently, invalid target objects can be reduced, the calculation amount of the target detection model can be reduced, and the calculation efficiency can be improved. The preset algorithm includes, but is not limited to, a road segmentation algorithm and a vehicle detection algorithm.

[0073] For example, if the to-be-detected image is a traffic monitoring image containing vehicles in a traffic monitoring scene, after the traffic monitoring image is obtained, the initial long-distance region in the traffic monitoring image is determined based on historical data, and then the road region in the initial long-distance region is calculated based on a road segmentation algorithm or a vehicle detection algorithm, and the road region is taken as the initial target region of the traffic monitoring image. Since the target object (i.e., vehicles and pedestrians, etc.) generally appears in the road region in actual application scenarios, the road region is taken as the initial target region of the traffic monitoring image. When the target object in the initial target region is obtained based on the target detection model subsequently, the target object in the non-road region is excluded, and only the target object in the road region is obtained, which greatly reduces the calculation amount of the target detection model for obtaining the target object and improves the calculation efficiency.

[0074] Step 204: obtaining a first initial object and a first result in the to-be-detected image, and obtaining a second initial object and a second result in the initial target region.

[0075] In actual application, the first initial object and the first result in the to-be-detected image and the second initial object and the second result in the initial target region can be obtained through a machine learning model or other object detection method. In order to improve the speed and accuracy of object and result acquisition, the target detection model is used to realize the acquisition of objects and results in the to-be-detected image and the initial target region in the embodiments of the present specification. The specific implementation manner is as follows:

[0076] The obtaining the first initial object and the first result in the to-be-detected image and the obtaining the second initial object and the second result in the initial target region include:

[0077] The first initial object and the first result in the to-be-detected image are obtained according to a target detection model.

[0078] The second initial object and the second result in the initial target region are obtained according to the target detection model,

[0079] The target detection model is suitable for detecting an object, an object result, an object position, an object category and an object size.

[0080] Specifically, the first initial object and the first result of the first initial object in the to-be-detected image and the second initial object and the second result of the second initial object in the initial target region are obtained according to the target detection model, that is, the to-be-detected image is input into the target detection model to obtain the first initial object and the first result of the first initial object, and the initial target region is input into the target detection model to obtain the second initial object and the second result of the second initial object.

[0081] In the embodiments of the present specification, the target detection model can be understood as a vehicle detection model, and in other application scenarios, the target detection model can be a detection model corresponding to a target, for example, if the detection method is applied in a sports competition scenario, the target detection model can be a seat detection model or a person detection model, etc.

[0082] In specific implementation, in the case where the target detection model is a vehicle detection model, the first initial object and the first result of the first initial object obtained by inputting the to-be-detected image into the target detection model can be understood as vehicles in the to-be-detected image and scores corresponding to each vehicle; and the second initial object and the second result of the second initial object obtained by inputting the initial target region into the target detection model can be understood as vehicles in the initial target region and scores corresponding to each vehicle.

[0083] In actual application, through the vehicle detection model, not only the vehicles in the to-be-detected image and the scores corresponding to each vehicle, the vehicles in the initial target region and the scores corresponding to each vehicle can be obtained, but also the positions of the vehicles in the to-be-detected image and the sizes and categories of the vehicles, the positions of the vehicles in the initial target region and the sizes and categories of the vehicles can be obtained, so as to quickly determine a target object according to the positions and categories of the vehicles, and the specific implementation manner is as follows:

[0084] inputting the to-be-detected image into a target detection model to obtain a position, a category, and a size of the first initial object, and inputting the initial target region into the target detection model to obtain a position, a category, and a size of the second initial object.

[0085] In a traffic monitoring scenario, the first initial object is a vehicle in the to-be-detected image, and the second initial object is a vehicle in the initial target region. The position of the first initial object is a coordinate position of the vehicle in the to-be-detected image, the position of the second initial object is a coordinate position of the vehicle in the initial target region, and the size of the first initial object and the size of the second initial object are sizes of the vehicle.

[0086] Step 206: determining a target object based on the first initial object and the first result, and the second initial object and the second result.

[0087] Specifically, determining the target object based on the first initial object and the first result, and the second initial object and the second result can be understood as determining the target object based on the first initial object and the first result of the first initial object, and the second result of the second initial object after being corrected.

[0088] The specific implementation is as follows:

[0089] The determining of the target object based on the first initial object and the first result, and the second initial object and the second result includes:

[0090] determining a first initial object of an initial target region of the to-be-detected image;

[0091] matching the first initial object of the initial target region of the to-be-detected image with the second initial object,

[0092] taking the second initial object that does not have a matching relationship with the first initial object as a first target object;

[0093] taking the second initial object that has a matching relationship with the first initial object and has a second result greater than a first result of the matched first initial object as a second target object,

[0094] The first target object and the second target object combine to form the target object.

[0095] In another embodiment of the present specification, the determining of the target object based on the first initial object and the first result, and the second initial object and the second result includes:

[0096] determine a target object to be determined based on the first initial object and the first result, and the second initial object and the second result;

[0097] display the target object to be determined based on a preset manner, and determine the target object to be determined as a target object after receiving a confirmation instruction of the target object to be determined by a user.

[0098] The preset manner includes, but is not limited to, a manner of a marking box and a manner of highlighting, and the confirmation instruction includes, but is not limited to, a touch confirmation instruction or a voice confirmation instruction of the target object to be determined by the user.

[0099] In a specific implementation, first, the target object to be determined is determined based on the first initial object and the first result, and the second initial object and the second result, then the target object to be determined is displayed on the detection image by adding a marking box or highlighting the target object to be determined, so that the user can clearly see the target object to be determined on the detection image, and finally, the target object to be determined is confirmed as a final target object after receiving a confirmation instruction of the target object to be determined by the user. The target object to be determined without receiving the confirmation instruction of the user can be determined as a non-target object.

[0100] The detection method provided by the embodiments of the present specification can further increase the accuracy of the target object by screening the target object to be determined by the user again to obtain the final target object, improve the participation of the user, and improve the user experience.

[0101] Referring to Figure 3 , Figure 3 The schematic diagram of the initial object obtained from the detection image and the initial target region in the detection method provided by one or more embodiments of the present specification.

[0102] Still taking the first initial object as a vehicle in the detection image and the second initial object as a vehicle in the initial target region as an example, the acquisition of the target object is described in detail.

[0103] First, it is determined that the first initial object obtained by the target detection model is a, b, c, and d, and the second initial object obtained is e, f, and g; and then it is determined that the first initial object a in the initial target region (i.e., the dashed box region in the detection image) in the detection image corresponding to the initial target region, and the second initial objects e, f, and g in the initial target region are a, b, c, d, e, f, and g.

[0104] The coordinate position of the first initial object a and the coordinate positions of the second initial objects e, f and g are acquired, and through the matching relationship of the coordinate position of the first initial object a and the coordinate positions of the second initial objects e, f and g, it can be determined that the first initial object a and the second initial object e are the same vehicle at the same position, and the two exist a matching relationship;

[0105] At this time, it can be determined that the first initial object a in the initial target region in the to-be-detected image and the second initial object e in the initial target region exist a matching relationship, and the second initial objects f and g in the initial target region do not have a first initial object that exists a matching relationship, and then the second initial objects f and g that do not exist a matching relationship with the first initial object are taken as the first target object, and then it is judged whether the score of the first initial object a is less than or equal to the score of the second initial object e, if yes, the second initial object e that exists a matching relationship with the first initial object a but has a score greater than the score of the matched first initial object a is taken as the second target object, and the first target object f and g and the second target object e are combined to form the final target object.

[0106] In another case, if the score of the second initial object e that exists a matching relationship with the first initial object a is less than the score of the first initial object a, then it can be determined that the second initial object e is a non-target object, and then only the first target object can be taken as the target object.

[0107] In the embodiments of the present specification, the detection method first extracts the initial target region of the small target in the to-be-detected image, and then simultaneously performs target detection and fusion on the to-be-detected image and the initial target region of the small target, and finally combines the detection results to realize accurate detection of the small target.

[0108] Specifically, in order to ensure the accuracy of the matching of the first initial object and the second initial object in the initial target region of the to-be-detected image, the matching can be performed through the relationship between the coordinate position and category of the first initial object in the initial target region of the to-be-detected image and the coordinate position and category of the second initial object, and the specific implementation manner is as follows:

[0109] The matching of the first initial object in the initial target region of the to-be-detected image and the second initial object includes:

[0110] The matching of the first initial object in the initial target region of the to-be-detected image and the second initial object is based on the position and category of the first initial object in the initial target region of the to-be-detected image and the position and category of the second initial object.

[0111] Specifically, based on the difference of the initial object, the category corresponding to the initial object is also different. For example, in the case of the initial object being a vehicle, the category includes but is not limited to the category of the vehicle, such as the category of a car, a truck, a transport vehicle, etc. In the case of the initial object being a person, the category includes but is not limited to the category of the person, such as the category distinguished by gender or race, etc.

[0112] In another embodiment of the present specification, after determining the target object based on the first initial object and the first result, the second initial object and the second result, the method further comprises:

[0113] According to the target object, a first target region of the target object is determined.

[0114] The first target region is a region jointly formed by all target objects. Referring to FIG. 1, the first target region of the target objects e, f and g is the dashed box region in the initial target region in FIG. 1. Figure 3 For example, the target objects e, f and g are taken as the target objects, the first target region of the target objects e, f and g is the dashed box region in the initial target region in FIG. 1. Figure 3

[0115] The detection method provided by the embodiment of the present specification determines the first target region of the target object according to the target object, and subsequently, the update of the initial target region can be realized based on the first target region, so that more accurate target objects can be obtained through the updated initial target region.

[0116] In order to make the long-distance region more accurate, in one embodiment of the present specification, the first target region is calculated and processed to obtain a more accurate long-distance region, and the specific implementation manner is as follows:

[0117] After determining the first target region of the target object according to the target object, the method further comprises:

[0118] S1, determining n detection boxes, wherein n is a positive integer;

[0119] S2, traversing the first target region based on the i-th detection box, and determining a region score of each traversal region, wherein i is a positive integer, and i∈【1, n】;

[0120] S3, judging whether i is greater than n,

[0121] If yes, determining a first initial target region based on the region score and deleting the target objects in the first initial target region, and judging whether the region score of the first initial target region is less than or equal to a preset score threshold,

[0122] If yes, determining the first initial target region as a second target region, ​

[0123] If no, continue to execute step S1,

[0124] If no, increase i by 1, and continue to execute step S2.

[0125] Specifically, the number of the n detection boxes can be pre-set according to actual application, and can be set to 2, 3, 4 or 5. In the embodiment of the present specification, the number of the detection boxes is set to 3 as an example in the case of ensuring the accuracy of the obtained second target region and the calculation efficiency. As for the proportion of the detection boxes, it can be set according to actual experience. For example, the minimum range that can be detected by the current technology is 416*416, so the size of the first detection box can be set to 416*416, the size of the second detection box can be set to 624*624, and the size of the third detection box can be set to 936*936. That is, the size of the first detection box is taken as an example, and the second detection box and the third detection box are determined by increasing the size by 1.5 times each time. In actual application, the size of the detection box set in this way will not cause excessive repeated calculation, nor will it cause inaccurate acquisition of the second target region due to the too large size of the detection box.

[0126] In specific implementation, in order to quickly obtain the region score of each traversal region, the embodiment of the present specification obtains the region score of each traversal region in the following manner:

[0127] The determining of the region score of each traversal region comprises:

[0128] determining a target object in each traversal region, and determining the region score of each traversal region based on the target object.

[0129] In specific implementation, in order to ensure the accuracy of the region score, the region score can be calculated according to the size of the target object obtained by the target detection model. The specific implementation manner is as follows:

[0130] The determining of the region score of each traversal region based on the target object comprises:

[0131] obtaining the size of the detection box corresponding to each target object based on the target detection model;

[0132] determining a target object whose corresponding detection box size is greater than or equal to the size of the traversal region as a first target object;

[0133] determining a target object whose corresponding detection box size is less than the size of the traversal region as a second target object;

[0134] calculating the region score of each traversal region according to the first target object and the second target object.

[0135] The size of the traversal region is the size of the current detection frame.

[0136] Specifically, the target object in each traversal region is determined first, and the size of the detection frame corresponding to each target object is obtained based on the target detection model, that is, the size of the detection frame corresponding to the target object can be determined, and the target object can be detected by a detection frame of how large size;

[0137] Then, the target object whose corresponding detection frame size is greater than or equal to the size of the traversal region is determined as the first target object, and the target object whose corresponding detection frame size is less than the size of the traversal region is determined as the second target object; Specifically, it can be understood that when the size of the detection frame corresponding to the target object is greater than or equal to the size of the traversal region, it can be indicated that the target object can be detected by the current detection frame, and when the size of the detection frame corresponding to the target object is less than the size of the traversal region, it can be indicated that the target object cannot be detected by the current detection frame; At this time, it can be determined which target objects in each traversal region can be detected and which target objects cannot be detected.

[0138] Finally, the region score of each traversal region is calculated according to the size of the first target object that can be detected and the size of the second target object that cannot be detected in each traversal region; wherein the size of the first target object and the size of the second target object are obtained by the target detection model, that is, the target object is obtained from the second initial object, and the size of the target object can be obtained under the condition of knowing the second initial object.

[0139] Specifically, the region score of each traversal region is calculated according to the size of the first target object that can be detected and the size of the second target object that cannot be detected in each traversal region as follows:

[0140] That is, the size of the first target object that can be detected in each traversal region is multiplied by the score of the corresponding weight, and the size of the second target object that cannot be detected in the traversal region is subtracted, that is, the region score of each traversal region can be obtained.

[0141] In the embodiments of the present specification, the region score of each traversal region can be simply and conveniently calculated by the target object in each traversal region in the detection method, so that the final long-distance region, that is, the second target region, can be quickly determined by the region score.

[0142] In specific implementation, in order to reduce the calculation amount and improve the calculation efficiency, all traversal regions are screened by the region score, and the traversal region with the highest score is taken as the first initial target region, and the specific implementation manner is as follows:

[0143] The first initial target region is determined based on the region score.

[0144] Each traversal region is sorted in descending order based on the region score, and the traversal region with the highest score is determined as the first initial target region.

[0145] That is, after obtaining the region score of each traversal region, the corresponding traversal region is sorted in descending order according to the size of the region score, and the traversal region with the highest score is determined as the first initial target region.

[0146] Taking the determined detection frame as an example, the determination of the second target region is described in detail, wherein the three detection frames are: the first detection frame of 416*416, the second detection frame of 624*624, and the third detection frame of 936*936.

[0147] Step 1: Determine the three detection frames, and traverse the first target region starting from the first detection frame, and determine the region score of each traversal region traversed by the first detection frame.

[0148] Step 2: Determine whether the first detection frame is the last detection frame, if not, traverse the first target region based on the second detection frame, and determine the region score of each traversal region traversed by the second detection frame.

[0149] Step 3: Determine whether the second detection frame is still not the last detection frame, if not, traverse the first target region based on the third detection frame, and determine the region score of each traversal region traversed by the third detection frame.

[0150] Step 4: Determine whether the third detection frame is the last detection frame, if so, select the traversal region with the highest region score among all the traversal regions as the first initial target region.

[0151] Step 5: Delete the target object in the first initial target region.

[0152] Step 6: Determine whether the region score of the first initial target region is less than or equal to the preset score threshold, if so, execute Step 7, if not, execute Step 8.

[0153] Step 7: End, and take the first initial target region as the second target region, i.e., take the first initial target region as the final long-distance small target region.

[0154] Step 8: Continue to repeat the above steps with the three detection frames in Step 1 until the region score of the first initial target region is less than or equal to the preset score threshold.

[0155] As can be known from the above, in a case where the area score of the first initial target region is greater than the preset score threshold, the first target region is traversed based on the three detection boxes, and thus multiple first initial target regions are generated. In a case where the area score of a certain first initial target region is less than or equal to the preset score threshold, the above step ends, and all the obtained first initial target regions are determined as the second target region, that is, the final small target long-distance region.

[0156] The detection method provided in the embodiments of the present specification realizes accurate acquisition and updating of a long-distance small target region according to a first target region and a target object in the first target region, so that the initial target region can be replaced by the accurate long-distance small target region in subsequent detection, to obtain a small target detection result with higher accuracy in the next detection, and improve long-distance perception capability.

[0157] In another embodiment of the present specification, the determination of the first initial target region as the second target region includes:

[0158] determining the first initial target region as a second initial target region;

[0159] displaying the second initial target region in a preset manner, and determining the second initial target region as the second target region after receiving a confirmation instruction of the user on the second initial target region.

[0160] The preset manner includes but is not limited to a manner of a marking box and a manner of highlighting display, and the confirmation instruction includes but is not limited to a touch confirmation instruction or a voice confirmation instruction of the user on the second initial target region.

[0161] In specific implementation, after the first initial target region is determined as the second initial target region, the second initial target region is displayed on the to-be-detected image by adding a marking box or highlighting display to the second initial target region, so that the user can clearly see the second initial target region on the to-be-detected image. Finally, after receiving a confirmation instruction of the user on the second initial target region, the second initial target region is confirmed as the final second target region. The second initial target region without the confirmation instruction of the user can be determined as a non-second target region.

[0162] The detection method provided in the embodiments of the present specification further increases the accuracy of the second target region by screening the second initial target region again by the user in the manner of user interaction, and improves the participation of the user and user experience.

[0163] Referring to Figure 4 , Figure 4A flowchart of determining a final long-distance region in a traffic monitoring scene based on a detection method provided by one embodiment of the present specification is shown, which specifically includes the following steps:

[0164] Step 402: real-time video.

[0165] Specifically, step 402 is to receive a real-time video and obtain a video frame image in the video; wherein the video is a traffic monitoring video.

[0166] Step 404: calculate the road driving region and the road surface contraction narrowing region.

[0167] Specifically, step 404 is to calculate the road driving region and the road surface contraction narrowing region according to a vehicle detection algorithm and a road segmentation algorithm.

[0168] Step 406: initial long-distance region.

[0169] Specifically, step 406 is to determine the road driving region and the road surface contraction narrowing region as the initial long-distance region of the video frame image.

[0170] In actual application scenarios, in a traffic monitoring scene, the target in the video frame image is usually upright, and the end of the road usually appears at the top of the picture. This prior information can be used to preliminarily determine the long-distance region.

[0171] Step 408: detection model.

[0172] Specifically, step 408 is to input the video frame image into a vehicle detection model to obtain a first initial vehicle, a position of the first initial vehicle, and a score corresponding to the first initial vehicle, and to input the initial long-distance region into the vehicle detection model to obtain a second initial vehicle, a position of the second initial vehicle, and a score corresponding to the second initial vehicle.

[0173] Step 410: detection result fusion.

[0174] Specifically, step 410 is to determine a long-distance small target based on the first initial vehicle, the position of the first initial vehicle, and the score corresponding to the first initial vehicle, and the second initial vehicle, the position of the second initial vehicle, and the score corresponding to the second initial vehicle.

[0175] Step 412: region update.

[0176] Specifically, step 412 is to determine an initial small target long-distance region based on the long-distance small target, and to update the initial long-distance region through the initial small target long-distance region.

[0177] Step 414: final long-distance region.

[0178] Specifically, step 414 is to obtain a final long-distance region according to the initial small-target long-distance region and the long-distance small target. The calculation process of the final long-distance region can be referred to the process of obtaining the second target region in the above embodiment, and details are not described herein.

[0179] The detection method provided in the embodiments of the present specification first initializes a long-distance region based on prior information of a traffic monitoring scene and road region information, and then judges a region in which a small target really exists in the traffic monitoring scene by using a detection result based on an original image and an image of the initialized long-distance region, and updates to obtain a final long-distance region. A small-target detection result with higher precision can be obtained, and long-distance perception capability is improved.

[0180] Referring to Figure 5 , Figure 5 A flowchart of a second detection method provided according to an embodiment of the present specification is shown, including the following steps:

[0181] Step 502: An image input interface is displayed for a user based on a calling request of the user.

[0182] Specifically, in the case of receiving a calling request of a user, an image input interface is determined according to the calling request, and the image input interface is displayed to the user. The user can input a to-be-detected image through the image input interface.

[0183] In actual application, the user includes but is not limited to a merchant or an individual user, etc.

[0184] Step 504: A to-be-detected image input by the user based on the image input interface is received, and an initial target region of the to-be-detected image is determined.

[0185] Step 506: A first initial object in the to-be-detected image and a first result of the first initial object, and a second initial object in the initial target region and a second result of the second initial object are obtained according to a target detection model.

[0186] Step 508: A target object is determined based on the first initial object and the first result, the second initial object and the second result, and returned to the user.

[0187] It should be noted that the part of the second detection method provided in the embodiments of the present specification corresponding to the above-mentioned embodiments of the first detection method can refer to the detailed description in the above-mentioned embodiments of the first detection method, and details are not described herein.

[0188] The detection method provided in the embodiments of this specification first extracts the initial target region of small targets in the image to be detected, and then performs target detection and fusion on the image to be detected and the initial target region of small targets simultaneously. Finally, by combining the detection results, accurate detection of small targets is achieved.

[0189] See Figure 6 , Figure 6 A flowchart of a third detection method according to an embodiment of this specification is shown, including the following steps:

[0190] Step 602: Receive a call request sent by the user, wherein the call request carries the image to be detected.

[0191] Step 604: Determine the initial target region of the image to be detected.

[0192] Step 606: Obtain the first initial object in the image to be detected and the first result of the first initial object, as well as the second initial object in the initial target region and the second result of the second initial object, based on the target detection model.

[0193] Step 608: Determine the target object based on the first initial object and the first result, the second initial object and the second result, and return it to the user.

[0194] It should be noted that the parts of the third detection method provided in the embodiments of this specification that correspond to the embodiments of the first detection method described above can be found in the detailed description in the embodiments of the first detection method described above, and will not be repeated here.

[0195] In practical applications, the detection method is applied to the local server and provides an API interface for users. After receiving the API call request sent by the user, the detection method quickly and accurately obtains the target object based on the image to be detected carried in the user's call request, and returns the target object to the user to improve the user experience.

[0196] The detection method provided in the embodiments of this specification first extracts the initial target region of small targets in the image to be detected, and then performs target detection and fusion on the image to be detected and the initial target region of small targets simultaneously. Finally, by combining the detection results, accurate detection of small targets is achieved.

[0197] Corresponding to the above method embodiments, this specification also provides embodiments of the detection device. Figure 7 A schematic diagram of the structure of a first detection device provided in one embodiment of this specification is shown. For example... Figure 7 As shown, the device includes:

[0198] The image acquisition module 702 is configured to acquire an image to be detected and determine an initial target region of the image to be detected.

[0199] The first obtaining module 704 is configured to acquire a first initial object and a first result in the image to be detected, and acquire a second initial object and a second result in the initial target region.

[0200] The first target object determination module 706 is configured to determine a target object based on the first initial object and the first result, the second initial object and the second result.

[0201] Optionally, the first target object determination module 706 is further configured to:

[0202] determine the first initial object of the initial target region of the image to be detected;

[0203] match the first initial object of the initial target region of the image to be detected with the second initial object,

[0204] take the second initial object without a matching relationship with the first initial object as a first target object;

[0205] take the second initial object with a matching relationship with the first initial object and a corresponding second result greater than a first result of the matched first initial object as a second target object,

[0206] wherein the first target object and the second target object combine to form the target object.

[0207] Optionally, the first obtaining module 704 is further configured to:

[0208] acquire the first initial object and the first result in the image to be detected according to a target detection model;

[0209] acquire the second initial object and the second result in the initial target region according to the target detection model,

[0210] wherein the target detection model is suitable for detecting an object, an object result, an object position, an object category and an object size.

[0211] Optionally, the apparatus further comprises:

[0212] The fourth obtaining module is configured to input the image to be detected into a target detection model to obtain a position, a category and a size of the first initial object, and

[0213] input the initial target region into the target detection model to obtain a position, a category and a size of the second initial object.

[0214] Optionally, the first target object determination module 706 is further configured to:

[0215] match the first initial object of the initial target region of the image to be detected with the second initial object based on the position and category of the first initial object and the position and category of the second initial object.

[0216] Optionally, the image acquisition module 702 is further configured to:

[0217] determine an initial region of the image to be detected;

[0218] calculate the initial region based on a preset algorithm to obtain an initial target region in the initial region.

[0219] Optionally, the first target object determination module 706 is further configured to:

[0220] determine a target object to be determined based on the first initial object and the first result and the second initial object and the second result;

[0221] display the target object to be determined based on a preset manner, and determine the target object to be determined as a target object after receiving a confirmation instruction of the target object to be determined by a user.

[0222] Optionally, the apparatus further comprises:

[0223] a first target region determination module configured to determine a first target region of the target object according to the target object.

[0224] Optionally, the apparatus further comprises:

[0225] a detection frame determination module configured to determine n detection frames, where n is a positive integer;

[0226] a traversal module configured to traverse the first target region based on an i-th detection frame and determine a region score of each traversal region, where i is a positive integer and i∈【1, n】;

[0227] a judgment module configured to judge whether i is greater than n,

[0228] if yes, determine a first initial target region based on the region score and delete target objects in the first initial target region, and judge whether a region score of the first initial target region is less than or equal to a preset score threshold,

[0229] if yes, determine the first initial target region as a second target region,

[0230] If no, continue to execute the detection box determination module,

[0231] If no, i is increased by 1, and the iteration module is continued to be executed.

[0232] Optionally, the iteration module is further configured to:

[0233] determine a target object in each iteration region, and determine a region score of each iteration region based on the target object.

[0234] Optionally, the iteration module is further configured to:

[0235] obtain a size of a detection box corresponding to each target object based on the target detection model;

[0236] determine a target object corresponding to the detection box whose size is greater than or equal to the size of the iteration region as a first target object;

[0237] determine a target object corresponding to the detection box whose size is less than the size of the iteration region as a second target object;

[0238] calculate a region score of each iteration region according to the first target object and the second target object.

[0239] Optionally, the judgment module is further configured to:

[0240] sort each iteration region in descending order based on the region score, and determine an iteration region at the front of the sorting as a first initial target region.

[0241] Optionally, the judgment module is further configured to:

[0242] determine the first initial target region as a second initial target region;

[0243] display the second initial target region based on a preset mode, and determine the second initial target region as a second target region after receiving a confirmation instruction of the second initial target region by the user.

[0244] Optionally, the image to be detected includes a traffic video frame image, and the first initial object and the second initial object include a vehicle.

[0245] The above is a schematic scheme of the detection device of the embodiment. It should be noted that the technical scheme of the detection device belongs to the same concept as the technical scheme of the first detection method described above, and the details of the technical scheme of the detection device that are not described in detail can be referred to the description of the technical scheme of the first detection method.

[0246] Corresponding to the method embodiments, the specification also provides detection device embodiments, Figure 8 A structural diagram of a second detection device provided by one embodiment of the specification is shown. As shown in the figure, the device comprises: Figure 8

[0247] An interface display module 802 is configured to display an image input interface for a user based on a calling request of the user;

[0248] A first initial region determination module 804 is configured to receive a to-be-detected image input by the user based on the image input interface, and determine an initial target region of the to-be-detected image;

[0249] A second obtaining module 806 is configured to obtain a first initial object in the to-be-detected image and a first result of the first initial object and a second initial object in the initial target region and a second result of the second initial object according to a target detection model;

[0250] A second target object determination module 808 is configured to determine a target object based on the first initial object and the first result, the second initial object and the second result, and return the target object to the user.

[0251] The above is a schematic scheme of a detection device of the embodiment. It should be noted that the technical scheme of the detection device belongs to the same concept as the technical scheme of the second detection method described above, and the details of the technical scheme of the detection device which are not described in detail can be referred to the description of the technical scheme of the second detection method.

[0252] Corresponding to the method embodiments, the specification also provides detection device embodiments, Figure 9 A structural diagram of a third detection device provided by one embodiment of the specification is shown. As shown in the figure, the device comprises: Figure 9

[0253] A request receiving module 902 is configured to receive a calling request sent by a user, wherein the calling request carries a to-be-detected image;

[0254] A second initial region determination module 904 is configured to determine an initial target region of the to-be-detected image;

[0255] A third obtaining module 906 is configured to obtain a first initial object in the to-be-detected image and a first result of the first initial object and a second initial object in the initial target region and a second result of the second initial object according to a target detection model;

[0256] ​​The third target object determination module 908 is configured to determine a target object based on the first initial object and the first result, the second initial object and the second result, and return the target object to the user.

[0257] The above is a schematic scheme of the detection device of the embodiment. It should be noted that the technical scheme of the detection device belongs to the same concept as the technical scheme of the third detection method described above, and the details of the technical scheme of the detection device that are not described in detail can be referred to the description of the technical scheme of the third detection method.

[0258] Figure 10 A structural block diagram of a computing device 1000 according to one embodiment of the present specification is shown. The components of the computing device 1000 include, but are not limited to, a memory 1010 and a processor 1020. The processor 1020 is connected to the memory 1010 through a bus 1030, and a database 1050 is used to save data.

[0259] The computing device 1000 also includes an access device 1040, which enables the computing device 1000 to communicate via one or more networks 1060. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 1040 can include one or more of any type of network interface (e.g., network interface card (NIC)) such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like, wired or wireless.

[0260] In one embodiment of the present specification, the above-mentioned components of the computing device 1000 and Figure 10 other components not shown in the above-mentioned components of the computing device 1000 and Figure 10 The structural block diagram of the computing device shown is only for the purpose of example, and is not a limitation on the scope of the present specification. Those skilled in the art can add or replace other components as needed.

[0261] The computing device 1000 can be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smartphone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or a PC. The computing device 1000 can also be a mobile or stationary server.

[0262] The processor 1020 is configured to execute the following computer-executable instructions, and the processor executes the computer-executable instructions to implement the steps of the detection method.

[0263] The above is a schematic solution of the computing device of the embodiment. It should be noted that the technical solution of the computing device and the technical solution of the detection method described above belong to the same concept, and the details of the technical solution of the computing device that are not described in detail can be referred to the description of the technical solution of the detection method.

[0264] An embodiment of the present specification also provides a computer-readable storage medium storing computer instructions, and the instructions are executed by a processor to implement the steps of the detection method.

[0265] The above is a schematic solution of the computer-readable storage medium of the embodiment. It should be noted that the technical solution of the storage medium and the technical solution of the detection method described above belong to the same concept, and the details of the technical solution of the storage medium that are not described in detail can be referred to the description of the technical solution of the detection method.

[0266] The above describes specific embodiments of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in a different order than the order in which they are recited and still achieve desirable results. In addition, the processes depicted in the figures do not necessarily require the particular order shown, or sequential order, to achieve the desired results. In certain implementations, multitasking and parallel processing can be advantageous.

[0267] The computer instructions include computer program code, which can be in the form of source code, object code, executable code, or some intermediate form. The computer-readable medium can include any entity or apparatus that can carry the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.

[0268] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments in this specification are not limited to the described order of actions, because according to the embodiments in this specification, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments in this specification.

[0269] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0270] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described herein. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.

Claims

1. A detection method, comprising: obtaining an image to be detected, and determining an initial target region of the image to be detected; obtaining a first initial object and a first result in the image to be detected according to a target detection model, and obtaining a second initial object and a second result in the initial target region according to the target detection model; determining an initial target object based on the first initial object and the first result, and the second initial object and the second result; determining a first target region of the initial target object according to the initial target object; updating the initial target region according to the first target region, and using the updated initial target region to determine a target object. 2.The detection method of claim 1, wherein the determining an initial target object based on the first initial object and the first result, and the second initial object and the second result comprises: determining a first initial object of the initial target region of the image to be detected; matching the first initial object of the initial target region of the image to be detected with the second initial object, regarding the second initial object without a matching relationship with the first initial object as a first target object; regarding the second initial object with a matching relationship with the first initial object and a corresponding second result greater than a first result of the matched first initial object as a second target object, wherein the first target object and the second target object combine to form the initial target object. 3.The detection method of claim 2, wherein the obtaining a first initial object and a first result in the image to be detected according to a target detection model, and obtaining a second initial object and a second result in the initial target region according to the target detection model comprises: the target detection model being suitable for detecting an object, an object result, an object position, an object category and an object size. 4.The detection method of claim 3, wherein after the inputting the image to be detected into a target detection model to obtain a first initial object and a first result of the first initial object, the method further comprises: inputting the image to be detected into a target detection model to obtain a position, a category and a size of the first initial object, and inputting the initial target region into the target detection model to obtain a position, a category and a size of the second initial object. 5.The detection method of claim 4, wherein the matching the first initial object of the initial target region of the image to be detected with the second initial object comprises: matching the first initial object of the initial target region of the image to be detected with the second initial object based on a position, a category of the first initial object of the initial target region of the image to be detected and a position, a category of the second initial object. 6.The detection method of claim 1, wherein the determining an initial target region of the image to be detected comprises: determining an initial region of the image to be detected; calculating the initial region based on a preset algorithm to obtain an initial target region in the initial region.

7. The detection method of claim 1, wherein the determining the initial target object based on the first initial object and the first result, and the second initial object and the second result comprises: determining a to-be-determined target object based on the first initial object and the first result, and the second initial object and the second result; and displaying the to-be-determined target object based on a preset manner, and determining the to-be-determined target object as the initial target object after receiving a confirmation instruction of the to-be-determined target object from the user.

8. The detection method of claim 1, wherein after the determining the first target region of the target object based on the target object, the method further comprises: S1, determining n detection frames, wherein n is a positive integer; S2, traversing the first target region based on an i-th detection frame, and determining a region score of each traversed region, wherein i is a positive integer, and i e [1, n]; S3, determining whether i is greater than n, if yes, determining a first initial target region based on the region score and deleting the target object in the first initial target region, and determining whether the region score of the first initial target region is less than or equal to a preset score threshold, if yes, determining the first initial target region as a second target region, if no, continuing to perform step S1, if no, increasing i by 1, and continuing to perform step S2.

9. The detection method of claim 8, wherein the determining the region score of each traversed region comprises: determining a target object in each traversed region, and determining the region score of each traversed region based on the target object.

10. The detection method of claim 9, wherein the determining the region score of each traversed region based on the target object comprises: obtaining a size of a detection frame corresponding to each target object based on the target detection model; determining a first target object based on the size of the corresponding detection frame being greater than or equal to a size of the traversed region; determining a second target object based on the size of the corresponding detection frame being less than the size of the traversed region; and calculating the region score of each traversed region based on the first target object and the second target object.

11. The detection method of claim 8, wherein the determining the first initial target region based on the region score comprises: sorting each traversed region in descending order based on the region score, and determining a traversed region at a front of the sorting as the first initial target region.

12. The detection method of claim 8, wherein the determining the first initial target region as the second target region comprises: determining the first initial target region as a second initial target region; and displaying the second initial target region based on a preset manner, and determining the second initial target region as the second target region after receiving a confirmation instruction of the second initial target region from the user.

13. The detection method of any one of claims 1-12, wherein the to-be-detected image comprises a traffic video frame image, and the first initial object and the second initial object comprise a vehicle.

14. A detection method, comprising: displaying an image input interface for a user based on a calling request of the user; ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ receive an image to be detected input by the user based on the image input interface, and determine an initial target region of the image to be detected; obtain a first initial object in the image to be detected and a first result of the first initial object and a second initial object in the initial target region and a second result of the second initial object according to a target detection model; determine an initial target object based on the first initial object and the first result, the second initial object and the second result, and return the initial target object to the user; determine a first target region of the initial target object according to the initial target object; update the initial target region according to the first target region, and the updated initial target region is used to determine a target object.

15. A detection method, comprising: receiving a calling request sent by a user, wherein the calling request carries an image to be detected; determining an initial target region of the image to be detected; obtaining a first initial object in the image to be detected and a first result of the first initial object and a second initial object in the initial target region and a second result of the second initial object according to a target detection model; determining an initial target object based on the first initial object and the first result, the second initial object and the second result, and returning the initial target object to the user; determining a first target region of the initial target object according to the initial target object; updating the initial target region according to the first target region, and the updated initial target region is used to determine a target object.

16. A detection device, comprising: an image acquisition module configured to acquire an image to be detected according to a target detection model, and determine an initial target region of the image to be detected; a first obtaining module configured to obtain a first initial object in the image to be detected and a first result according to the target detection model, and obtain a second initial object in the initial target region and a second result; a first target object determination module configured to determine an initial target object based on the first initial object and the first result, the second initial object and the second result; a first target region determination module configured to determine a first target region of the initial target object according to the initial target object; a judging module configured to update the initial target region according to the first target region, and the updated initial target region is used to determine a target object.

17. A detection device, comprising: an interface display module configured to display an image input interface for a user based on a calling request of the user; a first initial region determination module configured to receive an image to be detected input by the user based on the image input interface, and determine an initial target region of the image to be detected; a second obtaining module configured to obtain a first initial object in the image to be detected and a first result of the first initial object and a second initial object in the initial target region and a second result of the second initial object according to a target detection model; a second target object determination module configured to determine an initial target object based on the first initial object and the first result, the second initial object and the second result, and return the initial target object to the user; a first target region determination module configured to determine a first target region of the initial target object according to the initial target object; a determination module configured to update the initial target region according to the first target region, and use the updated initial target region to determine a target object.

18. A detection apparatus, comprising: a request receiving module configured to receive a calling request sent by a user, wherein the calling request carries a to-be-detected image; a second initial region determination module configured to determine an initial target region of the to-be-detected image; a third obtaining module configured to obtain a first initial object in the to-be-detected image and a first result of the first initial object, and a second initial object in the initial target region and a second result of the second initial object according to a target detection model; a third target object determination module configured to determine an initial target object based on the first initial object and the first result, the second initial object and the second result, and return the initial target object to the user; a first target region determination module configured to determine a first target region of the initial target object according to the initial target object; a determination module configured to update the initial target region according to the first target region, and use the updated initial target region to determine a target object.

19. A computing device, comprising: a memory and a processor; the memory is configured to store computer executable instructions, and the processor is configured to execute the computer executable instructions, wherein the processor executes the computer executable instructions to implement steps of the detection method in any one of claims 1-13 or 14 or 15.

20. A computer readable storage medium storing computer instructions, wherein the computer instructions are executed by a processor to implement steps of the detection method in any one of claims 1-13 or 14 or 15.

Citation Information

Patent Citations

  • Unmanned aerial vehicle automatic detecting and tracking method based on machine vision

    CN108038415A

  • Image processing method and apparatus, storage medium, and electronic device

    CN109086761A