Object detection method and device, electronic device and storage medium
By determining the attributes of the false detection area and human-computer interaction screening technology, the false alarm problem in object detection is solved and the accuracy and efficiency of the detection results are improved.
Patent Information
- Application Number
- CN202111135692.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-27
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2041-09-27
AI Technical Summary
Existing technologies are prone to false positives in object detection scenarios such as face recognition and license plate detection, and algorithm-based correction methods cannot completely eliminate false positives and are time-consuming.
By determining the attributes of the false detection area, combining human-computer interaction and image processing technology, the false detection area is screened out, and the object detection results are screened based on the attributes of the false detection area and the detection area, including the first screening and the second screening, to improve the accuracy of the detection results.
Without changing the algorithm, the detection results can be effectively revised to improve the accuracy of object detection and timely identify and correct false positives.
Smart Images

Figure CN113869295B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to an object detection method and device, an electronic device, and a storage medium. Background Art
[0002] False positives often occur in object detection scenarios like face recognition and license plate detection. This means an object is detected where none exists. Relevant technologies typically address this problem through algorithmic corrections, but this approach cannot eliminate all false positives and is time-consuming. Summary of the Invention
[0003] The present disclosure proposes an object detection method and device, an electronic device, and a storage medium, which aim to timely and effectively correct detection results without correcting the algorithm, thereby improving the accuracy of the detection results.
[0004] According to a first aspect of the present disclosure, there is provided an object detection method, the method comprising:
[0005] determining at least one false detection region attribute, wherein the false detection region attribute is used to characterize a position and a size of the false detection region;
[0006] Performing object detection on the image to be detected to obtain at least one object detection result, wherein each object detection result includes a detection area attribute representing the position and size of the detected object;
[0007] The object detection results are screened according to the attributes of the false detection areas and the attributes of the detection areas to obtain intrusion detection results.
[0008] In a possible implementation manner, determining at least one falsely detected region attribute includes:
[0009] In response to the misdetection region generated by the human-computer interaction operation, at least one misdetection region attribute is determined.
[0010] In a possible implementation, the misdetected area generated in response to the human-computer interaction operation is implemented in the following manner:
[0011] Performing object detection on the image to be detected and displaying a preliminary detection result of the object detection, wherein the preliminary detection result includes at least one preliminary detection frame;
[0012] In response to receiving at least one preliminary detection box selected by a user through a human-computer interaction operation, determining that a region represented by the preliminary detection box is a misdetected region.
[0013] In a possible implementation, the misdetected area generated in response to the human-computer interaction operation is implemented in the following manner:
[0014] Display editing controls on the scene display interface;
[0015] In response to the editing control being triggered, displaying the image to be edited corresponding to the image to be detected;
[0016] In response to at least one region in the image to be edited being selected, each of the selected regions is determined to be a misdetected region.
[0017] In a possible implementation, in response to at least one region in the image to be edited being selected, determining each selected region as a misdetected region includes:
[0018] Determining at least one image frame corresponding to the image to be edited;
[0019] The area within each image frame is determined to be a selected misdetected area.
[0020] In a possible implementation, determining at least one image frame corresponding to the image to be edited includes:
[0021] In response to receiving at least one image frame coordinate, determining an image frame corresponding to each of the image frame coordinates on the image to be edited; or
[0022] In response to receiving at least one preset gesture corresponding to the image to be edited, at least one area determined according to each preset gesture is projected on the image to be edited as an image frame.
[0023] In one possible implementation, the object detection result includes detection frame coordinates and corresponding probability values, where the probability values are used to characterize the possibility that a target object exists in the image to be detected within the corresponding detection frame coordinates, and the detection frame coordinates are detection area attributes characterized by coordinates.
[0024] In a possible implementation, the filtering of the object detection results according to the false detection area attributes and the detection area attributes to obtain the intrusion detection results includes:
[0025] Performing a first screening of the object detection results according to the correspondence between the attributes of each false detection area and the attributes of each detection area;
[0026] performing a second screening of the object detection results according to the probability value in each of the object detection results;
[0027] The intrusion detection result is determined based on the detection results of each object obtained after the first screening and the second screening.
[0028] In a possible implementation, the first screening of the object detection results according to the correspondence between the attributes of each false detection area and the attributes of each detection area includes:
[0029] In response to the object in the object detection result being located inside the false detection area represented by the false detection area attribute, the detection area attribute corresponding to the object in the object detection result is deleted.
[0030] In a possible implementation, the responding that the object in the object detection result is located inside the false detection area represented by the false detection area attribute is implemented by:
[0031] Determining key point positions of objects in the object detection results;
[0032] In response to the key point position being inside a false detection region represented by a false detection region attribute, it is determined that the detection region obtained by the detection region attribute representation is inside the false detection region.
[0033] In a possible implementation, performing a second screening based on the probability value in each of the object detection results includes:
[0034] In response to a probability value in the object detection result being less than a preset threshold, the object detection result is deleted.
[0035] In a possible implementation, the method further includes:
[0036] Annotate the image to be detected according to the intrusion detection result;
[0037] Output the labeled image to be detected and the corresponding prompt information.
[0038] According to a second aspect of the present disclosure, there is provided an object detection device, the device comprising:
[0039] an attribute determination module, configured to determine at least one false detection region attribute, wherein the false detection region attribute is used to characterize a position and a size of the false detection region;
[0040] An image detection module, configured to perform object detection on an image to be detected and obtain at least one object detection result, wherein each object detection result includes a detection area attribute representing a position and size of a detected object;
[0041] The result screening module is used to screen the object detection results according to the attributes of the false detection areas and the attributes of the detection areas to obtain intrusion detection results.
[0042] In a possible implementation, the attribute determination module includes:
[0043] The human-computer interaction submodule is configured to determine at least one misdetection region attribute in response to the misdetection region generated by the human-computer interaction operation.
[0044] In one possible implementation, the human-computer interaction submodule includes:
[0045] a pre-detection unit, configured to perform object detection on the image to be detected and display a pre-detection result of the object detection, wherein the pre-detection result includes at least one preliminary detection frame;
[0046] The first region determining unit is configured to, in response to receiving at least one preliminary detection frame selected by a user through human-computer interaction, determine that a region represented by the preliminary detection frame is a misdetected region.
[0047] In one possible implementation, the human-computer interaction submodule includes:
[0048] An editing control display unit, used to display the editing control on the scene display interface;
[0049] an edited image display unit, configured to display an image to be edited corresponding to the image to be detected in response to the edit control being triggered;
[0050] The second region determining unit is configured to, in response to at least one region in the image to be edited being selected, determine that each of the selected regions is a misdetected region.
[0051] In a possible implementation, the second region determining unit includes:
[0052] An image frame determining subunit, configured to determine at least one image frame corresponding to the image to be edited;
[0053] The false detection area determination subunit is used to determine the area within each image frame as the selected false detection area.
[0054] In a possible implementation, the image frame determination subunit includes:
[0055] a coordinate receiving subunit, configured to, in response to receiving at least one image frame coordinate, determine an image frame corresponding to each image frame coordinate on the image to be edited; or
[0056] The gesture determination subunit is configured to, in response to receiving at least one preset gesture corresponding to the image to be edited, project at least one area determined according to each preset gesture on the image to be edited as an image frame.
[0057] In one possible implementation, the object detection result includes detection frame coordinates and corresponding probability values, where the probability values are used to characterize the possibility that a target object exists in the image to be detected within the corresponding detection frame coordinates, and the detection frame coordinates are detection area attributes characterized by coordinates.
[0058] In a possible implementation, the result screening module includes:
[0059] A first screening submodule, configured to perform a first screening of the object detection results according to a correspondence between the attributes of each falsely detected area and the attributes of each detected area;
[0060] A second screening submodule, configured to perform a second screening of the object detection results according to the probability value in each of the object detection results;
[0061] The result determination submodule is used to determine the intrusion detection result according to the detection results of each object obtained after the first screening and the second screening.
[0062] In a possible implementation, the first screening submodule includes:
[0063] A position screening unit is configured to delete the detection area attribute corresponding to the object in the object detection result in response to the object in the object detection result being located inside the false detection area represented by the false detection area attribute.
[0064] In a possible implementation, the location screening unit includes:
[0065] a key point determination subunit, configured to determine key point positions of objects in the object detection result;
[0066] The position relationship determination subunit is configured to determine, in response to the key point position being inside a false detection area represented by a false detection area attribute, that the detection area obtained by the detection area attribute representation is inside the false detection area.
[0067] In a possible implementation, the second screening submodule includes:
[0068] The threshold screening unit is configured to delete the object detection result in response to a probability value in the object detection result being less than a preset threshold.
[0069] In a possible implementation, the apparatus further includes:
[0070] An image annotation module, configured to annotate the image to be detected according to the intrusion detection result;
[0071] The information display module is used to output the labeled image to be detected and the corresponding prompt information.
[0072] According to a third aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to call the instructions stored in the memory to execute the above method.
[0073] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored, and the computer program instructions implement the above method when executed by a processor.
[0074] In the disclosed embodiments, the object detection method defines a false detection region in a specific scenario and then filters the detection results based on the false detection region to improve the accuracy of the detection results. Furthermore, in scenarios such as product demonstrations, this method can also be used to monitor and identify false positives and correct them in a timely manner.
[0075] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, rather than limiting the present disclosure. Other features and aspects of the present disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] The accompanying drawings herein are incorporated into and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and, together with the specification, are used to explain the technical solutions of the present disclosure.
[0077] Figure 1 A flow chart of an object detection method according to an embodiment of the present disclosure is shown;
[0078] Figure 2 A flowchart showing a process of determining attributes of a misdetected region according to an embodiment of the present disclosure is shown;
[0079] Figure 3 A schematic diagram showing a scene display interface according to an embodiment of the present disclosure;
[0080] Figure 4 A schematic diagram illustrating a method for determining an object detection result according to an embodiment of the present disclosure is shown;
[0081] Figure 5 A schematic diagram showing a screening object detection result according to an embodiment of the present disclosure;
[0082] Figure 6 A schematic diagram illustrating a correspondence between attributes of a falsely detected region and attributes of a detected region according to an embodiment of the present disclosure is shown;
[0083] Figure 7 A schematic diagram illustrating an object detection device according to an embodiment of the present disclosure;
[0084] Figure 8 is a block diagram of an electronic device according to an exemplary embodiment;
[0085] Figure 9 is a block diagram of another electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0086] Various exemplary embodiments, features, and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise indicated.
[0087] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0088] The term "and / or" herein simply describes an association relationship between associated objects, indicating that three relationships can exist. For example, "A and / or B" can represent the existence of three situations: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" herein refers to any combination of at least two of any one or more of a plurality of items. For example, "at least one of A, B, and C" can represent any one or more elements selected from the set consisting of A, B, and C.
[0089] In addition, numerous specific details are provided in the following detailed description to better illustrate the present disclosure. Those skilled in the art will appreciate that the present disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art are not described in detail in order to highlight the main points of the present disclosure.
[0090] Figure 1 A flowchart of an object detection method according to an embodiment of the present disclosure is shown. In one possible implementation, the object detection method can be executed by an electronic device such as a terminal device or a server. The terminal device can be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. The method can be implemented by a processor calling a computer-readable instruction stored in a memory. Alternatively, the method can be executed by a server. The server can be a single server or a server cluster consisting of multiple servers.
[0091] In an exemplary application scenario, the object detection method of the embodiment of the present disclosure can be executed by a terminal device or other processing device based on the detection results obtained in the historical object detection process to correct the errors in the object detection process, thereby improving the accuracy of the object detection results.
[0092] like Figure 1 As shown, the object detection method of the embodiment of the present disclosure includes the following steps:
[0093] Step S10: Determine at least one misdetected region attribute.
[0094] In one possible implementation, the false detection region attribute is used to characterize the location and size of the false detection region. For example, it may include the coordinates of an image frame used to delineate the false detection region, with the area within the image frame being the false detection region. Optionally, the false detection region is an area where, during the detection process, there is a high probability of falsely detecting an object when none exists. The false detection region can be determined based on historical object detection results or preliminary detection results of the image to be detected.
[0095] In one optional application scenario, the object detection method of the disclosed embodiments is used for object detection in a fixed scene. Specifically, if a specific area within the same scene frequently experiences false detections, that area is identified as a false detection region. In subsequent object detection processes, the false detection region attributes are used to filter detection results, thereby improving the accuracy of detection results without modifying the underlying algorithm.
[0096] In another optional application scenario, the object detection method of the disclosed embodiments is used to correct the detection results of a specific image to be detected. That is, before performing formal object detection on the image to be detected, a preliminary object detection is performed. If an error occurs in the results of this preliminary object detection, the error-detected area is determined as a false detection area. During the formal object detection process, the false detection area attributes of the false detection area are used to filter the detection results, thereby improving the accuracy of the formal detection results.
[0097] Optionally, in any of the above application scenarios, the method for determining the attributes of the falsely detected regions can be to determine at least one falsely detected region attribute in response to a falsely detected region generated by a human-computer interaction operation. That is, a user can directly interact with the electronic device through a human-computer interaction module of the electronic device, such as a mouse, keyboard, or touch screen, to select at least one falsely detected region based on historical object detection results or preliminary detection results of the image to be detected, and obtain the corresponding falsely detected region attribute.
[0098] In a possible implementation, the process of generating a false detection area in response to a human-computer interaction operation in an embodiment of the present disclosure may also include: performing object detection on the image to be detected and displaying a preliminary detection result of the object detection, the preliminary detection result including at least one preliminary detection frame. In response to receiving at least one preliminary detection frame selected by the user through a human-computer interaction operation, determining that the area represented by the preliminary detection frame is a false detection area. That is to say, before performing formal object detection on the image to be detected, a preliminary object detection may be performed to obtain a preliminary detection result, the preliminary detection result including at least one preliminary detection frame. The electronic device displays the image to be detected with the preliminary detection frame through a display device, and the user can directly identify whether there is an object in each preliminary detection frame. If not, the user can directly select the preliminary detection frame to use the area within the preliminary detection frame as a false detection area.
[0099] Figure 2 FIG. 5 is a flow chart showing a process of determining attributes of a misdetected region according to an embodiment of the present disclosure. Figure 2 As shown, the process of determining the attributes of the misdetected area through human-computer interaction in the embodiment of the present disclosure includes the following steps:
[0100] Step S11: Display the editing control on the scene display interface.
[0101] In one possible implementation, the scene display interface is configured to display an edit control. When triggered, the edit control is configured to enter an edit mode, allowing selection of the erroneously detected region through editing. Optionally, the scene display interface is further configured to display an image to be edited corresponding to the image to be detected, as well as image information corresponding to the image to be edited. The image to be edited corresponds to the image to be detected during the current object detection process, and the user can select the erroneously detected region based on the image to be edited after triggering the edit control.
[0102] Furthermore, the scene display interface may also display content such as image modification controls for replacing, adding, and deleting the image to be edited.
[0103] Step S12: In response to the editing control being triggered, displaying the image to be edited corresponding to the image to be detected.
[0104] In one possible implementation, the user can trigger the editing control by clicking the touch screen of the electronic device through a preset gesture, or by clicking or double-clicking the mouse. When the editing control is triggered, the editing mode is entered, that is, the image to be edited is displayed on the scene display interface. In particular, if the image to be edited is already displayed in the scene display interface, the image is no longer redisplayed, and the image to be edited is directly converted from a non-editable state to an editable state. If the image to be edited is not displayed in the scene display interface, the image to be edited corresponding to the image to be detected is loaded and displayed, and the state of the image to be edited is set to an editable state.
[0105] Furthermore, the image to be edited can be an image of the same acquisition scene as the image to be detected that requires object detection, and can be selected according to different application scenarios. For example, in an application scenario where a formal object detection is performed again on an image that has undergone preliminary object detection, the image to be detected can be directly determined to be the image to be edited. In an application scenario where the object detection result of the image to be detected is corrected based on the historical image detection result, an image that was acquired in the same acquisition scene and has completed object detection can be obtained as the image to be edited. Optionally, the acquisition scene can be a scene such as a stairwell, a street, a corridor, or a residential area. The image to be edited also displays the location of the object detected after historical object detection or preliminary object detection, and the location can be marked with a corresponding detection frame.
[0106] Step S13: In response to at least one region in the image to be edited being selected, determining each of the selected regions as a misdetected region.
[0107] In one possible implementation, the erroneous detection region is determined by selecting a portion of the image to be edited. Optionally, the portion of the image to be edited is selected by adding an image frame to the image to be edited. In other words, at least one image frame corresponding to the image to be edited is determined, and the region within each image frame is determined as the selected erroneous detection region.
[0108] Furthermore, the image frame corresponding to the image to be edited can be added in different ways. For example, in response to receiving at least one image frame coordinate, the image frame corresponding to each image frame coordinate can be determined on the image to be edited. That is, the user can input the image frame coordinates representing the position of the image frame in the image to be edited through peripherals such as a keyboard and a mouse, and the electronic device directly determines the corresponding image frame when receiving the image frame coordinates. Alternatively, in response to receiving at least one preset gesture corresponding to the image to be edited, the corresponding image frame can be determined according to the position of each preset gesture on the image to be edited. In other words, the user can also directly draw the corresponding image frame on the image to be edited by dragging the mouse or by gesture dragging.
[0109] Optionally, when the image to be edited also includes detection frames obtained through preliminary object detection or historical object detection, the user can add image frames based on each detection frame. Alternatively, the user can directly select some of the detection frames as image frames.
[0110] In one optional implementation, after determining at least one falsely detected region in the image to be edited, corresponding falsely detected region attributes are determined based on the location of each falsely detected region in the image to be edited and the size of the region to be detected. Optionally, the falsely detected region attributes may be image frame coordinates representing the falsely detected region.
[0111] Figure 3 FIG. 3 is a schematic diagram showing a scene display interface 30 according to an embodiment of the present disclosure. Figure 3 As shown, the scene display interface 30 can be used to display an editing control 31, which is used to enter an editing mode when triggered. Furthermore, the scene display interface 30 can also be used to display an image to be edited 32 and image information 34 corresponding to the image to be edited 32. Before the editing control 31 is triggered, the image to be edited 32 is in a non-editable state. After the editing control 32 is triggered, the image to be edited 32 enters an editing state. Optionally, the image to be edited 32 also has a corresponding detection frame 33, which represents the area of the image to be edited 32 where an object is detected after preliminary object detection or historical object detection. After entering the editing mode, the user can select at least one corresponding misdetected area based on the detection frame 33 marked in the image to be edited 32.
[0112] Furthermore, the electronic device may also directly receive the misdetected area attributes transmitted by other devices.
[0113] Step S20: Perform object detection on the image to be detected to obtain at least one object detection result.
[0114] In one possible implementation, object detection is performed on a predetermined image to be detected to obtain at least one object detection result. The detection method may be to input the image to be detected into a trained object detection model to perform object detection and output at least one object detection result. Each object detection result includes a detection frame coordinate and a corresponding probability value, and the probability value is used to characterize the possibility that the target object exists in the corresponding detection frame coordinate of the image to be detected, and the detection frame coordinate may be a detection area attribute characterized by coordinates. For example, when the object detection in the embodiment of the present disclosure is face recognition, the object detection model will detect the detection area that may be a face in the image to be detected, and output the detection frame coordinates surrounding each detection area, as well as the probability value of each detection area including a face.
[0115] Figure 4FIG. 1 is a schematic diagram showing a method for determining an object detection result according to an embodiment of the present disclosure. Figure 4 As shown, after determining the image 40 to be detected, the embodiment of the present disclosure inputs the image 40 to be detected into a pre-trained object detection model 41, and outputs a corresponding object detection result 42. The content included in the object detection result 42 is determined according to the output format of the object detection model 41.
[0116] In another possible implementation of the embodiment of the present disclosure, the detection method can also be to input the image to be detected into the trained object detection model, and the object detection model extracts image features to perform object detection, and only determines the coordinates of the detection boxes of multiple possible objects as the object detection results, and then further performs probability value detection after screening the object detection results based on the position to obtain the intrusion detection results.
[0117] Step S30: Filter the object detection results according to the attributes of the false detection areas and the attributes of the detection areas to obtain intrusion detection results.
[0118] In one possible implementation, the detection region attributes are used to characterize the position and size of the detection region corresponding to the object detection result. The detection region is the area in the image to be detected where the object is likely to be present. That is, the detection region attributes characterize the position and size of the area in the image to be detected where the object is likely to be present. Optionally, when each object detection result includes detection frame coordinates, the area enclosed by the detection frame is the detection region. The position and size of the corresponding area can be directly determined based on the detection frame coordinates to obtain the detection region attributes.
[0119] In one possible implementation, the object detection results include the coordinates of the detection box and the corresponding probability values. In this case, the intrusion detection result can be determined by performing a first screening of the object detection results based on the correspondence between the attributes of each false detection area and the attributes of each detection area, then performing a second screening of the object detection results based on the probability values in each object detection result, and finally determining the intrusion detection result based on the object detection results obtained after the first and second screenings.
[0120] Optionally, the first screening process may include deleting the detection area attribute corresponding to the object in the object detection result in response to the detection area corresponding to the detection area being within a false detection area represented by a false detection area attribute. That is, when there is a false detection area attribute that corresponds in position to the detection area attribute, the probability that the current object detection result is a false detection result is high, and the object detection result is deleted. Corresponding positional relationships mean that the corresponding detection area is within or overlaps with the false detection area.
[0121] Optionally, whether the detection area is within the false detection area can be determined by determining the position of a key point within the detection area. For example, the key point position of the object in the object detection result is determined, and in response to the key point position being within the false detection area represented by a false detection area attribute, the detection area attribute representation determines that the detection area is within the false detection area. In one possible implementation, the center position or the bottom edge center position of the detection area can be set as the key point. When the key point is within a false detection area, the detection area is determined to be within the false detection area.
[0122] Furthermore, the second screening process can include deleting an object detection result in response to a probability value in the object detection result being less than a preset threshold. That is, when the probability value included in the object detection result is less than the preset threshold, the probability of the object existing in the detection area corresponding to the object detection result is considered low, and the object detection result is deleted. For example, if there are three object detection results (object detection result 1, object detection result 2, and object detection result 3) with probability values of 0.68, 0.59, and 0.81, respectively, and the preset threshold is 0.6, object detection result 2 is deleted, and object detection results 1 and 3 are retained.
[0123] Figure 5 FIG. 5 is a schematic diagram showing a screening object detection result 50 according to an embodiment of the present disclosure. Figure 5 As shown, in one possible implementation, the object detection result 50 includes detection frame coordinates and a probability value. After determining the object detection result 50, a detection region attribute 51 representing the position and size of the detection area is first determined based on the detection frame coordinates in the object detection result. Furthermore, a first screening is performed by comparing the detection region attribute 51 with each false detection region attribute 52 to determine whether a corresponding relationship exists. This correspondence, namely, whether the detection region represented by the attribute 51 overlaps with the false detection region or is within the false detection region. If a corresponding false detection region attribute 52 exists, the object detection result 50 is directly deleted. If not, a probability value 53 in the detection region attribute is further obtained and a second screening is performed, namely, comparing the probability value 53 with a preset threshold 54. If the probability value 53 is less than the preset threshold 54, the object detection result 50 is deleted. If the probability value 53 is not less than the preset threshold 54, an intrusion detection result 55 is further determined based on the object detection result 50.
[0124] Optionally, the execution order of the first screening process and the second screening process can be randomly set and is not limited here.
[0125] Figure 6 FIG. 1 is a schematic diagram showing the corresponding relationship between the attributes of the false detection area and the attributes of the detection area according to an embodiment of the present disclosure. Figure 6As shown, the embodiment of the present disclosure can determine whether the attributes of the false detection area correspond to the attributes of the detection area based on the position relationship.
[0126] For illustration purposes, the present disclosure predefines two falsely detected region attributes, each corresponding to a first falsely detected region 62 and a second falsely detected region 63. After object detection, if two object detection results are obtained, and the corresponding detection region attributes represent the first detection region 60 and the second detection region 61, respectively, the object detection results are filtered by determining the positional relationships between the first detection region 60 and the second detection region 61 and the first falsely detected region 62 and the second falsely detected region 63.
[0127] Furthermore, when the feature point of the detection area is within the false detection area, the detection area is determined to correspond to the false detection area, and the object detection result corresponding to the detection area is deleted. The feature point can be any point in the detection area, such as the center point, the vertex of the detection area, etc. For example, when the feature point of the detection area is the midpoint of the bottom edge of the detection area, Figure 6 The second detection area 61 in the image corresponds to the first erroneous detection area 62, that is, the object detection result corresponding to the second detection area 61 is deleted.
[0128] In another possible implementation of the embodiment of the present disclosure, the screening process can also be completed directly in the object detection model of the image to be detected input. Optionally, after the image to be detected is input into the trained object detection model, the object detection model first extracts image features to perform object detection, and only determines the obtained multiple detection frame coordinates where objects may exist as object detection results. Furthermore, the object detection model performs screening based on the correspondence between the detection frame coordinates in each object detection result and the attributes of each false detection area, and deletes the object detection results with the corresponding false detection area attributes. The object detection model further detects the probability values of the objects included in the multiple detection frame coordinates obtained after screening, and adds the detection frame coordinates and the corresponding probability values with probability values greater than a preset threshold to the intrusion detection results, and finally outputs an intrusion detection result that does not include an object detection result, or includes at least one detection result, based on the screening results and the probability values.
[0129] Furthermore, after obtaining the intrusion detection results, the image to be detected is annotated with the intrusion detection results, and the annotated image to be detected and the corresponding prompt information are output. This method can prompt the user with the current detection results and also serve as the image to be edited in the next detection process to correct the next detection results.
[0130] The disclosed embodiments can identify misdetection regions based on previously detected images in specific acquisition scenarios. When performing object detection, the resulting detection results can be filtered based on these misdetection regions to improve detection accuracy. Furthermore, in scenarios such as product demonstrations, this method can be used to monitor and identify misdetection results and promptly correct them.
[0131] It is understood that the above-mentioned various method embodiments mentioned in this disclosure can be combined with each other to form combined embodiments without violating the principle logic. Due to space limitations, this disclosure will not go into details. It is understood by those skilled in the art that in the above-mentioned methods of specific implementation, the specific execution order of each step should be determined by its function and possible internal logic.
[0132] In addition, the present disclosure also provides an object detection device, an electronic device, a computer-readable storage medium, and a program, all of which can be used to implement any object detection method provided by the present disclosure. The corresponding technical solutions and descriptions are referred to the corresponding records in the method section and will not be repeated here.
[0133] Figure 7 A schematic diagram of an object detection device according to an embodiment of the present disclosure is shown. Figure 7 As shown, the object detection device of the embodiment of the present disclosure includes:
[0134] An attribute determination module 70 is configured to determine at least one false detection region attribute, wherein the false detection region attribute is used to characterize the position and size of the false detection region;
[0135] An image detection module 71 is configured to perform object detection on an image to be detected and obtain at least one object detection result, wherein each object detection result includes a detection area attribute representing a position and size of a detected object;
[0136] The result screening module 72 is used to screen the object detection results according to the attributes of the false detection areas and the attributes of the detection areas to obtain intrusion detection results.
[0137] In a possible implementation, the attribute determination module includes:
[0138] The human-computer interaction submodule is configured to determine at least one misdetection region attribute in response to the misdetection region generated by the human-computer interaction operation.
[0139] In one possible implementation, the human-computer interaction submodule includes:
[0140] a pre-detection unit, configured to perform object detection on the image to be detected and display a pre-detection result of the object detection, wherein the pre-detection result includes at least one preliminary detection frame;
[0141] The first region determining unit is configured to, in response to receiving at least one preliminary detection frame selected by a user through human-computer interaction, determine that a region represented by the preliminary detection frame is a misdetected region.
[0142] In one possible implementation, the human-computer interaction submodule includes:
[0143] An editing control display unit, used to display the editing control on the scene display interface;
[0144] an edited image display unit, configured to display an image to be edited corresponding to the image to be detected in response to the edit control being triggered;
[0145] The second region determining unit is configured to, in response to at least one region in the image to be edited being selected, determine that each of the selected regions is a misdetected region.
[0146] In a possible implementation, the second region determining unit includes:
[0147] An image frame determining subunit, configured to determine at least one image frame corresponding to the image to be edited;
[0148] The false detection area determination subunit is used to determine the area within each image frame as the selected false detection area.
[0149] In a possible implementation, the image frame determination subunit includes:
[0150] a coordinate receiving subunit, configured to, in response to receiving at least one image frame coordinate, determine an image frame corresponding to each image frame coordinate on the image to be edited; or
[0151] The gesture determination subunit is configured to, in response to receiving at least one preset gesture corresponding to the image to be edited, project at least one area determined according to each preset gesture on the image to be edited as an image frame.
[0152] In one possible implementation, the object detection result includes detection frame coordinates and corresponding probability values, where the probability values are used to characterize the possibility that a target object exists in the image to be detected within the corresponding detection frame coordinates, and the detection frame coordinates are detection area attributes characterized by coordinates.
[0153] In a possible implementation, the result screening module includes:
[0154] A first screening submodule, configured to perform a first screening of the object detection results according to a correspondence between the attributes of each falsely detected area and the attributes of each detected area;
[0155] A second screening submodule, configured to perform a second screening of the object detection results according to the probability value in each of the object detection results;
[0156] The result determination submodule is used to determine the intrusion detection result according to the detection results of each object obtained after the first screening and the second screening.
[0157] In a possible implementation, the first screening submodule includes:
[0158] A position screening unit is configured to delete the detection area attribute corresponding to the object in the object detection result in response to the object in the object detection result being located inside the false detection area represented by the false detection area attribute.
[0159] In a possible implementation, the location screening unit includes:
[0160] a key point determination subunit, configured to determine key point positions of objects in the object detection result;
[0161] The position relationship determination subunit is configured to determine, in response to the key point position being inside a false detection area represented by a false detection area attribute, that the detection area obtained by the detection area attribute representation is inside the false detection area.
[0162] In a possible implementation, the second screening submodule includes:
[0163] The threshold screening unit is configured to delete the object detection result in response to a probability value in the object detection result being less than a preset threshold.
[0164] In a possible implementation, the apparatus further includes:
[0165] An image annotation module, configured to annotate the image to be detected according to the intrusion detection result;
[0166] The information display module is used to output the labeled image to be detected and the corresponding prompt information.
[0167] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments. For the sake of brevity, it will not be repeated here.
[0168] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon, wherein the computer program instructions implement the above method when executed by a processor. The computer-readable storage medium may be a volatile or non-volatile computer-readable storage medium.
[0169] An embodiment of the present disclosure further proposes an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to call the instructions stored in the memory to execute the above method.
[0170] An embodiment of the present disclosure also provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.
[0171] The electronic device may be provided as a terminal, a server, or other forms of devices.
[0172] Figure 8 8 is a block diagram of an electronic device 800 according to an exemplary embodiment. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, or the like.
[0173] Reference Figure 8 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0174] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operation, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 802 may include one or more modules to facilitate interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
[0175] The memory 804 is configured to store various types of data to support operations on the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
[0176] The power supply component 806 provides power to the various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 800.
[0177] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.
[0178] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), which is configured to receive external audio signals when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0179] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as a keyboard, click wheel, buttons, etc. These buttons may include but are not limited to: a home button, volume buttons, a start button, and a lock button.
[0180] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the electronic device 800, the relative positioning of components, such as the display and keypad of the electronic device 800. The sensor assembly 814 can also detect changes in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include a light sensor, such as a complementary metal oxide semiconductor (CMOS) or charge coupled device (CCD) image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0181] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as a wireless network (WiFi), a second generation mobile communication technology (2G) or a third generation mobile communication technology (3G), or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0182] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0183] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 804 including computer program instructions, which can be executed by the processor 820 of the electronic device 800 to perform the above method.
[0184] Figure 9 1 is a block diagram of an electronic device 900 according to an exemplary embodiment. For example, the electronic device 900 may be provided as a server. Figure 9 The electronic device 900 includes a processing component 922, which further includes one or more processors, and a memory resource represented by a memory 932 for storing instructions executable by the processing component 922, such as an application. The application stored in the memory 932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 922 is configured to execute the instructions to perform the above-described method.
[0185] The electronic device 900 may further include a power supply component 926 configured to perform power management of the electronic device 900, a wired or wireless network interface 950 configured to connect the electronic device 900 to a network, and an input / output (I / O) interface 958. The electronic device 900 may operate based on an operating system stored in the memory 932, such as a Microsoft Server operating system (Windows Server 2003). TM ), a graphical user interface operating system launched by Apple (Mac OS X TM ), a multi-user, multi-process computer operating system (Unix TM ), a free and open source Unix-like operating system (Linux TM ), an open-source Unix-like operating system (FreeBSD TM ) or similar.
[0186] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 932 including computer program instructions that can be executed by the processing component 922 of the electronic device 900 to perform the above method.
[0187] The present disclosure may be a system, method and / or computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0188] Computer-readable storage media can be a tangible device that can hold and store the instructions used by the instruction execution device. Computer-readable storage media can be, for example, (but not limited to) an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, for example, a punch card or a convex structure in a groove on which instructions are stored, and any suitable combination thereof. Computer-readable storage media used herein is not interpreted as a transient signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagated by waveguides or other transmission media (for example, light pulses by fiber optic cables), or electrical signals transmitted by wires.
[0189] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions to be stored in the computer-readable storage medium in each computing / processing device.
[0190] The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, and conventional procedural programming languages such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., utilizing an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions. The electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0191] Various aspects of the present disclosure are described herein with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.
[0192] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0193] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0194] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and the part of the module, program segment or instruction contains one or more executable instructions for realizing the prescribed logical function. In some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the prescribed function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0195] The computer program product may be implemented in hardware, software, or a combination thereof. In one embodiment, the computer program product is implemented as a computer storage medium. In another embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).
[0196] While various embodiments of the present disclosure have been described above, the above descriptions are illustrative, non-exhaustive, and not intended to be limiting of the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is selected to best explain the principles of the embodiments, their practical applications, or improvements to existing technologies, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. An object detection method, characterized in that: The method comprises: determining at least one false detection region attribute, wherein the false detection region attribute is used to characterize a position and a size of the false detection region; Performing object detection on the image to be detected to obtain at least one object detection result, wherein each object detection result includes a detection area attribute representing the position and size of the detected object; The object detection results are screened according to the attributes of the false detection areas and the attributes of the detection areas to obtain intrusion detection results.
2. The method according to claim 1, characterized in that Determining at least one false detection region attribute includes: In response to the misdetection region generated by the human-computer interaction operation, at least one misdetection region attribute is determined.
3. The method according to claim 2, characterized in that The misdetected area generated in response to the human-computer interaction operation is achieved by: Performing object detection on the image to be detected and displaying a preliminary detection result of the object detection, wherein the preliminary detection result includes at least one preliminary detection frame; In response to receiving at least one preliminary detection box selected by a user through a human-computer interaction operation, determining that a region represented by the preliminary detection box is a misdetected region.
4. The method according to claim 2, characterized in that The misdetected area generated in response to the human-computer interaction operation is achieved by: Display editing controls on the scene display interface; In response to the editing control being triggered, displaying the image to be edited corresponding to the image to be detected; In response to at least one region in the image to be edited being selected, each of the selected regions is determined to be a misdetected region.
5. The method according to claim 4, characterized in that In response to at least one area in the image to be edited being selected, determining each of the selected areas as a misdetected area includes: Determining at least one image frame corresponding to the image to be edited; The area within each image frame is determined to be a selected misdetected area.
6. The method according to claim 5, characterized in that Determining at least one image frame corresponding to the image to be edited includes: In response to receiving at least one image frame coordinate, determining an image frame corresponding to each of the image frame coordinates on the image to be edited; or In response to receiving at least one preset gesture corresponding to the image to be edited, at least one area determined according to each preset gesture is projected on the image to be edited as an image frame.
7. The method according to any one of claims 1 to 6, characterized in that The object detection result includes the detection frame coordinates and the corresponding probability value. The probability value is used to represent the possibility that the target object exists in the image to be detected within the corresponding detection frame coordinates. The detection frame coordinates are the detection area attributes represented by coordinates.
8. The method according to claim 7, characterized in that The filtering of each object detection result according to each false detection area attribute and each detection area attribute to obtain an intrusion detection result includes: Performing a first screening of the object detection results according to the correspondence between the attributes of each false detection area and the attributes of each detection area; performing a second screening of the object detection results according to the probability value in each of the object detection results; The intrusion detection result is determined based on the detection results of each object obtained after the first screening and the second screening.
9. The method according to claim 8, characterized in that The first screening of the object detection results according to the correspondence between the attributes of each false detection area and the attributes of each detection area includes: In response to the object in the object detection result being located inside the false detection area represented by the false detection area attribute, the detection area attribute corresponding to the object in the object detection result is deleted.
10. The method according to claim 9, characterized in that The response to the object in the object detection result being located inside the false detection area represented by the false detection area attribute is achieved by: Determining key point positions of objects in the object detection results; In response to the key point position being inside a false detection region represented by a false detection region attribute, it is determined that the detection region obtained by the detection region attribute representation is inside the false detection region.
11. The method according to claim 8, characterized in that The second screening according to the probability value in each of the object detection results includes: In response to a probability value in the object detection result being less than a preset threshold, the object detection result is deleted.
12. The method according to any one of claims 1 to 6, characterized in that The method further comprises: Annotate the image to be detected according to the intrusion detection result; Output the labeled image to be detected and the corresponding prompt information.
13. An object detection device, characterized in that: The device comprises: an attribute determination module, configured to determine at least one false detection region attribute, wherein the false detection region attribute is used to characterize a position and a size of the false detection region; An image detection module, configured to perform object detection on an image to be detected and obtain at least one object detection result, wherein each object detection result includes a detection area attribute representing a position and size of a detected object; The result screening module is used to screen the object detection results according to the attributes of the false detection areas and the attributes of the detection areas to obtain intrusion detection results.
14. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method according to any one of claims 1 to 12.
15. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 12 is implemented.
Citation Information
Patent Citations
Device and method for detecting specific object in image sequence as well as video camera equipment
CN102411703A
Target detection method and device based on unmanned aerial vehicle, electronic equipment and storage medium
CN110781821A