Object detection method and apparatus, electronic device, and storage medium
By extracting and matching object feature information after obtaining authorization from surveillance video, the problem of object detection in surveillance scenarios with privacy regulations is solved, achieving both privacy protection and efficient detection.
Patent Information
- Application Number
- CN202210398850.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-15
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2042-04-15
AI Technical Summary
Existing technologies cannot achieve object detection in surveillance scenarios while meeting privacy regulations, especially when facial feature information is extracted and stored without consent.
After obtaining authorization from the target object, feature information is extracted from the surveillance video using computer vision technology. During the detection process, matching and clearing of mismatched feature information are performed to avoid pre-storing feature information.
It enables the detection and determination of the existence and behavior of target objects while complying with privacy regulations, protecting personal privacy, saving computing resources, and improving detection speed.
Smart Images

Figure CN114842530B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, and in particular to an object detection method and device, an electronic device, and a storage medium. BACKGROUND
[0002] With the development of computer vision technology, especially the emergence of deep learning models, object detection technology based on computer vision technology has gradually been applied to various aspects of production and life.
[0003] In the prior art, for a monitoring scene, when collecting monitoring video data, face snapshot technology is used to perform face recognition on a real-time collected monitoring video data stream, to detect faces in the monitoring video data and model the faces, to obtain and store feature information of the faces. In a subsequent evidence collection or comparison process, the feature information of a target face is directly compared with feature information of each face previously stored, to obtain a detection result of the target face.
[0004] However, with the improvement of people's awareness of safety and privacy and the improvement of relevant regulations, the existing privacy regulations prohibit pre-extraction and storage of feature information of personnel without their consent. Therefore, how to realize object detection while meeting privacy regulations has become a technical problem to be solved. SUMMARY
[0005] Embodiments of the present application aim to provide an object detection method, device, electronic device, and storage medium, to realize object detection while meeting privacy regulations. The specific technical solutions are as follows:
[0006] In a first aspect, an object detection method is provided, which includes: obtaining feature information of a target object, in a case where detection of the target object is authorized; obtaining image data to be detected; performing feature extraction on each object in the image data to be detected, to obtain feature information of each object; matching the feature information of the target object with the feature information of each object, to obtain a matching result; removing feature information of an object that does not match the target object, according to the matching result; and determining a detection result of the target object, according to the matching result.
[0007] In one possible implementation, the obtaining of the feature information of the target object, in a case where detection of the target object is authorized, includes: after obtaining a detection task for a target object, generating authorization prompt information for the target object; obtaining image data containing the target object, in a case where an authorization instruction for the authorization prompt information is obtained; and performing feature extraction on the target object based on the image data containing the target object, to obtain the feature information of the target object.
[0008] In a possible implementation, the authorization prompt information includes a detection authorization prompt item and a feature storage authorization prompt item; and the obtaining the image data containing the target object in the case where the authorization instruction for the authorization prompt information is obtained includes: obtaining the image data containing the target object in the case where the authorization instruction for the detection authorization prompt item is obtained.
[0009] The method further includes: storing the feature information of the target object and the feature information of the object matched with the target object in the case where the authorization instruction for the feature storage authorization prompt item is obtained; and clearing the feature information of the target object and the feature information of the object matched with the target object after obtaining the detection result of the target object in the case where the authorization instruction for the feature storage authorization prompt item is not obtained.
[0010] In a possible implementation, the obtaining the image data to be detected includes: obtaining a monitoring video and event information of the monitoring video, where the event information indicates image data in which a preset event exists in the monitoring video; and extracting image data in which a preset event exists from the monitoring video based on the event information to obtain the image data to be detected.
[0011] In a possible implementation, the event information includes an event type of a preset event and associated segment information, where, for any event information, the associated segment information of the event information indicates a segment in which the preset event corresponding to the event information exists in the monitoring video; and the extracting image data in which a preset event exists from the monitoring video based on the event information to obtain the image data to be detected includes: extracting a segment in which a preset event of a specified event type exists from the monitoring video based on the associated segment information in the event information to obtain the image data to be detected.
[0012] In a possible implementation, the method further includes: performing event detection on the collected monitoring video to determine each segment in which a preset event exists and an event type of the preset event in each segment; and generating event information of each segment according to each segment and the event type of the preset event in each segment.
[0013] In a possible implementation, the event information includes an event type of the preset event and image frame information, and for any event information, the image frame information of the event information indicates one or more image frames in which the preset event of the event information exists in the image data to be detected; and the extracting of the image data in which the preset event exists from the monitoring video based on the event information to obtain the image data to be detected includes: extracting, based on the image frame information in the event information, image frames in which the preset event of the specified event type exists from the monitoring video to obtain the image data to be detected.
[0014] In a possible implementation, the method further includes: performing event detection on the collected monitoring video to determine each segment in which the preset event exists and an event type of the preset event in each segment; for each segment, selecting one or more image frames from the segment; and for each segment, generating event information of the selected image frames from the segment according to the selected image frames from the segment and the event type of the preset event in the segment.
[0015] In a possible implementation, after the event detection on the collected monitoring video to determine each segment in which the preset event exists and an event type of the preset event in each segment, the method further includes: filtering each segment according to a preset filtering rule to obtain filtered segments; and the generating of the event information of each segment according to each segment and the event type of the preset event in each segment includes: generating event information of the filtered segments according to the filtered segments and the event type of the preset event in the filtered segments; or the selecting of one or more image frames from each segment, and the generating of event information of the selected image frames from each segment according to the selected image frames from the segment and the event type of the preset event in the segment includes: for each filtered segment, selecting one or more image frames from the filtered segment; and for each filtered segment, generating event information of the selected image frames from the filtered segment according to the selected image frames from the filtered segment and the event type of the preset event in the filtered segment.
[0016] In a possible implementation, the filtering of each segment according to a preset filtering rule to obtain filtered segments includes: for each segment, determining a type of a triggering object that triggers the preset event in the segment to obtain a triggering object type of the segment; if the triggering object type of the segment does not include a target object type, filtering out the segment; and if the triggering object type of the segment includes the target object type, determining that the segment is a filtered segment, where the target object type is an object type that needs to be detected and corresponds to the preset event of the segment.
[0017] In a possible implementation, the filtering each of the segments according to the preset filtering rule to obtain filtered segments comprises: for each segment, if the segment only contains a white list object in a preset white list library, filtering out the segment; if the segment contains other objects in addition to the white list object, determining the segment as a filtered segment.
[0018] In a possible implementation, the filtering each of the segments according to the preset filtering rule to obtain filtered segments comprises: for each segment, matching feature information of each object in the segment with feature information of each white list object in a preset white list library, wherein the preset white list library stores feature information of each white list object that has been matched and authorized in advance; if the feature information of each object in the segment is successfully matched with the feature information of the white list object in the preset white list library, filtering out the segment; if feature information of at least one object in the segment is not successfully matched with the feature information of the white list object in the preset white list library, determining the segment as a filtered segment.
[0019] In a second aspect, an object detection device is provided, which comprises: a feature information acquisition module, configured to acquire feature information of a target object in a case that detection of the target object is authorized; an image data acquisition module, configured to acquire image data to be detected; a feature information extraction module, configured to extract features of each object in the image data to be detected to obtain feature information of each object; a feature information matching module, configured to match the feature information of the target object with the feature information of each object to obtain a matching result; a feature information clearing module, configured to clear feature information of an object that is not matched with the target object according to the matching result; and a detection result determination module, configured to determine a detection result of the target object according to the matching result.
[0020] In a possible implementation, the feature information acquisition module comprises: an authorization prompt information generation submodule, configured to generate authorization prompt information for a target object after obtaining a detection task for the target object; an authorization instruction acquisition submodule, configured to acquire image data containing the target object in a case that an authorization instruction for the authorization prompt information is acquired; and a feature information acquisition submodule, configured to extract features of the target object based on the image data containing the target object to obtain feature information of the target object.
[0021] In a possible implementation, the authorization prompt information comprises a detection authorization prompt item and a feature storage authorization prompt item; the authorization instruction acquisition submodule is specifically configured to: acquire image data containing the target object in a case where an authorization instruction for the detection authorization prompt item is acquired; the device further comprises a feature information storage submodule configured to: store feature information of the target object and feature information of an object matched with the target object in a case where an authorization instruction for the feature storage authorization prompt item is acquired; and a feature information clearing submodule configured to: clear the feature information of the target object and the feature information of the object matched with the target object after a detection result of the target object is obtained in a case where an authorization instruction for the feature storage authorization prompt item is not acquired.
[0022] In a possible implementation, the image data acquisition module comprises: an event information acquisition submodule configured to acquire a monitoring video and event information of the monitoring video, where the event information indicates image data in which a preset event exists in the monitoring video; and an image data extraction submodule configured to extract image data in which a preset event exists from the monitoring video based on the event information to obtain to-be-detected image data.
[0023] In a possible implementation, the event information comprises an event type of a preset event and associated segment information, where, for any event information, the associated segment information of the event information indicates a segment in which a preset event corresponding to the event information exists in the monitoring video; and the image data extraction submodule is specifically configured to: extract a segment in which a preset event of a specified event type exists from the monitoring video based on the associated segment information in the event information to obtain to-be-detected image data.
[0024] In a possible implementation, the device further comprises: a first preset event detection module configured to perform event detection on the acquired monitoring video to determine each segment in which a preset event exists and an event type of the preset event in each segment; and a first event information generation module configured to generate event information of each segment according to each segment and the event type of the preset event in each segment.
[0025] In a possible implementation, the event information comprises an event type of a preset event and image frame information, where, for any event information, the image frame information of the event information indicates one or more image frames in which a preset event corresponding to the event information exists in the to-be-detected image data; and the image data extraction submodule is specifically configured to: extract an image frame in which a preset event of a specified event type exists from the monitoring video based on the image frame information in the event information to obtain to-be-detected image data.
[0026] In a possible implementation, the apparatus further includes: a second preset event detection module, configured to perform event detection on the collected monitoring video, to determine each segment in which a preset event exists and an event type of the preset event in each segment; an image frame selection module, configured to select one or more image frames from each segment; and a second event information generation module, configured to generate event information of the selected image frames from each segment according to the selected image frames from the segment and the event type of the preset event in the segment.
[0027] In a possible implementation, the apparatus further includes: a segment filtering module, configured to filter each segment according to a preset filtering rule to obtain a filtered segment; the first event information generation module is specifically configured to generate event information of the filtered segment according to the filtered segment and the event type of the preset event in the filtered segment; or the second event information generation module is specifically configured to: select one or more image frames from each filtered segment; and generate event information of the selected image frames from each filtered segment according to the selected image frames from the filtered segment and the event type of the preset event in the filtered segment.
[0028] In a possible implementation, the segment filtering module is specifically configured to: determine, for each segment, a type of a triggering object that triggers the preset event in the segment to obtain a triggering object type of the segment; filter out the segment if the triggering object type of the segment does not include a target object type, and determine the segment as a filtered segment if the triggering object type of the segment includes the target object type, where the target object type is an object type that needs to be detected and corresponds to the preset event of the segment.
[0029] In a possible implementation, the segment filtering module is specifically configured to: filter out each segment if the segment only includes a white list object in a preset white list, and determine each segment as a filtered segment if the segment includes an object other than the white list object.
[0030] In a possible implementation, the segment filtering module is specifically configured to: for each segment, match feature information of each object in the segment with feature information of each white-listed object in a preset white-listed object library, wherein the preset white-listed object library stores feature information of each white-listed object that has been matched and authorized in advance; if the feature information of each object in the segment is successfully matched with the feature information of the white-listed object in the preset white-listed object library, filter out the segment; and if the feature information of at least one object in the segment is not successfully matched with the feature information of the white-listed object in the preset white-listed object library, determine that the segment is a filtered segment.
[0031] In a third aspect, an electronic device is provided, including a processor and a memory; the memory is configured to store a computer program; the processor is configured to execute the program stored in the memory, and implement any of the object detection methods provided in the present application.
[0032] In a fourth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement any of the object detection methods provided in the present application.
[0033] In a fifth aspect, a computer program product including instructions is provided, and when the computer program product is executed on a computer, the computer is caused to execute any of the object detection methods provided in the present application.
[0034] The embodiments of the present application have the following beneficial effects:
[0035] The object detection method, device, electronic device and storage medium provided by the embodiments of the present application obtain the feature information of the target object in the case of obtaining the authorization of the detection of the target object, obtain the image data to be detected, perform feature extraction on each object in the image data to be detected to obtain the feature information of each object, match the feature information of the target object with the feature information of each object to obtain a matching result, remove the feature information of the object that does not match the target object according to the matching result, and determine the detection result of the target object according to the matching result. The feature information of the personnel does not need to be extracted and stored in advance, but the feature information of each object is extracted from the image data to be detected in the process of object detection, and the detection authorization of the target object needs to be obtained, so that the object detection can be realized while meeting the privacy regulations. It is not necessary for any product or method of the present application to achieve all the advantages described above at the same time. BRIEF DESCRIPTION OF DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description only constitute some of the embodiments of the present application, and other embodiments can also be obtained by those skilled in the art based on these drawings.
[0037] Figure 1 The first schematic diagram of the object detection method in the embodiments of the present application;
[0038] Figure 2 The schematic diagram of one possible implementation of step S11 in the embodiments of the present application;
[0039] Figure 3 The schematic diagram of one possible implementation of step S12 in the embodiments of the present application;
[0040] Figure 4 The second schematic diagram of the object detection method in the embodiments of the present application;
[0041] Figure 5 The third schematic diagram of the object detection method in the embodiments of the present application;
[0042] Figure 6 The fourth schematic diagram of the object detection method in the embodiments of the present application;
[0043] Figure 7 The fifth schematic diagram of the object detection method in the embodiments of the present application;
[0044] Figure 8 The schematic diagram of one possible implementation of the segment filtering in the object detection method in the embodiments of the present application;
[0045] Figure 9 The schematic diagram of the electronic device in the embodiments of the present application. DETAILED DESCRIPTION
[0046] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments only constitute some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art based on the present application belong to the scope of protection of the present application.
[0047] First, the terms in the present application are explained:
[0048] Personnel feature information: part of personal information, refers to a symbol system (single or multiple symbols) associated with a specific individual and reflecting individual characteristics, which has identifiable characteristics;
[0049] Face capture: face feature analysis is performed on the video stream to be analyzed, and information is collected on the detected face features such as eyes, eyebrows, mouth, and other facial features, and the target area of the face is marked;
[0050] Face matching: face feature extraction (modeling) is performed on the target person and the person in the collected image, respectively, and the similarity is output by comparing the face features. If the similarity of two persons is higher than a preset similarity threshold, the two persons are considered to be the same person.
[0051] In order to realize object detection while meeting privacy regulations, an object detection method is provided in the embodiments of the present application, which is described with reference to Figure 1 , and the method comprises:
[0052] S11, in the case of obtaining authorization for detecting a target object, obtaining feature information of the target object.
[0053] The object detection method of the embodiments of the present application can be implemented by an electronic device, for example, the electronic device can be a camera, a hard disk recorder, a personal computer or a video storage server, etc.
[0054] The target object is the subject of object detection, for example, the target object can be a person, a vehicle or an animal, etc. When the target object is a person, the feature information of the target object can be the face information of the person. The acquisition method of the target object feature information can refer to related feature information acquisition technology. In one example, a sample image containing the target object can be obtained, and feature extraction is performed on the target object in the sample image, thereby obtaining the feature information of the target object. In the case of a target object such as a person or a vehicle, which involves privacy policy, the detection authorization for the target object needs to be obtained. The authorization here can be the authorization made by the target object itself, or can be granted by the guardian, owner or other personnel with authorization authority according to the function.
[0055] S12, obtaining image data to be detected.
[0056] The image data to be detected is image data that needs to be detected for the target object. In one example, the video data to be detected can be pre-recorded and stored monitoring video data, for example, monitoring video data that needs to be detected for the object can be read from a video storage server or other device.
[0057] S13, performing feature extraction on each object in the image data to be detected, and obtaining feature information of each object.
[0058] Different from the prior art, the feature information of the target object is obtained from the image data, and the feature information of each object in the image data is extracted in real time, so as to obtain the feature information of each object. The object type of the object is the same as that of the target object, and the feature information of each object can be extracted from the image data by using computer vision technology. For example, the object recognition is performed on each image frame in the image data by using computer vision technology, a plurality of objects are obtained, and the feature information of each object is extracted, so as to obtain the feature information of each object. In an example, the feature information of each object is extracted in the process of object recognition of each image frame in the image data, and the extraction is not required in the subsequent process.
[0059] S14, matching the feature information of the target object with the feature information of each object to obtain a matching result.
[0060] The feature information of the target object is matched with the feature information of each object respectively, and a matching result is obtained. For example, the similarity of the feature information of the target object and the feature information of each object can be calculated respectively, and the target object and the object with a similarity greater than a preset similarity threshold are regarded as the same object, and it is considered that the matching is successful. The matching result represents each object in the image data that is matched successfully with the target object. If there is no object in the image data that is matched successfully with the target object, the matching result can be empty.
[0061] S15, according to the matching result, clearing the feature information of the object that is not matched with the target object.
[0062] For privacy protection, it is necessary to clear the feature information of the object that is not matched with the target object in the image data. The object matched with the target object in the image data can be considered as the same object as the target object, and the object can be normally stored in the case that the authorization for the target object is obtained.
[0063] S16, according to the matching result, determining a detection result of the target object.
[0064] In the present application, the object matched successfully with the target object is considered as the same object as the target object, and the historical time or the segment, image and other information of the target object appearing in the specified area can be obtained as the detection result of the target object according to the object matched successfully with the target object in the matching result.
[0065] In the embodiments of the present application, the feature information of the person is not extracted and stored in advance, but the feature information of each object is extracted from the to-be-detected image data in the object detection process, and the detection authorization for the target object is required, so that the object detection can be realized while meeting the privacy regulations.
[0066] In a possible implementation, referring to Figure 2 , the obtaining of the feature information of the target object in the case that the detection of the target object is authorized comprises:
[0067] S111, generating authorization prompt information for the target object after obtaining the detection task for the target object.
[0068] S112, obtaining image data containing the target object in the case that an authorization instruction for the authorization prompt information is obtained.
[0069] S113, performing feature extraction on the target object based on the image data containing the target object to obtain the feature information of the target object.
[0070] For example, in the scene of detecting a lost person, the target object is the lost person. After the electronic device obtains the detection task for the target object, the electronic device generates and displays the authorization prompt information for the target object, and the guardian of the target object can issue an authorization instruction according to the authorization prompt information. In the case that the electronic device obtains the authorization instruction for the authorization prompt information, the image data containing the target object is obtained, and the feature extraction is performed on the target object based on the image data containing the target object, so as to obtain the feature information of the target object.
[0071] In one example, the authorization prompt information can include a detection authorization prompt item and a feature storage authorization prompt item. The obtaining of the image data containing the target object in the case that the authorization instruction for the authorization prompt information is obtained comprises: obtaining the image data containing the target object in the case that the authorization instruction for the detection authorization prompt item is obtained.
[0072] The method further comprises: storing the feature information of the target object and the feature information of the object matched with the target object in the case that the authorization instruction for the feature storage authorization prompt item is obtained; and clearing the feature information of the target object and the feature information of the object matched with the target object after obtaining the detection result of the target object in the case that the authorization instruction for the feature storage authorization prompt item is not obtained.
[0073] The detection authorization prompt item is used to prompt authorization of detection of the target object, and the feature storage authorization prompt item is used to prompt authorization of storage of feature information of the target object. In a case where an authorization instruction for the detection authorization prompt item is acquired, the target object can be detected; and in a case where an authorization instruction for the feature storage authorization prompt item is acquired, feature information of the target object can be normally stored, thereby facilitating subsequent comparison and traceability operations and the like. If an authorization instruction for the feature storage authorization prompt item is not acquired, after a detection result of the target object is obtained, feature information of the target object and feature information of an object matching the target object in the to-be-detected image data are cleared, thereby protecting privacy of the target object.
[0074] To save computing resources in object detection, in a possible implementation, referring to Figure 3 , the acquiring the to-be-detected image data includes:
[0075] S121, acquiring monitoring video and event information of the monitoring video, where the event information indicates image data in which a preset event exists in the monitoring video.
[0076] S122, extracting, based on the event information, image data in which the preset event exists from the monitoring video to obtain to-be-detected image data.
[0077] In the process of collecting the monitoring video data, image data in the monitoring video data can be marked with event information through computer vision technology and the like. For example, for a security monitoring scene, image data in which a preset event exists can be analyzed through non-face snapshot technology, such as cross-line detection, boundary-crossing detection, moving target detection, infrared detection, human shape detection, and other intelligent analysis technologies that do not violate privacy regulations, and corresponding event information is generated and stored. For example, in the process of collecting the monitoring video data, it is detected that a preset event exists in a segment from the 65th second to the 77th second of the monitoring video data, and an event information indicating that the segment from the 65th second to the 77th second of the monitoring video data exists in a preset event can be generated.
[0078] The event information is used to indicate a segment in which a preset event exists in the monitoring video data, and a specific form of the event information can be set according to actual conditions. For example, the event information can be alarm information or log information. The preset event is an event that needs to be detected in an actual application scenario. For example, for a detection scene of a pedestrian running a red light, the preset event can be a pedestrian running a red light event; and for a detection scene of an access passage, the preset event can be a moving target.
[0079] In the embodiments of the present application, the image data to be detected is image data in which a preset event exists in the monitoring video data, and feature extraction is performed on each object in the image data to be detected, without performing feature extraction on objects in the entire monitoring video data, so that the computing resources for object detection can be saved, and the speed of object detection can be increased.
[0080] The image data in which the preset event exists can be in the form of a video segment. In a possible implementation, the event information includes an event type of the preset event and associated segment information, where, for any event information, the associated segment information of the event information indicates a segment in which the preset event corresponding to the event information exists in the monitoring video.
[0081] Referring to Figure 4 The image data in which the preset event exists is extracted from the monitoring video based on the event information, to obtain image data to be detected, including:
[0082] In S1221, a segment in which a preset event of a specified event type exists is extracted from the monitoring video based on the associated segment information in the event information, to obtain image data to be detected.
[0083] For some monitoring scenes, multiple event types can exist, and therefore the event type that needs to be detected for a target object can be obtained, to obtain a specified event type. The segment in which the preset event of the specified event type exists is extracted from the monitoring video based on the event information, to obtain image data to be detected. For example, for monitoring video data of traffic conditions, there can be preset events of two event types, a vehicle running a red light event and a person running a red light event. When the target object is a person, only the person running a red light event needs to be detected, and therefore the segment in which the person running a red light event exists can be extracted from the monitoring video data based on the event information, as image data to be detected. In an example, the event information further includes local time when the preset event occurs, so that it is convenient for tracing, evidence collection, and analysis.
[0084] In an example, to facilitate management of the segments and the event information, each segment can be set to a preset time length, for example, 10 seconds. When the time length of the segment in which the preset event occurs is greater than the preset time length, the segment can be segmented. When the time length of the segment in which the preset event occurs is less than the preset time length, the time length can be supplemented to the preset time length by using video data before and after the segment.
[0085] In the embodiments of the present application, the image data to be detected is a segment in which a preset event of a specified event type exists in the monitoring video, and feature extraction is performed on each object in the image data to be detected, so that the computing resources for object detection can be further saved, and the speed of object detection can be further increased.
[0086] The event information of the monitoring video can be generated in advance. In one possible implementation, referring to Figure 4 The method further includes:
[0087] S41, performing event detection on the collected monitoring video to determine each segment in which a preset event exists and an event type of the preset event in each segment.
[0088] S42, generating event information of each segment according to each segment and the event type of the preset event in each segment.
[0089] The event detection and the generation of the event information can be performed by the same electronic device, for example, can be performed by a video storage server. The event detection and the generation of the event information can also be performed by different electronic devices, for example, the event detection can be performed by an intelligent camera and the generation of the event information can be performed by a hard disk recorder. The specific manner of the event detection can refer to related event detection technologies, which is not limited here.
[0090] To filter the segments that do not meet the requirements, in one possible implementation, referring to Figure 5 After the event detection on the collected monitoring video to determine each segment in which a preset event exists and an event type of the preset event in each segment, the method further includes:
[0091] S51, filtering each segment according to a preset filtering rule to obtain a filtered segment.
[0092] The preset filtering rule is used to filter the segments. The specific content of the preset filtering rule can be set according to actual conditions, for example, authorized internal personnel can be set, a face of a person in a segment is compared with faces of the internal personnel, if the person in the segment is an internal personnel, the segment needs to be filtered, and if the person in the segment is not an internal personnel, the segment is taken as a filtered segment. For example, in a scenario of monitoring a person, animal recognition deduplication or leaf deduplication can be deployed, so as to filter out segments of non-human targets.
[0093] The generation of the event information of each segment according to each segment and the event type of the preset event in each segment includes:
[0094] S421, generating event information of the filtered segment according to the filtered segment and the event type of the preset event in the filtered segment.
[0095] In the embodiments of the present application, the filtered segments obtained by using the preset filtering rules can reduce useless segments, thereby reducing useless event information, improving the quality of event information, and ultimately saving computing resources during object detection and increasing the speed of object detection.
[0096] The image data of the preset event can also be in the form of image frames. In a possible implementation, the event information includes an event type of the preset event and image frame information, and for any event information, the image frame information of the event information indicates one or more image frames of the preset event of the event information in the image data to be detected.
[0097] Referring to Figure 6 , the method further includes:
[0098] S1222, based on the image frame information in the event information, extracting image frames of the preset event of the specified event type from the monitoring video to obtain the image data to be detected.
[0099] To further save computing resources during object detection, the segments in the above embodiments can be replaced by one or more image frames. The event information includes image frame information of the preset event, and for any event information, the image frame information of the event information indicates one or more image frames of the preset event of the event information in the monitoring video; for example, the event type of the preset event of the event information is the person subway leaning against the door event, and the person subway leaning against the door event exists in the 1000th image frame to the 1500th image frame in the monitoring video, and the image frame information of the event information indicates one or more image frames in the 1000th image frame to the 1500th image frame. In one example, the event information further includes the local time when the preset event occurs, thereby facilitating tracing, evidence collection and analysis.
[0100] In the embodiments of the present application, the image data to be detected is the image frame of the preset event of the specified event type in the image data to be detected, and the features of each object in the image data to be detected are extracted. Compared with detecting the segments or the entire image data to be detected, the computing resources during object detection can be further saved, and the speed of object detection can be increased.
[0101] The event information of the monitoring video can be generated in advance. In a possible implementation, referring to Figure 6 , the method further includes:
[0102] S61, performing event detection on the collected monitoring video to determine each segment of the preset event and the event type of the preset event in each segment.
[0103] S62, for each segment, selecting one or more image frames from the segment.
[0104] The selection of the image frames can be customized according to actual conditions, for example, key frames in the segment can be selected, for example, the middle several frames in the segment can be selected, for example, the first several frames, the middle several frames and the last several frames in the segment can be selected, and the like, which are all within the protection scope of the present application.
[0105] S63, for each segment, generating event information of the selected image frames from the segment according to the selected image frames from the segment and the event type of the preset event in the segment.
[0106] For example, the selected image frame A is in the monitoring video, and the event type of the preset event in the segment is type 1, and then the generated event information includes type 1 and image frame information representing the image frame A.
[0107] In a possible implementation, referring to Figure 7 After the event detection on the collected monitoring video, the determination of the segments in which the preset event exists and the event type of the preset event in each segment, the method further includes:
[0108] S71, filtering each segment according to a preset filtering rule to obtain filtered segments.
[0109] The selecting one or more image frames from the segment for each segment includes:
[0110] S621, for each filtered segment, selecting one or more image frames from the filtered segment.
[0111] The generating event information of the selected image frames from the segment for each segment according to the selected image frames from the segment and the event type of the preset event in the segment includes:
[0112] S631, for each filtered segment, generating event information of the selected image frames from the filtered segment according to the selected image frames from the filtered segment and the event type of the preset event in the filtered segment.
[0113] In the embodiments of the present application, the filtered segments obtained by using the preset filtering rule can reduce useless segments, thereby reducing useless event information, improving the quality of the event information, and ultimately saving the computing resources in object detection and increasing the speed of object detection.
[0114] The preset filtering rule can be customized according to actual conditions, for example, filtering can be performed according to a triggered object. In a possible implementation, referring toFigure 8 filtering each of the segments according to a preset filtering rule to obtain filtered segments, comprising:
[0115] S81, for each segment, determining a type of a trigger object triggering the preset event in the segment to obtain a trigger object type of the segment.
[0116] An object triggering the preset event in a segment is referred to as a trigger object. For example, for a monitoring scene of a person running a red light, the person running the red light is a trigger object, and a person not running the red light is not a trigger object.
[0117] S82, if the trigger object type of the segment does not include a target object type, filtering out the segment, and if the trigger object type of the segment includes the target object type, determining that the segment is a filtered segment, wherein the target object type is an object type corresponding to the preset event of the segment and needing to be detected.
[0118] For example, for a detection scene of a pedestrian running a red light, the pedestrian running the red light needs to be detected, and therefore the target object type can be a person. For a detection scene of an electric vehicle in an elevator, the electric vehicle entering the elevator needs to be detected, and therefore the target object type can be an electric vehicle.
[0119] If the trigger object type of all trigger objects in a segment is not the target object type, it is indicated that the segment does not need subsequent detection, and therefore the segment can be filtered out. If the trigger object type of at least one trigger object in a segment is the target object type, it is indicated that the segment needs subsequent detection, and therefore the segment is determined as a filtered segment.
[0120] In the embodiments of the present application, filtering of a segment is performed according to the trigger object type of a trigger object, which can reduce useless segments, thereby reducing useless event information, improving the quality of event information, and ultimately saving computing resources for object detection and increasing the speed of object detection.
[0121] In addition, filtering of a segment can also be performed according to a white list library. In a possible implementation, the filtering each of the segments according to a preset filtering rule to obtain filtered segments, comprising: for each segment, if the segment only contains a white list object in a preset white list library, filtering out the segment; and if the segment contains other objects in addition to the white list object, determining that the segment is a filtered segment.
[0122] In some monitoring scenarios, for example, for the bank vault, the control area of the factory, etc., the object detection needs to be performed on the external personnel, and the object detection does not need to be performed on the internal personnel with the authority. For example, for the emergency lane of the highway, the object detection needs to be performed on the private vehicles, trucks, etc., and the object detection does not need to be performed on the police cars and ambulances. For these types of monitoring scenarios, a whitelist library, i.e., a preset whitelist library, can be pre-set, and the feature information of the whitelist object which does not need to be detected is stored in the preset whitelist library. The whitelist object in the whitelist library is an object which does not need to be checked. For example, in the scene of detecting the pedestrian running the red light, the whitelist object can be the traffic police; for example, in the scene of detecting the security of the shopping mall, the whitelist object can be the internal personnel of the shopping mall, etc. The feature information of each whitelist object is pre-stored in the preset whitelist library, and the feature information of each object in the segment can be matched with the feature information of the whitelist object, so as to determine whether the segment only contains the whitelist object.
[0123] In a possible implementation, for each segment, if the segment only contains the whitelist object in the preset whitelist library, the segment is filtered out; if the segment contains other objects in addition to the whitelist object, the segment is determined as the filtered segment, including:
[0124] Step one, for each segment, the feature information of each object in the segment is matched with the feature information of each whitelist object in the preset whitelist library, wherein the feature information of each whitelist object which has been pre-matched and authorized is stored in the preset whitelist library.
[0125] Step two, if the feature information of each object in the segment is successfully matched with the feature information of the whitelist object in the preset whitelist library, the segment is filtered out.
[0126] Step three, if the feature information of at least one object in the segment is not successfully matched with the feature information of the whitelist object in the preset whitelist library, the segment is determined as the filtered segment.
[0127] For example, taking the vault monitoring scenario as an example, the preset whitelist library pre-stores the face features (feature information) of each internal staff (whitelist object). For each segment of the monitoring video of the vault monitoring scenario, the face features of each object in the segment are matched with the face features in the preset whitelist library, so as to determine whether each object is an internal staff. If the face features of each person in a segment are all successfully matched with the face features of the internal staff in the preset whitelist library, it is indicated that all the persons in the segment are internal staff, and therefore the segment is filtered out. If the face features of at least one person in a segment are all not matched with the face features of each internal staff in the preset whitelist library, it is indicated that the segment includes persons other than internal staff, and the segment needs to be retained, and therefore the segment is determined as a filtered segment.
[0128] In the embodiment of the present application, the segment including only the whitelist object is filtered out based on the whitelist library, which can reduce useless segments, thereby reducing useless event information, improving the quality of event information, and ultimately saving the computing resources in object detection and increasing the speed of object detection.
[0129] The embodiment of the present application provides an object detection device, and the device comprises:
[0130] a feature information acquisition module configured to acquire feature information of a target object if the detection of the target object is authorized;
[0131] an image data acquisition module configured to acquire image data to be detected;
[0132] a feature information extraction module configured to extract features of each object in the image data to be detected, to obtain feature information of each object;
[0133] a feature information matching module configured to match the feature information of the target object with the feature information of each object, to obtain a matching result;
[0134] a feature information clearing module configured to clear the feature information of an object that is not matched with the target object according to the matching result;
[0135] a detection result determination module configured to determine a detection result of the target object according to the matching result.
[0136] In a possible implementation, the feature information acquisition module comprises:
[0137] an authorization prompt information generation submodule configured to generate authorization prompt information for the target object after acquiring a detection task for the target object;
[0138] The authorization instruction obtaining submodule is configured to obtain image data containing the target object when an authorization instruction for the authorization prompt information is obtained.
[0139] The feature information obtaining submodule is configured to perform feature extraction on the target object based on the image data containing the target object, to obtain feature information of the target object.
[0140] In a possible implementation, the authorization prompt information includes a detection authorization prompt item and a feature storage authorization prompt item.
[0141] The authorization instruction obtaining submodule is specifically configured to obtain image data containing the target object when an authorization instruction for the detection authorization prompt item is obtained.
[0142] The device further includes:
[0143] The feature information storage submodule is configured to store the feature information of the target object and the feature information of the object matched with the target object when an authorization instruction for the feature storage authorization prompt item is obtained.
[0144] The feature information clearing submodule is configured to clear the feature information of the target object and the feature information of the object matched with the target object after obtaining the detection result of the target object when an authorization instruction for the feature storage authorization prompt item is not obtained.
[0145] In a possible implementation, the image data obtaining module includes:
[0146] The event information obtaining submodule is configured to obtain a monitoring video and event information of the monitoring video, where the event information indicates image data in which a preset event exists in the monitoring video.
[0147] The image data extracting submodule is configured to extract image data in which a preset event exists from the monitoring video based on the event information, to obtain to-be-detected image data.
[0148] In a possible implementation, the event information includes an event type of a preset event and associated segment information, where, for any event information, the associated segment information of the event information indicates a segment in which the preset event corresponding to the event information exists in the monitoring video.
[0149] The image data extracting submodule is specifically configured to extract a segment in which a preset event of a specified event type exists from the monitoring video based on the associated segment information in the event information, to obtain to-be-detected image data.
[0150] In a possible implementation, the apparatus further includes:
[0151] a first preset event detection module, configured to perform event detection on the collected monitoring video, to determine each segment in which a preset event exists and an event type of the preset event in each segment;
[0152] a first event information generation module, configured to generate event information of each segment according to each segment and the event type of the preset event in each segment.
[0153] In a possible implementation, the event information includes an event type of a preset event and image frame information, where, for any event information, the image frame information of the event information indicates one or more image frames in which the preset event of the event information exists in the image data to be detected;
[0154] the image data extraction submodule is specifically configured to extract, based on the image frame information in the event information, image frames in which a preset event of a specified event type exists from the monitoring video, to obtain the image data to be detected.
[0155] In a possible implementation, the apparatus further includes:
[0156] a second preset event detection module, configured to perform event detection on the collected monitoring video, to determine each segment in which a preset event exists and an event type of the preset event in each segment;
[0157] an image frame selection module, configured to select one or more image frames from each segment;
[0158] a second event information generation module, configured to generate, for each segment, event information of the selected image frame from the segment according to the selected image frame from the segment and the event type of the preset event in the segment.
[0159] In a possible implementation, the apparatus further includes:
[0160] a segment filtering module, configured to filter each segment according to a preset filtering rule to obtain filtered segments;
[0161] the first event information generation module is specifically configured to generate event information of the filtered segments according to the filtered segments and the event type of the preset event in the filtered segments; or
[0162] The second event information generation module is specifically configured to: for each filtered segment, select one or more image frames from the filtered segment; and for each filtered segment, generate event information of the selected image frames from the filtered segment according to the selected image frames from the filtered segment and an event type of the preset event in the filtered segment.
[0163] In a possible implementation, the segment filtering module is specifically configured to: for each segment, determine a type of a triggering object triggering the preset event in the segment to obtain a triggering object type of the segment; if the triggering object type of the segment does not include a target object type, filter out the segment; and if the triggering object type of the segment includes the target object type, determine that the segment is a filtered segment, where the target object type is an object type that needs to be detected and corresponds to the preset event of the segment.
[0164] In a possible implementation, the segment filtering module is specifically configured to: for each segment, if the segment only includes a white list object in a preset white list library, filter out the segment; and if the segment includes an object other than the white list object, determine that the segment is a filtered segment.
[0165] In a possible implementation, the segment filtering module is specifically configured to: for each segment, match feature information of each object in the segment with feature information of each white list object in a preset white list library, where the preset white list library stores feature information of each white list object that has been matched and authorized in advance; if the feature information of each object in the segment is successfully matched with the feature information of the white list object in the preset white list library, filter out the segment; and if feature information of at least one object in the segment is not successfully matched with the feature information of the white list object in the preset white list library, determine that the segment is a filtered segment.
[0166] The embodiments of the present application further provide an electronic device, comprising: a processor and a memory.
[0167] The memory is used to store a computer program.
[0168] The processor is used to execute the computer program stored in the memory, so as to implement the object detection method in the present application.
[0169] Optionally, referring to Figure 9 The electronic device provided by the embodiments of the present application further comprises a communication interface 902 and a communication bus 904, where the processor 901, the communication interface 902 and the memory 903 complete mutual communication through the communication bus 904.
[0170] The communication bus mentioned in the above electronic device can be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or only one type of bus.
[0171] The communication interface is used for communication between the above electronic device and other devices.
[0172] The memory can include a RAM (Random Access Memory) and can also include a NVM (Non-Volatile Memory), such as at least one disk memory. Optionally, the memory can also be at least one storage device located away from the above-mentioned processor.
[0173] The above-mentioned processor can be a general-purpose processor, including a CPU (Central Processing Unit), an NP (Network Processor), etc.; can also be a DSP (Digital Signal Processing), an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.
[0174] The embodiment of the present application also provides a computer readable storage medium, and the computer readable storage medium stores a computer program. The computer program is executed by a processor to implement the object detection method described in any one of the embodiments of the present application.
[0175] In another embodiment provided by the present application, a computer program product containing instructions is also provided, which, when running on a computer, causes the computer to execute the object detection method described in any one of the embodiments of the present application.
[0176] In the above embodiments, all or part can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed by a computer, all or part generates the processes or functions described in the embodiments of the present application. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be transferred from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) mode. The computer readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available media can be magnetic media (for example, floppy disk, hard disk, magnetic tape), optical media (for example, DVD), or semiconductor media (for example, solid state disk (SSD)) and the like.
[0177] In the technical solutions of the present application, the collection, storage, use, processing, transmission, provision and disclosure of user personal information comply with relevant laws and regulations and do not violate public order and good customs.
[0178] It should be noted that in this paper, the technical features in each optional scheme can be combined to form a scheme as long as they are not contradictory, and these schemes are within the scope disclosed in the present application. Relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Moreover, the term "includes", "contains" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the sentence "includes a" does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0179] Each of the embodiments in the specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other. Each of the embodiments focuses on the difference from other embodiments. In particular, for the embodiments of the device, the electronic device, the computer program product, and the storage medium, since they are basically similar to the method embodiments, the description is relatively simple, and the related parts can be referred to the part of the method embodiments.
[0180] The above only describes the preferred embodiments of the present application, and is not used to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. An object detection method, characterized in that, The method includes: If authorization is obtained for the detection of the target object, the feature information of the target object is acquired; Acquire surveillance video and event information of the surveillance video, wherein the event information is used to indicate that a preset event exists in the surveillance video; based on the event information, extract image data containing the preset event from the surveillance video to obtain image data to be detected; the image data to be detected includes: video segments containing preset events of a specified event type, and / or image frames containing preset events of a specified event type; Feature extraction is performed on each object in the image data to be detected to obtain the feature information of each object; The feature information of the target object is matched with the feature information of each of the objects to obtain a matching result; Based on the matching results, remove the feature information of objects that do not match the target object; Based on the matching results, the detection results of the target object are determined; the detection results include the historical time of the target object's appearance in the specified area and video clips.
2. The method according to claim 1, characterized in that, When authorization is obtained for the detection of the target object, the step of acquiring the feature information of the target object includes: After obtaining the detection task for the target object, an authorization prompt message for the target object is generated; Upon receiving an authorization instruction in response to the authorization prompt information, image data containing the target object is acquired; Feature extraction is performed on the target object based on image data containing the target object to obtain the feature information of the target object.
3. The method according to claim 2, characterized in that, The authorization prompt information includes detection authorization prompt items and feature storage authorization prompt items; Upon receiving an authorization instruction for the authorization prompt information, acquiring image data containing the target object includes: Upon receiving an authorization instruction for the detection authorization prompt item, acquire image data containing the target object; The method further includes: Upon receiving an authorization instruction for the feature storage authorization prompt item, the feature information of the target object and the feature information of the object matching the target object are stored; If no authorization instruction is obtained for the feature storage authorization prompt item, after obtaining the detection result of the target object, the feature information of the target object and the feature information of the object matching the target object are cleared.
4. The method according to claim 1, characterized in that, The event information includes the event type and associated segment information of a preset event. For any event information, the associated segment information indicates that there is a segment of the preset event corresponding to the event information in the surveillance video. The step of extracting image data containing a preset event from the surveillance video based on the event information to obtain the image data to be detected includes: Based on the associated segment information in the event information, segments containing preset events of a specified event type are extracted from the surveillance video to obtain the image data to be detected.
5. The method according to claim 4, characterized in that, The method further includes: Event detection is performed on the collected surveillance video to determine the segments containing preset events and the event types of the preset events in each segment; Event information for each segment is generated based on the event type of each segment and the preset events in each segment.
6. The method according to claim 1, characterized in that, The event information includes the event type and image frame information of a preset event. For any event information, the image frame information of the event information represents one or more image frames in the image data to be detected that contain the preset event of the event information. The step of extracting image data containing a preset event from the surveillance video based on the event information to obtain the image data to be detected includes: Based on the image frame information in the event information, image frames containing a preset event of a specified event type are extracted from the monitoring video to obtain the image data to be detected.
7. The method according to claim 6, characterized in that, The method further includes: Event detection is performed on the collected surveillance video to determine the segments containing preset events and the event types of the preset events in each segment; For each segment, select one or more image frames from that segment; For each segment, event information of the selected image frame is generated based on the image frame selected from the segment and the event type of the preset event in the segment.
8. The method according to claim 5 or 7, characterized in that, After performing event detection on the collected surveillance video to determine each segment containing a preset event and the event type of the preset event in each segment, the method further includes: According to the preset filtering rules, each of the segments is filtered to obtain the filtered segments; The step of generating event information for each segment based on the event types of preset events in each segment includes: generating event information for the filtered segments based on the filtered segments and the event types of preset events in the filtered segments; or For each segment, one or more image frames are selected from the segment; for each segment, event information of the selected image frames is generated based on the selected image frames and the event types of preset events in the segment, including: for each filtered segment, one or more image frames are selected from the filtered segment; for each filtered segment, event information of the selected image frames is generated based on the selected image frames and the event types of preset events in the filtered segment.
9. The method according to claim 8, characterized in that, The step of filtering each segment according to a preset filtering rule to obtain filtered segments includes: For each segment, determine the type of the triggering object that triggers the preset event in that segment, and obtain the triggering object type of that segment; If the triggering object type of the fragment does not include the target object type, the fragment is filtered out. If the triggering object type of the fragment includes the target object type, the fragment is determined to be a filtered fragment. The target object type is the object type that needs to be detected corresponding to the preset event of the fragment.
10. The method according to claim 8, characterized in that, The step of filtering each segment according to a preset filtering rule to obtain filtered segments includes: For each segment, if the segment contains only whitelisted objects from the preset whitelist library, the segment is filtered out; if the segment contains other objects besides the whitelisted objects, the segment is determined to be a filtered segment.
11. The method according to claim 10, characterized in that, For each segment, if the segment contains only whitelisted objects from a preset whitelist library, the segment is filtered out; if the segment contains objects other than those in the whitelist, the segment is determined to be a filtered segment, including: For each segment, the feature information of each object in the segment is matched with the feature information of each whitelist object in the preset whitelist library, wherein the preset whitelist library stores the feature information of each whitelist object that has been pre-authorized for matching. If the feature information of each object in the segment matches the feature information of the whitelist objects in the preset whitelist library, then the segment is filtered out. If the feature information of at least one object in the segment does not match the feature information of whitelisted objects in the preset whitelist library, then the segment is determined to be a filtered segment.
12. An object detection device, characterized in that, The device includes: The feature information acquisition module is used to acquire the feature information of the target object when authorization is obtained for the detection of the target object; The image data acquisition module includes: an event information acquisition submodule, used to acquire surveillance video and event information of the surveillance video, wherein the event information is used to indicate that a preset event exists in the surveillance video; and an image data extraction submodule, used to extract image data containing the preset event from the surveillance video based on the event information to obtain image data to be detected; the image data to be detected includes: a video segment containing a preset event of a specified event type, and / or an image frame containing a preset event of a specified event type. The feature information extraction module is used to extract features from each object in the image data to be detected, and obtain the feature information of each object. The feature information matching module is used to match the feature information of the target object with the feature information of each of the objects to obtain a matching result; The feature information removal module is used to remove feature information of objects that do not match the target object based on the matching result; The detection result determination module is used to determine the detection result of the target object based on the matching result; the detection result includes the historical time of the target object's appearance in the specified area and video clips.
13. The apparatus according to claim 12, characterized in that, The feature information acquisition module includes: The authorization prompt information generation submodule is used to generate authorization prompt information for the target object after obtaining a detection task for the target object; The authorization instruction acquisition submodule is used to acquire image data containing the target object when an authorization instruction for the authorization prompt information is obtained; The feature information acquisition submodule is used to extract features of the target object based on image data containing the target object, and obtain the feature information of the target object; The authorization prompt information includes detection authorization prompt items and feature storage authorization prompt items; the authorization instruction acquisition submodule is specifically used to: acquire image data containing the target object when an authorization instruction for the detection authorization prompt item is acquired; The device further includes: The feature information storage submodule is used to store the feature information of the target object and the feature information of the object matching the target object when an authorization instruction for the feature storage authorization prompt item is obtained; The feature information clearing submodule is used to clear the feature information of the target object and the feature information of objects matching the target object after obtaining the detection result of the target object, in the absence of an authorization instruction for the feature storage authorization prompt item; The event information includes the event type of a preset event and associated segment information, wherein, for any event information, the associated segment information indicates that there is a segment in the surveillance video containing the preset event corresponding to that event information; the image data extraction submodule is specifically used to: extract segments containing preset events of a specified event type from the surveillance video based on the associated segment information in the event information, to obtain image data to be detected; the device further includes: a first preset event detection module, used to perform event detection on the acquired surveillance video, determine each segment containing the preset event and the event type of the preset event in each segment; a first event information generation module, used to generate event information for each segment according to each segment and the event type of the preset event in each segment; or The event information includes the event type of a preset event and image frame information. For any event information, the image frame information represents one or more image frames in the image data to be detected that contain the preset event of that event information. The image data extraction submodule is specifically used to: extract image frames containing a preset event of a specified event type from the surveillance video based on the image frame information in the event information, thereby obtaining the image data to be detected. The device further includes: a second preset event detection module, used to perform event detection on the acquired surveillance video to determine each segment containing the preset event and the event type of the preset event in each segment; an image frame selection module, used to select one or more image frames from each segment; and a second event information generation module, used to generate event information for each segment based on the image frames selected from the segment and the event type of the preset event in the segment. The device further includes: The segment filtering module is used to filter each segment according to a preset filtering rule to obtain filtered segments; The first event information generation module is specifically used to: generate event information for the filtered segment based on the filtered segment and the event type of a preset event in the filtered segment; or the second event information generation module is specifically used to: select one or more image frames from each filtered segment; and generate event information for each filtered segment based on the image frame selected from the filtered segment and the event type of a preset event in the filtered segment. The segment filtering module is specifically used for: for each segment, determining the type of the triggering object that triggers the preset event in the segment, thus obtaining the triggering object type of the segment; if the triggering object type of the segment does not include the target object type, then the segment is filtered out; if the triggering object type of the segment includes the target object type, then the segment is determined to be a filtered segment, wherein the target object type is the object type to be detected corresponding to the preset event of the segment; or The segment filtering module is specifically used to: for each segment, if the segment only contains whitelist objects from the preset whitelist library, then filter out the segment; if the segment contains other objects besides the whitelist objects, then determine that the segment is a filtered segment. The segment filtering module is specifically used to: for each segment, match the feature information of each object in the segment with the feature information of each whitelisted object in a preset whitelist library, wherein the preset whitelist library stores the feature information of each whitelisted object that has been pre-authorized for matching; if the feature information of each object in the segment successfully matches the feature information of the whitelisted objects in the preset whitelist library, then the segment is filtered out; if the feature information of at least one object in the segment fails to match the feature information of the whitelisted objects in the preset whitelist library, then the segment is determined to be a filtered segment.
14. An electronic device, characterized in that, Including processor and memory; The memory is used to store computer programs; When the processor executes the program stored in the memory, it implements the object detection method according to any one of claims 1-11.
15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the object detection method according to any one of claims 1-11.
16. A computer program product containing instructions, characterized in that, When it is run on a computer, it causes the computer to perform the object detection method according to any one of claims 1-11.
Citation Information
Patent Citations
Video annotation method, device and equipment and storage medium
CN112507860A
Monitoring method and device
CN112689120A
Event prompting method and device, computer equipment and storage medium
CN113096808A