WO2022062396A1 - 图像处理方法及装置、电子设备及存储介质 - Google Patents

图像处理方法及装置、电子设备及存储介质 Download PDF

Info

Publication number
WO2022062396A1
WO2022062396A1 PCT/CN2021/090305 CN2021090305W WO2022062396A1 WO 2022062396 A1 WO2022062396 A1 WO 2022062396A1 CN 2021090305 W CN2021090305 W CN 2021090305W WO 2022062396 A1 WO2022062396 A1 WO 2022062396A1
Authority
WO
WIPO (PCT)
Prior art keywords
attribute
image
event
monitored
processed
Prior art date
Application number
PCT/CN2021/090305
Other languages
English (en)
French (fr)
Inventor
黄潇莹
李蔚琳
曹安
Original Assignee
深圳市商汤科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市商汤科技有限公司 filed Critical 深圳市商汤科技有限公司
Publication of WO2022062396A1 publication Critical patent/WO2022062396A1/zh
Priority to US17/874,477 priority Critical patent/US20220366697A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/52Surveillance or monitoring of activities, e.g. for recognising suspicious objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/62Extraction of image or video features relating to a temporal dimension, e.g. time-based feature extraction; Pattern tracking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/751Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/44Event detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/52Surveillance or monitoring of activities, e.g. for recognising suspicious objects
    • G06V20/53Recognition of crowd images, e.g. recognition of crowd congestion
    • GPHYSICS
    • G08SIGNALLING
    • G08BSIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
    • G08B13/00Burglar, theft or intruder alarms
    • G08B13/18Actuation by interference with heat, light, or radiation of shorter wavelength; Actuation by intruding sources of heat, light, or radiation of shorter wavelength
    • G08B13/189Actuation by interference with heat, light, or radiation of shorter wavelength; Actuation by intruding sources of heat, light, or radiation of shorter wavelength using passive radiation detection systems
    • G08B13/194Actuation by interference with heat, light, or radiation of shorter wavelength; Actuation by intruding sources of heat, light, or radiation of shorter wavelength using passive radiation detection systems using image scanning and comparing systems
    • G08B13/196Actuation by interference with heat, light, or radiation of shorter wavelength; Actuation by intruding sources of heat, light, or radiation of shorter wavelength using passive radiation detection systems using image scanning and comparing systems using television cameras
    • G08B13/19602Image analysis to detect motion of the intruder, e.g. by frame subtraction
    • G08B13/19613Recognition of a predetermined image pattern or behaviour pattern indicating theft or intrusion
    • GPHYSICS
    • G08SIGNALLING
    • G08BSIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
    • G08B21/00Alarms responsive to a single specified undesired or abnormal condition and not otherwise provided for
    • G08B21/18Status alarms
    • GPHYSICS
    • G08SIGNALLING
    • G08BSIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
    • G08B29/00Checking or monitoring of signalling or alarm systems; Prevention or correction of operating errors, e.g. preventing unauthorised operation
    • G08B29/18Prevention or correction of operating errors
    • G08B29/185Signal analysis techniques for reducing or preventing false alarms or for enhancing the reliability of the system
    • G08B29/186Fuzzy logic; neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30232Surveillance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/08Detecting or categorising vehicles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands

Definitions

  • the present application relates to the field of computer vision technology, and in particular, to an image processing method and apparatus, an electronic device, and a storage medium.
  • the present application provides an image processing method and device, an electronic device and a storage medium.
  • an image processing method comprising:
  • the target monitoring result of the event to be monitored is obtained according to the intermediate detection result, the at least one attribute and the at least one attribute filter condition of the event to be monitored.
  • the target monitoring result of the to-be-monitored event is obtained according to the intermediate detection result of the to-be-monitored event, the at least one attribute, and the at least one attribute filter condition of the to-be-monitored event, include:
  • the intermediate detection result is that the to-be-monitored event exists in the at least one image to be processed, and the at least one attribute complies with the at least one attribute filter condition, determine that the target monitoring result is the The event to be monitored has occurred;
  • the intermediate detection result is that the to-be-monitored event exists in the at least one image to be processed, and the at least one attribute does not meet the at least one attribute filtering condition, determine that the target monitoring result is the target monitoring result.
  • the said event to be monitored has not occurred.
  • the at least one attribute of the to-be-monitored event is obtained by performing event attribute extraction processing on the at least one image to be processed, including:
  • the intermediate detection result is that the event to be monitored exists in the at least one image to be processed
  • the to-be-monitored event includes illegal intrusion;
  • the at least one image to be processed includes a first image;
  • the first image includes an illegal intrusion area;
  • the performing event detection processing on the at least one image to be processed to obtain an intermediate detection result including:
  • the monitored object includes at least one of the following: a person, a non-motor vehicle ;
  • the at least one image to be processed includes a second image;
  • the at least one attribute filter condition includes a whitelist feature database;
  • the at least one attribute includes an identity feature of the monitored object;
  • the at least one attribute of the to-be-monitored event is obtained by performing event attribute extraction processing on the at least one image to be processed, including:
  • the at least one attribute conforms to the at least one attribute filtering condition, including: no feature data matching the identity feature data exists in the whitelist feature database;
  • the fact that the at least one attribute does not meet the at least one attribute filtering condition includes that feature data matching the identity feature data exists in the whitelist feature database.
  • the at least one attribute filter condition further includes a size range; the at least one attribute further includes the size of the monitored object;
  • the performing event attribute extraction processing on the at least one to-be-processed image to obtain at least one attribute of the to-be-monitored event further includes:
  • the at least one attribute complies with the at least one attribute filtering condition, including: there is no feature data matching the identity feature in the whitelist feature database, and the size of the monitored object is within the size range;
  • the at least one attribute does not meet the at least one attribute filtering condition, including: there is no feature data matching the identity feature in the whitelist feature database, and/or the size of the monitored object is in the out of size range.
  • the at least one image to be processed includes a third image and a fourth image, and the timestamp of the third image is earlier than the timestamp of the fourth image; the at least one attribute filtering The condition includes a duration threshold; the at least one attribute includes the duration of the event to be monitored;
  • the at least one attribute of the to-be-monitored event is obtained by performing event attribute extraction processing on the at least one image to be processed, including:
  • the time stamp of the third image is used as the start time of the event to be monitored, and the time stamp of the fourth image is used as the end time of the event to be monitored to obtain the duration;
  • the at least one attribute conforms to the at least one attribute filtering condition, including: the duration exceeds the duration threshold;
  • the at least one attribute does not meet the at least one attribute filtering condition, including: the duration does not exceed the duration threshold.
  • the to-be-monitored event includes illegal parking;
  • the at least one attribute filter condition further includes an illegal parking area;
  • the at least one attribute includes the position of the monitored vehicle;
  • the third image and the the fourth images all contain the monitored vehicle;
  • the described at least one image to be processed is subjected to event attribute extraction processing to obtain at least one attribute of the to-be-monitored event, including:
  • the at least one attribute conforms to the at least one attribute filter condition, including: the duration exceeds the duration threshold, and both the first position and the second position are located within the illegal parking area;
  • the at least one attribute does not meet the at least one attribute filter condition includes at least one of the following situations: the duration does not exceed the duration threshold, the first location is outside the illegal parking area, the second location outside the illegal parking area.
  • the at least one image to be processed includes a fifth image;
  • the at least one attribute filter condition includes a confidence threshold;
  • the at least one attribute of the to-be-monitored event is obtained by performing event attribute extraction processing on the at least one image to be processed, including:
  • the at least one attribute complies with the at least one attribute filtering condition, including: the confidence level of the monitored object exceeds the confidence level threshold;
  • the at least one attribute does not meet the at least one attribute filtering condition, including: the confidence level of the monitored object does not exceed the confidence level threshold.
  • the at least one attribute filter condition includes an alarm time period
  • the at least one attribute of the to-be-monitored event is obtained by performing event attribute extraction processing on the at least one image to be processed, including:
  • the sixth image is the image with the latest time stamp in the at least one image to be processed
  • the at least one attribute conforms to the at least one attribute filtering condition, including: the occurrence time of the to-be-monitored event is outside the alarm time period;
  • the at least one attribute does not meet the at least one attribute filtering condition includes: the occurrence time of the to-be-monitored event is within the alarm time period.
  • the method further includes:
  • the at least one attribute of the to-be-monitored event is obtained by performing event attribute extraction processing on the at least one image to be processed, including:
  • the first attribute is the attribute with the highest priority in the priority order;
  • a second attribute extraction process is performed on the at least one image to be processed to obtain the second attribute of the to-be-monitored event;
  • the second attribute is the attribute with the second highest priority in the priority order;
  • the event attribute extraction processing for the at least one image to be processed is stopped.
  • the method further includes:
  • alarm information is output.
  • an image processing apparatus comprising:
  • an acquisition unit configured to acquire at least one image to be processed and at least one attribute filter condition of the event to be monitored
  • an event detection unit configured to perform event detection processing on the at least one image to be processed to obtain an intermediate detection result of the event to be monitored
  • an attribute extraction unit configured to perform event attribute extraction processing on the at least one image to be processed to obtain at least one attribute of the to-be-monitored event
  • a processing unit configured to obtain a target monitoring result of the event to be monitored according to the intermediate detection result, the at least one attribute and the at least one attribute filtering condition of the event to be monitored.
  • the processing unit is configured as:
  • the intermediate detection result is that the to-be-monitored event exists in the at least one image to be processed, and the at least one attribute complies with the at least one attribute filter condition, determine that the target monitoring result is the The event to be monitored has occurred;
  • the intermediate detection result is that the to-be-monitored event exists in the at least one image to be processed, and the at least one attribute does not meet the at least one attribute filtering condition, determine that the target monitoring result is the target monitoring result.
  • the said event to be monitored has not occurred.
  • the attribute extraction unit is configured as:
  • the intermediate detection result is that the event to be monitored exists in the at least one image to be processed
  • the to-be-monitored event includes illegal intrusion;
  • the at least one image to be processed includes a first image;
  • the first image includes an illegal intrusion area;
  • the event detection unit is configured as:
  • the monitored object includes at least one of the following: a person, a non-motor vehicle ;
  • the at least one image to be processed includes a third image;
  • the at least one attribute filter condition includes a whitelist feature database;
  • the at least one attribute includes the identity feature of the monitored object;
  • the attribute extraction unit is configured as:
  • the at least one attribute conforms to the at least one attribute filtering condition, including: no feature data matching the identity feature data exists in the whitelist feature database;
  • the fact that the at least one attribute does not meet the at least one attribute filtering condition includes that feature data matching the identity feature data exists in the whitelist feature database.
  • the at least one attribute filter condition further includes a size range; the at least one attribute further includes the size of the monitored object;
  • the attribute extraction unit is configured as:
  • the at least one attribute complies with the at least one attribute filtering condition, including: there is no feature data matching the identity feature in the whitelist feature database, and the size of the monitored object is within the size range;
  • the at least one attribute does not meet the at least one attribute filtering condition, including: there is no feature data matching the identity feature in the whitelist feature database, and/or the size of the monitored object is in the out of size range.
  • the at least one image to be processed includes a third image and a fourth image, and the timestamp of the third image is earlier than the timestamp of the fourth image; the at least one attribute filtering The condition includes a duration threshold; the at least one attribute includes the duration of the event to be monitored;
  • the attribute extraction unit is configured as:
  • the time stamp of the third image is used as the start time of the event to be monitored, and the time stamp of the fourth image is used as the end time of the event to be monitored to obtain the duration;
  • the at least one attribute conforms to the at least one attribute filtering condition, including: the duration exceeds the duration threshold;
  • the at least one attribute does not meet the at least one attribute filtering condition, including: the duration does not exceed the duration threshold.
  • the to-be-monitored event includes illegal parking;
  • the at least one attribute filter condition further includes an illegal parking area;
  • the at least one attribute includes the position of the monitored vehicle;
  • the third image and the the fourth images all contain the monitored vehicle;
  • the attribute extraction unit is configured as:
  • the at least one attribute conforms to the at least one attribute filter condition, including: the duration exceeds the duration threshold, and both the first position and the second position are located within the illegal parking area;
  • the at least one attribute does not meet the at least one attribute filter condition includes at least one of the following situations: the duration does not exceed the duration threshold, the first location is outside the illegal parking area, the second location outside the illegal parking area.
  • the at least one image to be processed includes a fifth image;
  • the at least one attribute filter condition includes a confidence threshold;
  • the attribute extraction unit is configured as:
  • the at least one attribute complies with the at least one attribute filtering condition, including: the confidence level of the monitored object exceeds the confidence level threshold;
  • the at least one attribute does not meet the at least one attribute filtering condition, including: the confidence level of the monitored object does not exceed the confidence level threshold.
  • the at least one attribute filter condition includes an alarm time period
  • the attribute extraction unit is configured as:
  • the sixth image is the image with the latest time stamp in the at least one image to be processed
  • the at least one attribute conforms to the at least one attribute filtering condition, including: the occurrence time of the to-be-monitored event is outside the alarm time period;
  • the at least one attribute does not meet the at least one attribute filtering condition includes: the occurrence time of the to-be-monitored event is within the alarm time period.
  • the obtaining unit is further configured to, when the number of the attribute filter conditions exceeds 1, perform the event attribute extraction process on the at least one image to be processed, and obtain the Before the at least one attribute of the to-be-monitored event, obtain the priority order of the to-be-monitored event attribute corresponding to the filter condition;
  • the attribute extraction unit is configured as:
  • the first attribute is the attribute with the highest priority in the priority order;
  • a second attribute extraction process is performed on the at least one image to be processed to obtain the second attribute of the to-be-monitored event;
  • the second attribute is the attribute with the second highest priority in the priority order;
  • the event attribute extraction processing for the at least one image to be processed is stopped.
  • the image processing apparatus further includes:
  • the output unit is configured to output alarm information when the target monitoring result is that the to-be-monitored event does not occur.
  • a processor configured to perform the method according to the above-mentioned first aspect and any one of possible implementations thereof.
  • an electronic device comprising: a processor, a sending device, an input device, an output device, and a memory, the memory is configured to store computer program code, the computer program code includes computer instructions, and the processing In the case that the computer executes the computer instructions, the electronic device executes the method according to the first aspect and any one of possible implementations thereof.
  • a computer-readable storage medium where a computer program is stored in the computer-readable storage medium, and the computer program includes program instructions that, when the program instructions are executed by a processor, cause all The processor executes the method as described above in the first aspect and any possible implementation manner thereof.
  • a computer program product in a sixth aspect, includes a computer program or an instruction, and when the computer program or instruction is run on a computer, the computer is made to execute the first aspect and any of the above.
  • FIG. 1 is a schematic flowchart of an image processing method provided by an embodiment of the present application.
  • FIG. 2 is a schematic structural diagram of an image processing apparatus provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a hardware structure of an image processing apparatus according to an embodiment of the present application.
  • face recognition models can be used for face recognition
  • object detection models can be used to detect objects
  • motion monitoring models can be used to monitor whether A specific action occurs.
  • the electronic device uses the computer vision model to process the image, and can determine whether there is a violation event in the image, wherein the violation event includes: overflowing garbage, fighting and so on.
  • the embodiments of the present application provide a technical solution to correct the judgment result of the violation event by the computer vision model, thereby improving the judgment accuracy of the violation event.
  • the execution subject of the image processing method in the embodiment of the present application is an image processing apparatus.
  • the image processing apparatus may be one of the following: a mobile phone, a computer, a server, a processor, and a tablet computer.
  • the image processing method may be implemented by a processor invoking computer-readable instructions stored in a memory.
  • the image to be processed may contain any content.
  • the image to be processed may include a road.
  • the images to be processed may include roads and vehicles.
  • the image to be processed may include a person. This application does not limit the content of the image to be processed.
  • the image processing apparatus receives at least one image to be processed input by a user through an input component.
  • the above input components include: keyboard, mouse, touch screen, touch pad, audio input and so on.
  • the image processing apparatus receives at least one image to be processed sent by the first terminal.
  • the first terminal may be any one of the following: a mobile phone, a computer, a tablet computer, a server, and a wearable device.
  • the image processing device can receive at least one image to be processed sent by the surveillance camera through the communication connection.
  • the surveillance camera is deployed on the road or indoors.
  • the image processing device can receive the video stream sent by the surveillance camera through the communication connection, and use at least one image in the video stream as at least one image to be processed.
  • the surveillance camera is deployed on the road or indoors.
  • the image processing apparatus may directly acquire at least one image to be processed through its own image acquisition component, such as a camera.
  • the event to be monitored may be any event.
  • the to-be-monitored event is a violation event, and the to-be-monitored event includes at least one of the following: fighting, gathering of people, overflowing garbage, and illegal parking.
  • the attribute filter condition of the event to be monitored is used to filter out misidentified events.
  • the attribute filtering conditions of the events to be monitored include: the minimum number of people fighting, the minimum number of people gathered, the monitoring time of overflowing garbage, the location of illegal parking areas, and the confidence level of the detected object.
  • the attribute filter condition of the event to be monitored may be at least two people.
  • the image processing apparatus uses a computer vision model to process a certain image, and the obtained processing result is that the image contains a fight event, the image processing apparatus can use the attribute filter condition to filter out the fight event.
  • the gathering of people requires at least two people to participate.
  • the attribute filter condition of the event to be monitored may be at least two people. In this way, if the image processing apparatus uses a computer vision model to process a certain image, and the obtained processing result is that the image contains a person gathering event, the image processing apparatus can use the attribute filter condition to filter out the person gathering event.
  • the working hours of the staff dealing with overflowing garbage are 9:00-20:00.
  • the attribute filter condition of the event to be monitored may be 9:00-20:00 .
  • the image processing apparatus uses the computer vision model to process a certain image, the obtained processing result is that the image contains a garbage overflow event.
  • the image processing device determines that the time for collecting the image is within 20:00-9:00, the image may filter out the garbage overflow event contained in the image.
  • the vehicle parks illegally when the vehicle is parked in the illegal parking area, and the vehicle does not park illegally when the vehicle does not park in the illegal parking area. Therefore, when the event to be monitored is illegal parking, the attribute filter condition of the event to be monitored may be the location of the illegal parking area.
  • the image processing device uses a computer vision model to process a certain image, the processing result is that vehicle A in the image is illegally parked, but the image processing device determines that the location of vehicle A is outside the illegal parking area. Next, the image processing device may determine that the image does not contain illegal parking events.
  • the image processing apparatus performs object detection processing on the image to be processed to obtain the confidence level of the object to be confirmed. In the case that the confidence level does not exceed the confidence level threshold, the image processing apparatus determines that the object to be confirmed is not a person, so it can be determined that the to-be-processed image does not contain a pedestrian illegal intrusion event.
  • the event detection processing may be implemented by a computer vision model.
  • the above computer vision models include: a fighting and fighting detection model, a people gathering detection model, a garbage overflow detection model, and an illegal parking detection model.
  • the intermediate detection result of the event to be monitored includes: the event to be monitored exists in at least one image to be processed or the event to be monitored does not exist in at least one image to be processed.
  • the image processing device uses a computer vision model to perform event detection processing on at least one image to be processed, so as to obtain an intermediate detection result.
  • a computer vision model is a fight detection model.
  • the image processing device uses the fight detection model to perform event detection processing on the image, so as to determine whether the image contains a fight event.
  • the computer vision model is a people gathering detection model.
  • the image processing device performs event detection processing on the image by using the people gathering detection model, so as to determine whether the image contains a people gathering event.
  • the image processing device uses the garbage overflow detection model to perform event detection processing on the image, and can determine whether the image contains garbage overflow events.
  • the image processing device uses the illegal parking detection model to perform event detection processing on the image, and can determine whether the illegal parking event is included in the image.
  • the attributes of the event to be monitored include the number of people, the time of occurrence, the location of the vehicle, and the length of time the vehicle stays.
  • the event to be monitored is a fight
  • at least one attribute of the event to be monitored includes the number of people in the image and the distance between people
  • the event to be monitored is a gathering detection event
  • the event to be monitored At least one attribute of the image includes the number of people in the image
  • when the event to be monitored is a garbage overflow event at least one attribute of the event to be monitored includes the acquisition time of the image, that is, the occurrence time of garbage overflow; when the event to be monitored is a violation of regulations
  • at least one attribute of the event to be monitored includes the location of the vehicle in the image and the length of time the vehicle has stayed.
  • At least one to-be-processed image is input into an attribute extraction model, and at least one attribute of the to-be-monitored event can be obtained.
  • the attribute extraction model may be a convolutional neural network obtained by training an image with attributes as annotation information as training data.
  • the event attribute extraction process is performed on at least one image to be processed by using the attribute extraction model to obtain at least one attribute of the event to be monitored.
  • the at least one image to be processed includes: image 1 to be processed.
  • the obtained attributes of the to-be-monitored event include: the number of people included in the to-be-processed image 1 .
  • the at least one image to be processed includes: image 1 to be processed and image 2 to be processed.
  • the attributes of the to-be-monitored event obtained include: the position of the vehicle in the to-be-processed image 1, the position of the vehicle in the to-be-processed image 2, the vehicle Duration of stay in image 1 to be processed and image 2 to be processed.
  • the at least one image to be processed includes: image 1 to be processed and image 2 to be processed.
  • the obtained attributes of the event to be monitored include: the number of people included in the image to be processed 1, the location of the vehicle in the image to be processed 1, the location of the vehicle to be processed The position of the vehicle in image 2 and the length of time the vehicle stays in image 1 to be processed and image 2 to be processed.
  • the target monitoring result is that the to-be-monitored event does not occur. If the intermediate detection result of the to-be-monitored event is that there is a to-be-monitored event in at least one image to be processed, and the attributes of the to-be-monitored event do not meet the attribute filtering conditions, it means that the to-be-monitored event has not occurred, that is, the detection result of the computer vision model is wrong , at this time, the target monitoring result is that the event to be monitored has not occurred.
  • the intermediate detection result of the to-be-monitored event is that there is a to-be-monitored event in at least one to-be-processed image, and the attributes of the to-be-monitored event meet the attribute filtering conditions, it indicates that the to-be-monitored event has occurred, that is, the detection result of the computer vision model is correct, At this time, the target monitoring result is that the event to be monitored has occurred.
  • the image processing apparatus determines that the target monitoring result is to be monitored The event has occurred; if the intermediate detection result is that there is an event to be monitored in at least one image to be processed, and at least one attribute does not meet at least one attribute filtering condition, the target monitoring result is determined that the to-be-monitored event has not occurred.
  • the intermediate detection result is that the image 1 to be processed contains a fight
  • at least one attribute of the event to be monitored includes: the image 1 to be processed contains two people, and the distance between the two people is 3 meters, the attribute filter condition is to include at least 2 people, and the distance between any two people is less than 1 meter. Since the distance between the two persons in the to-be-processed image 1 exceeds 1 meter, that is, the attribute of the to-be-monitored event does not meet the attribute filtering condition. Therefore, the image processing apparatus determines that the target monitoring result is that there is no fighting event in the image 1 to be processed.
  • the image processing device filters the intermediate detection results according to the attributes of the events to be monitored and the attribute filtering conditions, and can filter out the detection results whose attributes do not meet the attribute filtering conditions, and obtain the target monitoring results, which can improve the target monitoring results. 's accuracy.
  • the image processing apparatus performs the following steps in the process of performing step 103:
  • Step 103 is executed when it is determined that the intermediate detection result is that there is an event to be monitored in the at least one image to be processed, so that the data processing amount of the image processing apparatus can be reduced.
  • the image processing apparatus performs the following steps in the process of performing step 102:
  • Step 102 is executed when it is determined that at least one attribute of the event to be monitored meets the attribute filtering condition, so that the data processing amount of the image processing apparatus can be reduced.
  • the image processing apparatus determines that the image 1 to be processed contains only one person by performing an event attribute extraction process on the image 1 to be processed. Obviously, it is impossible for a fight to exist in the image 1 to be processed, therefore, the image processing apparatus does not need to perform step 102 any more.
  • the event to be monitored includes illegal intrusion
  • the at least one image to be processed includes a first image
  • the first image includes an illegal intrusion area.
  • the image processing apparatus performs the following steps in the process of performing step 102:
  • illegal intrusion includes at least one of the following: illegal intrusion by non-motor vehicles and illegal intrusion by pedestrians.
  • the monitored objects include at least one of the following: people, non-motor vehicles.
  • Illegal intrusion areas include: highway areas, motor vehicle driving areas, and specific areas.
  • pedestrian trespass means that pedestrians are prone to safety accidents when they enter the expressway area. Therefore, when the event to be monitored is illegal intrusion by pedestrians, the illegal intrusion area includes the expressway area.
  • illegal intrusion by a non-motor vehicle means that a security accident is likely to occur when a non-motor vehicle enters the driving area of a motor vehicle. Therefore, when the event to be monitored is illegal intrusion by a non-motor vehicle, the illegal intrusion area includes the driving area of the motor vehicle.
  • meeting room A For another example, a meeting is being held in meeting room A, the participants of the meeting are all invited by the organizer, and the meeting does not allow people other than the participants to enter meeting room A. Therefore, when the event to be monitored is illegal intrusion by a visitor, the illegal intrusion area includes the conference room A. That is, meeting room A is the above-mentioned specific area.
  • the image processing device determines that there is a monitored object in the illegal intrusion area by performing event detection processing on the first image, it indicates that the monitored object has an illegal intrusion behavior; There is a monitored object in the intrusion area, indicating that the monitored object has not illegally invaded.
  • the image processing device determines that the intermediate detection result is that there is illegal intrusion in the first image; when it is determined that the monitored object does not exist in the illegal intrusion area, the image processing device It is determined that the intermediate detection result is that there is no illegal intrusion in the first image.
  • the first image is captured by surveillance cameras on the road. Since the monitoring area of the surveillance camera on the road is fixed, the area corresponding to the non-motorized illegal intrusion area on the road can be determined within the monitoring area of the surveillance camera as the illegal intrusion area. For example, when the surveillance camera is deployed on the highway In this case, the expressway area in the monitoring area can be regarded as the illegal intrusion area. In this way, the image processing apparatus can determine whether there is a non-motor vehicle in the illegal intrusion area of the non-motor vehicle by performing event detection processing on the first image, and then obtain the detection result.
  • At least one image to be processed includes a second image
  • at least one attribute filter condition includes a whitelist feature database
  • at least one attribute includes an identity feature of a monitored object.
  • the whitelist feature database includes facial feature data of whitelisted persons and/or whitelisted human body feature data.
  • the whitelist is for people who are allowed to enter a specific area. For example, a specific area is a conference room, and the whitelist includes conference participants; a specific area is a company office area, and the whitelist includes company employees.
  • the identity feature data includes at least one of the following: face feature data and human body feature data.
  • the human body feature data carries the identity information of the person in the image.
  • the identity information of the person carried by the human body feature data includes: clothing attributes, appearance characteristics and change characteristics of the person.
  • the clothing attribute includes at least one of the characteristics of all objects that decorate the human body (such as the color of the shirt, the color of the pants, the length of the pants, the style of the hat, the color of the shoes, whether to wear an umbrella, the category of luggage, whether there is a mask, and the color of the mask).
  • Appearance characteristics include body size, gender, hairstyle, hair color, age group, whether or not you wear glasses, and whether you hold something on your chest.
  • Variation features include: posture, stride length.
  • the categories of top color or pants color or shoe color or hair color include: black, white, red, orange, yellow, green, blue, purple, brown.
  • the categories of trouser lengths include: trousers, shorts, skirts.
  • the categories of hat styles include: no hats, baseball caps, peaked caps, flat brim hats, bucket hats, berets, top hats.
  • the categories of umbrellas that cannot be used include: umbrellas and no umbrellas.
  • the categories of hairstyles include: Shawl Long, Short, Bald, and Bald.
  • the posture categories include: riding posture, standing posture, walking posture, running posture, sleeping posture, lying posture. Stride refers to the size of the stride when a character walks, and the size of the stride can be expressed in length, such as: 0.3 meters, 0.4 meters, 0.5 meters, 0.6 meters.
  • the image processing apparatus determines at least one attribute by comparing the identity feature data with the feature data in the whitelist feature database to determine whether there is feature data matching the identity feature data in the whitelist feature database. Whether at least one attribute filter condition is met.
  • the image processing device determines that there is no feature data matching the identity feature data in the whitelist feature data, indicating that the above-mentioned monitored object does not belong to the whitelist. At this time, the image processing device can determine that at least one attribute meets at least one attribute filtering condition ; The image processing device determines that there is feature data matching the identity feature data in the whitelist feature data, indicating that the monitored object belongs to the whitelist. At this time, the image processing device can determine that at least one attribute does not meet at least one attribute filtering condition.
  • the image processing device can reduce misjudgments and improve the accuracy of target monitoring results.
  • the at least one attribute filter condition further includes a size range
  • the at least one attribute further includes the size of the monitored object.
  • the size of the object to be monitored is the size of the object to be monitored in the image.
  • the object to be monitored is a person.
  • the size of the object to be monitored may be the length of the pixel area covered by the person in the image.
  • the object to be monitored is a vehicle.
  • the size of the object to be monitored may be the width of the pixel area covered by the vehicle in the image.
  • the position of the camera that collects the image to be processed is fixed, so in the image collected by the camera, the size of the monitored object is within a fixed range.
  • This fixed range is called a size range.
  • the height of the person is at least 5 pixels and at most 15 pixels. At this time, the height range is [5, 15].
  • the width of the vehicle is at least 10 pixels and at most 20 pixels. At this time, the size range is [10, 20].
  • the image processing device can obtain the size of the monitored object in the second image by performing object detection processing on the second image. For example, when the monitored object is a person, the image processing device can obtain a person frame including the person by performing person detection processing on the second image, and then obtain the size of the person in the second image according to the size of the person frame. For another example, when the monitored object is a human vehicle, the image processing device can obtain a vehicle frame including the vehicle by performing vehicle detection processing on the second image, and then obtain the size of the vehicle in the second image according to the size of the vehicle frame. .
  • the image processing apparatus compares the identity feature data with the feature data in the whitelist feature database, determines whether there is feature data matching the identity feature data in the whitelist feature database, and judges the monitored object. Whether the size of the attribute is within the size range to determine whether at least one attribute meets at least one attribute filter condition.
  • the image processing device determines that there is no feature data matching the identity feature data in the whitelist feature data, and the size of the monitored object is within the size range, indicating that the monitored object does not belong to the whitelist. At this time, the image processing device It can be determined that at least one attribute meets at least one attribute filter condition;
  • the image processing device determines that feature data matching the identity feature data exists in the whitelist feature data, and the size of the monitored object is within the size range, indicating that the monitored object belongs to the whitelist. At this time, the image processing device can determine at least one attribute does not match at least one attribute filter;
  • the image processing device determines that there is no feature data matching the identity feature data in the whitelist feature data, and the size of the monitored object is outside the size range, indicating that the monitored object belongs to the whitelist. At this time, the image processing device can determine at least one.
  • the attribute does not meet at least one attribute filter;
  • the image processing device determines that there is no feature data matching the identity feature data in the whitelist feature data, and the size of the monitored object is outside the size range, indicating that the monitored object belongs to the whitelist. At this time, the image processing device can determine at least one. Attribute does not match at least one attribute filter.
  • the image processing apparatus determines whether the attribute of the event to be monitored meets the attribute filtering condition according to the size and size range of the monitored object, which can improve the accuracy of the target monitoring result.
  • the at least one image to be processed includes a third image and a fourth image, wherein the timestamp of the third image is earlier than the timestamp of the fourth image.
  • At least one attribute filter condition includes a duration threshold, and at least one attribute includes a duration of the event to be monitored.
  • the time stamp of the third image is used as the start time of the event to be monitored, and the time stamp of the fourth image is used as the end time of the event to be monitored to obtain the duration.
  • the image processing device determines that the vehicle A in the third image is in the illegal parking area by performing event detection processing on the third image, and determines that the vehicle A in the third image is in the illegal parking area by performing event detection processing on the fourth image.
  • the image processing device further determines that the duration of the illegal parking of the vehicle A is from the collection time of the third image to the collection time of the fourth image. That is, the timestamp of the third image is the start time of the illegal parking of the vehicle A, and the timestamp of the fourth image is the end time of the illegal parking of the vehicle A.
  • the third image and the fourth image in the embodiments of the present application are only examples, and in actual processing, the image processing apparatus may obtain the duration of the event to be monitored according to at least two images to be processed.
  • the image processing apparatus determines whether the duration of the event to be monitored exceeds the duration threshold by comparing the duration of the event to be monitored with the duration threshold, to determine whether at least one attribute complies with at least one attribute filter condition.
  • the image processing device determines that the duration exceeds the duration threshold, indicating that at least one attribute meets at least one attribute filtering condition; the image processing device determines that the duration does not exceed the duration threshold, indicating that at least one attribute does not meet at least one attribute filtering condition.
  • the image processing apparatus may further obtain the position of the monitoring object in the to-be-monitored event by performing object detection processing on at least one to-be-processed image, as at least one attribute of the to-be-monitored event.
  • the event to be monitored is the illegal entry of an electric vehicle into a residential building.
  • the image processing device obtains the position of the electric vehicle in the third image and the position of the electric vehicle in the fourth image by performing electric vehicle detection processing on the third image and the fourth image.
  • the image processing device determines at least one The attribute meets at least one attribute filtering condition; in other cases, the image processing apparatus regards at least one attribute as not meeting at least one attribute filtering condition.
  • the event to be monitored is that a safety helmet is not worn on the construction site.
  • the image processing device obtains the position of the person in the third image and the position of the person in the fourth image by performing electric vehicle detection processing on the third image and the fourth image.
  • the image processing device determines that the at least one attribute complies with the at least one attribute in the case that both the position of the person in the third image and the position of the person in the fourth image are within the construction site area, and the duration of the person in the construction site exceeds the duration threshold Filtering condition; in other cases, the image processing apparatus considers that at least one attribute does not meet at least one attribute filtering condition.
  • the event to be monitored is a phone call in a gas station.
  • the image processing device obtains the position of the person in the third image and the position of the person in the fourth image by performing electric vehicle detection processing on the third image and the fourth image.
  • the image processing device determines that the at least one attribute conforms to the at least one attribute when both the position of the person in the third image and the position of the person in the fourth image are within the gas station area, and the duration of the person in the gas station exceeds the duration threshold. Attribute filtering condition; in other cases, the image processing apparatus considers that at least one attribute does not meet at least one attribute filtering condition.
  • the event to be monitored includes illegal parking
  • at least one attribute filter condition further includes illegal parking area
  • at least one attribute includes the position of the monitored vehicle
  • both the third image and the fourth image include the above-mentioned monitored vehicle .
  • the image processing apparatus further executes the following steps:
  • the position of the monitored vehicle in the image may be the position of the vehicle frame including the monitored vehicle in the pixel coordinate system of the image.
  • the position of the monitored vehicle in the image may be the coordinates in the pixel coordinate system of the diagonal coordinates of the vehicle frame containing the monitored vehicle.
  • the image processing device can obtain the position of the monitored vehicle in the third image, that is, the first position, by performing vehicle detection processing on the third image.
  • the image processing device can obtain the position of the monitored vehicle in the third image, that is, the second position, by performing vehicle detection processing on the third image.
  • the image processing device compares the duration of the event to be monitored with the duration threshold, determines whether the duration of the event to be monitored exceeds the duration threshold, and determines whether the position of the monitored vehicle is within the illegal parking area, to Determines whether at least one attribute matches at least one attribute filter condition.
  • the image processing apparatus determines that the duration exceeds the duration threshold, and both the first position and the second position are located in the illegal parking area, indicating that at least one attribute meets at least one attribute filtering condition.
  • the image processing device determines that at least one attribute does not meet at least one attribute filtering condition when at least one of the following conditions occurs: the duration does not exceed the duration threshold, the first position is outside the illegal parking area, and the second position is located in the illegal parking area Also, specifically:
  • the image processing device determines that the duration does not exceed the duration threshold, and both the first position and the second position are located in the illegal parking area, indicating that at least one attribute does not meet at least one attribute filtering condition;
  • the image processing device determines that the duration does not exceed the duration threshold, and that the first position is located outside the illegal parking area, and the second position is both located within the illegal parking area, indicating that at least one attribute does not meet at least one attribute filtering condition;
  • the image processing device determines that the duration does not exceed the duration threshold, and the first position is located within the illegal parking area, and the second position is located outside the illegal parking area, indicating that at least one attribute does not meet at least one attribute filtering condition;
  • the image processing device determines that the duration exceeds the duration threshold, and both the first position and the second position are located outside the illegal parking area, indicating that at least one attribute does not meet at least one attribute filtering condition;
  • the image processing device determines that the duration does not exceed the duration threshold, and both the first position and the second position are located outside the illegal parking area, indicating that at least one attribute does not meet at least one attribute filtering condition.
  • At least one image to be processed includes a fifth image, and at least one attribute filter condition includes a confidence threshold.
  • the image processing apparatus further executes the following steps:
  • the monitored object may be a person or an object.
  • the confidence level of the monitored object represents the reliability of the monitored object. For example, when the monitored object is a person, the confidence level of the monitored object represents the probability that the monitored object in the fifth image is a human; when the monitored object is a car, the confidence level of the monitored object represents the fifth image The probability that the monitored object in is a car.
  • the image processing apparatus determines whether the monitored object in the image is credible by comparing the confidence of the monitored object with a confidence threshold, and determines whether at least one attribute complies with at least one attribute filtering condition.
  • the image processing device determines that the confidence of the monitored object exceeds the confidence threshold, indicating that at least one attribute meets at least one attribute filtering condition; the image processing device determines that the confidence of the monitored object does not exceed the confidence threshold, indicating that at least one attribute does not exceed the confidence threshold. Matches at least one attribute filter.
  • At least one image to be processed includes a sixth image, and at least one attribute filter condition includes an alarm time period.
  • the image processing apparatus further executes the following steps:
  • the sixth image is an image with the latest time stamp in the at least one image to be processed.
  • the alarm time period is a time period during which the image processing apparatus issues an alarm when it is determined that the event to be monitored occurs.
  • the event to be monitored is garbage overflow.
  • the image processing device reminds the staff to clean up the garbage in time by outputting alarm information.
  • every day from 23:00 to 4:00 is the off-duty time of the staff. Obviously, it is unreasonable to output the alarm information during this time. Therefore, this time can be used as the alarm time period.
  • the image processing apparatus determines whether at least one attribute complies with at least one attribute filtering condition by judging whether the occurrence time of the event to be monitored is within the alarm time period.
  • the image processing device determines that the occurrence time of the to-be-monitored event is outside the alarm time period, indicating that at least one attribute meets at least one attribute filter condition; the image processing device determines that the occurrence time of the to-be-monitored event is within the alarm time period, indicating that at least one attribute Does not match at least one attribute filter.
  • the image processing apparatus when the number of attribute filtering conditions exceeds 1, before performing step 103, the image processing apparatus further performs the following steps:
  • the higher the priority of the event attribute to be monitored the smaller the data processing amount required to extract the attribute from the to-be-processed image.
  • the amount of data processing required by the image processing apparatus to obtain the time stamp of the image from the image is smaller than the amount of data processing required to extract the position of the vehicle from the image. Therefore, for monitoring events, the attribute of duration has a higher priority than the attribute of vehicle location.
  • the image processing apparatus receives the priority order input by the user through the input component as the priority order of the attributes of the events to be monitored.
  • the above input components include: keyboard, mouse, touch screen, touch pad, audio input and so on.
  • the image processing apparatus receives the priority order sent by the second terminal as the priority order of the attributes of the events to be monitored.
  • the second terminal may be any one of the following: a mobile phone, a computer, a tablet computer, a server, and a wearable device.
  • the second terminal and the first terminal may be the same terminal, or may be different terminals.
  • the image processing apparatus After performing step 11, the image processing apparatus performs the following steps in the process of performing step 103:
  • the first attribute is the attribute with the highest priority in the priority order.
  • the event to be monitored is illegal parking.
  • Attributes of the event to be monitored include: duration, location of the vehicle, and size of the vehicle.
  • the attribute with the highest priority is the duration
  • the attribute with the second highest priority is the size of the vehicle
  • the attribute with the lowest priority is the position of the vehicle.
  • the image processing apparatus first obtains the first attribute of the event to be monitored by performing first attribute extraction processing on at least one image to be processed. For example, in Example 1, the image processing apparatus first acquires the timestamp of at least one image to be processed.
  • the second attribute is the attribute with the second highest priority in the priority order.
  • the second attribute is the size of the vehicle.
  • the image processing apparatus determines whether the first attribute complies with the attribute filtering condition corresponding to the first attribute in at least one attribute filtering condition.
  • the image processing apparatus performs second attribute extraction processing on at least one image to be processed to obtain the second attribute of the to-be-monitored event.
  • the image processing device performs vehicle detection processing on at least one image to be processed to obtain the position of the vehicle in the image to be processed when it is determined that the duration of the vehicle stop exceeds the duration threshold.
  • the image processing apparatus does not need to continuously extract attributes other than the first attribute from the at least one image to be processed, which can reduce the amount of data processing.
  • extracting the third attribute is performed on at least one image to be processed to obtain the third attribute of the event to be monitored.
  • the image processing apparatus judges whether the third attribute complies with the attribute filter condition corresponding to the third attribute, and loops continuously until a certain attribute does not meet the attribute filter condition corresponding to the attribute, and the image processing apparatus stops executing the attribute extraction process.
  • the image processing apparatus further determines whether the third attribute complies with the attribute filtering condition corresponding to the third attribute, and loops continuously until all attributes of the event to be monitored are extracted.
  • the image processing apparatus extracts the attribute with the next highest priority from at least one image to be processed when the attribute with the higher priority meets the attribute filtering condition, which can reduce the amount of data processing and improve the processing speed.
  • the image processing apparatus outputs alarm information when it is determined that the target monitoring result is that the event to be monitored has not occurred, wherein the alarm information includes at least one of the following: text, sound, light, vibration, smell, Command, low current stimulation.
  • the image processing apparatus may send an alarm instruction to the terminal, where the alarm instruction is used to instruct the terminal to output alarm information.
  • the embodiments of the present application further provide several possible application scenarios.
  • Scenario 1 The crime of gathering a crowd to disturb social order refers to the act of gathering a crowd to disrupt social order, the circumstances are serious, and the work, production, business, teaching, scientific research and medical treatment cannot be carried out, resulting in serious losses.
  • related electronic devices can process the video streams collected by the surveillance cameras to determine whether there is a gathering of people, thereby reducing the occurrence of public safety accidents.
  • the law enforcement center in place A has a server that has a communication connection with the surveillance cameras in place A.
  • the server can obtain the video stream collected by the surveillance camera through the communication connection.
  • the server uses a computer vision model to process the images in the video stream to obtain intermediate detection results.
  • the server can obtain the number of people in the image by performing attribute extraction processing on the image in the video stream.
  • the server will obtain the target monitoring result based on the above technical solution, according to the number of people in the image and the intermediate detection result.
  • the server may send an instruction including an alarm to the terminal of the relevant management personnel to prompt the relevant management personnel that a personnel gathering event occurs.
  • the alarm instruction carries the place and time when the personnel gathering event occurs.
  • Scenario 2 A parking lot only allows vehicles that belong to the vehicle whitelist to park, and vehicles that do not belong to the whitelist enter the parking lot, which is an illegal intrusion.
  • a surveillance camera is installed at the entrance of the parking lot, and the video stream collected by the surveillance camera is sent to the server.
  • the server uses a computer vision model to process the video stream to determine whether a vehicle enters the parking lot, and obtains an intermediate detection result.
  • the server performs attribute extraction processing on the video stream to obtain the license plate number of the vehicle entering the parking lot.
  • the vehicle whitelist includes at least one license plate number.
  • the server determines that the vehicle has illegally invaded. Further, an instruction including an alarm can be sent to the terminal of the relevant management personnel to prompt the relevant management personnel that a vehicle illegally invades the parking lot.
  • the warning instruction carries the license plate number of the illegally intruded vehicle.
  • the writing order of each step does not mean a strict execution order but constitutes any limitation on the implementation process, and the specific execution order of each step should be based on its function and possible Internal logic is determined.
  • FIG. 2 is a schematic structural diagram of an image processing apparatus provided by an embodiment of the present application.
  • the image processing apparatus 1 includes: an acquisition unit 11, an event detection unit 12, an attribute extraction unit 13, a processing unit 14,
  • the acquiring unit 11 is configured to acquire at least one image to be processed and at least one attribute filter condition of the event to be monitored;
  • the event detection unit 12 is configured to perform event detection processing on the at least one image to be processed to obtain an intermediate detection result of the to-be-monitored event;
  • the attribute extraction unit 13 is configured to perform event attribute extraction processing on the at least one image to be processed to obtain at least one attribute of the to-be-monitored event;
  • the processing unit 14 is configured to obtain the target monitoring result of the event to be monitored according to the intermediate detection result, the at least one attribute and the at least one attribute filtering condition of the event to be monitored.
  • processing unit 14 is configured as:
  • the intermediate detection result is that the to-be-monitored event exists in the at least one image to be processed, and the at least one attribute complies with the at least one attribute filter condition, determine that the target monitoring result is the The event to be monitored has occurred;
  • the intermediate detection result is that the to-be-monitored event exists in the at least one image to be processed, and the at least one attribute does not meet the at least one attribute filtering condition, determine that the target monitoring result is the target monitoring result.
  • the said event to be monitored has not occurred.
  • the attribute extraction unit 13 is configured as:
  • the intermediate detection result is that the event to be monitored exists in the at least one image to be processed
  • the to-be-monitored event includes illegal intrusion;
  • the at least one image to be processed includes a first image;
  • the first image includes an illegal intrusion area;
  • the event detection unit 12 is configured as:
  • the monitored object includes at least one of the following: a person, a non-motor vehicle ;
  • the at least one image to be processed includes a second image;
  • the at least one attribute filter condition includes a whitelist feature database;
  • the at least one attribute includes an identity feature of the monitored object;
  • the attribute extraction unit 13 is configured as:
  • the at least one attribute conforms to the at least one attribute filtering condition, including: no feature data matching the identity feature data exists in the whitelist feature database;
  • the fact that the at least one attribute does not meet the at least one attribute filtering condition includes that feature data matching the identity feature data exists in the whitelist feature database.
  • the at least one attribute filter condition further includes a size range; the at least one attribute further includes the size of the monitored object;
  • the attribute extraction unit 13 is configured as:
  • the at least one attribute complies with the at least one attribute filtering condition, including: there is no feature data matching the identity feature in the whitelist feature database, and the size of the monitored object is within the size range;
  • the at least one attribute does not meet the at least one attribute filtering condition, including: there is no feature data matching the identity feature in the whitelist feature database, and/or the size of the monitored object is in the out of size range.
  • the at least one image to be processed includes a third image and a fourth image, and the timestamp of the third image is earlier than the timestamp of the fourth image; the at least one attribute filtering The condition includes a duration threshold; the at least one attribute includes the duration of the event to be monitored;
  • the attribute extraction unit 13 is configured as:
  • the time stamp of the third image is used as the start time of the event to be monitored, and the time stamp of the fourth image is used as the end time of the event to be monitored to obtain the duration;
  • the at least one attribute conforms to the at least one attribute filtering condition, including: the duration exceeds the duration threshold;
  • the at least one attribute does not meet the at least one attribute filtering condition, including: the duration does not exceed the duration threshold.
  • the to-be-monitored event includes illegal parking;
  • the at least one attribute filter condition further includes an illegal parking area;
  • the at least one attribute includes the position of the monitored vehicle;
  • the third image and the the fourth images all contain the monitored vehicle;
  • the attribute extraction unit 13 is configured as:
  • the at least one attribute conforms to the at least one attribute filter condition, including: the duration exceeds the duration threshold, and both the first position and the second position are located within the illegal parking area;
  • the at least one attribute does not meet the at least one attribute filter condition includes at least one of the following situations: the duration does not exceed the duration threshold, the first location is outside the illegal parking area, the second location outside the illegal parking area.
  • the at least one image to be processed includes a fifth image;
  • the at least one attribute filter condition includes a confidence threshold;
  • the attribute extraction unit 13 is configured as:
  • the at least one attribute complies with the at least one attribute filtering condition, including: the confidence level of the monitored object exceeds the confidence level threshold;
  • the at least one attribute does not meet the at least one attribute filtering condition, including: the confidence level of the monitored object does not exceed the confidence level threshold.
  • the at least one attribute filter condition includes an alarm time period
  • the attribute extraction unit 13 is configured as:
  • the sixth image is the image with the latest time stamp in the at least one image to be processed
  • the at least one attribute conforms to the at least one attribute filtering condition, including: the occurrence time of the to-be-monitored event is outside the alarm time period;
  • the at least one attribute does not meet the at least one attribute filtering condition includes: the occurrence time of the to-be-monitored event is within the alarm time period.
  • the obtaining unit 11 is further configured to, when the number of the attribute filter conditions exceeds 1, perform the event attribute extraction process on the at least one image to be processed, to obtain Before at least one attribute of the to-be-monitored event, obtain the priority order of the to-be-monitored event attribute corresponding to the filter condition;
  • the attribute extraction unit 13 is configured as:
  • the first attribute is the attribute with the highest priority in the priority order;
  • a second attribute extraction process is performed on the at least one image to be processed to obtain the second attribute of the to-be-monitored event;
  • the second attribute is the attribute with the second highest priority in the priority order;
  • the event attribute extraction processing for the at least one image to be processed is stopped.
  • the image processing apparatus 1 further includes:
  • the output unit 15 is configured to output alarm information when the target monitoring result is that the event to be monitored has not occurred.
  • the image processing device filters the intermediate detection results according to the attributes of the events to be monitored and the attribute filtering conditions, and can filter out the detection results whose attributes do not meet the attribute filtering conditions, and obtain the target monitoring results, which can improve the target monitoring results. 's accuracy.
  • the functions or modules included in the apparatus provided in the embodiments of the present application may be configured to execute the methods described in the above method embodiments, and the specific implementation may refer to the descriptions in the above method embodiments. No longer.
  • FIG. 3 is a schematic diagram of a hardware structure of an image processing apparatus according to an embodiment of the present application.
  • the image processing device 2 includes a processor 21 , a memory 22 , an input device 23 , and an output device 24 .
  • the processor 21, the memory 22, the input device 23, and the output device 24 are coupled through a connector, and the connector includes various types of interfaces, transmission lines, or buses, etc., which are not limited in this embodiment of the present application. It should be understood that, in various embodiments of the present application, coupling refers to mutual connection in a specific manner, including direct connection or indirect connection through other devices, such as various interfaces, transmission lines, and buses.
  • the processor 21 may be one or more graphics processing units (graphics processing units, GPUs).
  • the GPU may be a single-core GPU or a multi-core GPU.
  • the processor 21 may be a processor group composed of multiple GPUs, and the multiple processors are coupled to each other through one or more buses.
  • the processor may also be another type of processor, etc., which is not limited in this embodiment of the present application.
  • the memory 22 may be configured to store computer program instructions, as well as various types of computer program code, including program code configured to execute the solutions of the present application.
  • the memory 22 includes, but is not limited to, random access memory (RAM), read-only memory (read-only memory, ROM), erasable programmable read only memory (erasable programmable read only memory, EPROM), or a portable read-only memory (compact disc read-only memory, CD-ROM), the memory 22 is configured to store relevant instructions and data.
  • the input device 23 is configured to input data and/or signals
  • the output device 24 is configured to output data and/or signals.
  • the input device 23 and the output device 24 may be independent devices or may be an integral device.
  • the memory 22 may be configured not only to store relevant instructions, but also to store relevant data.
  • the memory 22 may be configured to store at least one image to be processed and at least one image obtained through the input device 23 . Attribute filtering conditions, or the memory 22 may also be configured to store the target monitoring results obtained by the processor 21, etc.
  • the embodiment of the present application does not limit the data specifically stored in the memory 22.
  • FIG. 3 only shows a simplified design of an image processing apparatus.
  • the image processing apparatus may also include other necessary elements, including but not limited to any number of input/output devices, processors, memories, etc., and all image processing apparatuses that can implement the embodiments of the present application are included in this application. within the scope of protection of the application.
  • the disclosed system, apparatus and method may be implemented in other manners.
  • the apparatus embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned embodiments it may be implemented in whole or in part by software, hardware, firmware or any combination thereof.
  • software it can be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated.
  • the computer may be a general purpose computer, special purpose computer, computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted over a computer-readable storage medium.
  • the computer instructions can be sent from a website site, computer, server, or data center via wired (eg, coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.) another website site, computer, server or data center for transmission.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes an integration of one or more available media.
  • the available media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, digital versatile disc (DVD)), or semiconductor media (eg, solid state disk (SSD)) Wait.
  • the process can be completed by instructing the relevant hardware by a computer program, and the program can be stored in a computer-readable storage medium.
  • the program When the program is executed , which may include the processes of the foregoing method embodiments.
  • the aforementioned storage medium includes: read-only memory (read-only memory, ROM) or random access memory (random access memory, RAM), magnetic disk or optical disk and other media that can store program codes.
  • Embodiments of the present disclosure disclose an image processing method and device, an electronic device, and a storage medium, wherein the image processing method includes: acquiring at least one image to be processed and at least one attribute filter condition of an event to be monitored; Perform event detection processing on the image to be processed to obtain an intermediate detection result of the event to be monitored; perform event attribute extraction processing on at least one image to be processed to obtain at least one attribute of the event to be monitored; At least one attribute filter condition of the event to obtain the target monitoring result of the event to be monitored.
  • the above solution improves the judgment accuracy of the violation event by correcting the judgment result of the violation event by the computer vision model.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • Molecular Biology (AREA)
  • Data Mining & Analysis (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Databases & Information Systems (AREA)
  • Emergency Management (AREA)
  • Business, Economics & Management (AREA)
  • Medical Informatics (AREA)
  • Geometry (AREA)
  • Automation & Control Theory (AREA)
  • Fuzzy Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Image Analysis (AREA)
  • Alarm Systems (AREA)

Abstract

一种图像处理方法及装置、电子设备及存储介质。该方法包括:获取至少一张待处理图像,以及待监测事件的至少一个属性过滤条件(101);对所述至少一张待处理图像进行事件检测处理,得到所述待监测事件的中间检测结果(102);对所述至少一张待处理图像进行事件属性提取处理,得到所述待监测事件的至少一个属性(103);依据所述中间检测结果、所述至少一个属性和所述待监测事件的至少一个属性过滤条件,得到所述待监测事件的目标监测结果(104)。

Description

图像处理方法及装置、电子设备及存储介质
相关申请的交叉引用
本申请基于申请号为202011043572.X、申请日为2020年09月28日,申请名称为“图像处理方法及装置、电子设备及存储介质”的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此以引入方式结合在本申请中。
技术领域
本申请涉及计算机视觉技术领域,尤其涉及一种图像处理方法及装置、电子设备及存储介质。
背景技术
随着计算视觉技术的快速发展,各种具备不同功能的计算机视觉模型应运而生,电子设备使用计算机视觉模型对图像进行处理,可确定图像中是否有违规事件发生,其中,上述违规事件包括:垃圾满溢、打架斗殴等等。但使用计算机视觉模型对违规事件的判断,得到的判断准确率低。
发明内容
本申请提供一种图像处理方法及装置、电子设备及存储介质。
第一方面,提供了一种图像处理方法,所述方法包括:
获取至少一张待处理图像,以及待监测事件的至少一个属性过滤条件;
对所述至少一张待处理图像进行事件检测处理,得到所述待监测事件的中间检测结果;
对所述至少一张待处理图像进行事件属性提取处理,得到所述待监测事件的至少一个属性;
依据所述中间检测结果、所述至少一个属性和所述待监测事件的至少一个属性过滤条件,得到所述待监测事件的目标监测结果。
结合本申请任一实施方式,所述依据所述待监测事件的中间检测结果、所述至少一个属性和所述待监测事件的至少一个属性过滤条件,得到所述待监测事件的目标监测结果,包括:
在所述中间检测结果为所述至少一张待处理图像中存在所述待监测事件,且所述至少一个属性符合所述至少一个属性过滤条件的情况下,确定所述目标监测结果为所述待监测事件已发生;
在所述中间检测结果为所述至少一张待处理图像中存在所述待监测事件,且所述至少一个属性不符合所述至少一个属性过滤条件的情况下,确定所述目标监测结果为所述待监测事件未发生。
结合本申请任一实施方式,所述对所述至少一张待处理图像进行事件属性提取处理,得到所述待监测事件的至少一个属性,包括:
在所述中间检测结果为所述至少一张待处理图像中存在所述待监测事件的情况下,对所述至少一张待处理图像进行事件属性提取处理,得到所述待监测事件的至少一个属 性。
结合本申请任一实施方式,所述待监测事件包括非法入侵;所述至少一张待处理图像包括第一图像;所述第一图像包含非法入侵区域;
所述对所述至少一张待处理图像进行事件检测处理,得到中间检测结果,包括:
在确定所述非法入侵区域内存在被监测对象的情况下,确定所述中间检测结果为所述第一图像中存在所述非法入侵;所述被监测对象包括以下至少一个:人、非机动车;
在确定所述非法入侵区域内不存在被监测对象的情况下,确定所述中间检测结果为所述第一图像中不存在所述非法入侵。
结合本申请任一实施方式,所述至少一张待处理图像包括第二图像;所述至少一个属性过滤条件包括白名单特征数据库;所述至少一个属性包括所述被监测对象的身份特征;
所述对所述至少一张待处理图像进行事件属性提取处理,得到所述待监测事件的至少一个属性,包括:
对所述第二图像进行身份特征提取处理,得到所述被监测对象的身份特征数据;
所述至少一个属性符合所述至少一个属性过滤条件,包括:所述白名单特征数据库中不存在与所述身份特征数据匹配的特征数据;
所述至少一个属性不符合所述至少一个属性过滤条件,包括:所述白名单特征数据库中存在与所述身份特征数据匹配的特征数据。
结合本申请任一实施方式,所述至少一个属性过滤条件还包括尺寸范围;所述至少一个属性还包括被监测对象的尺寸;
所述对所述至少一张待处理图像进行事件属性提取处理,得到所述待监测事件的至少一个属性,还包括:
对所述第二图像进行对象检测处理,得到所述被监测对象的尺寸;
所述至少一个属性符合所述至少一个属性过滤条件,包括:所述白名单特征数据库中不存在与所述身份特征匹配的特征数据,且所述被监测对象的尺寸处于所述尺寸范围内;
所述至少一个属性不符合所述至少一个属性过滤条件,包括:所述白名单特征数据库中不存在与所述身份特征匹配的特征数据,和/或,所述被监测对象的尺寸处于所述尺寸范围外。
结合本申请任一实施方式,所述至少一张待处理图像包括第三图像和第四图像,所述第三图像的时间戳早于所述第四图像的时间戳;所述至少一个属性过滤条件包括时长阈值;所述至少一个属性包括所述待监测事件的持续时长;
所述对所述至少一张待处理图像进行事件属性提取处理,得到所述待监测事件的至少一个属性,包括:
将所述第三图像的时间戳作为所述待监测事件的起始时间,并将所述第四图像的时间戳作为所述待监测事件的结束时间,得到所述持续时长;
所述至少一个属性符合所述至少一个属性过滤条件,包括:所述持续时长超过所述时长阈值;
所述至少一个属性不符合所述至少一个属性过滤条件,包括:所述持续时长未超过所述时长阈值。
结合本申请任一实施方式,所述待监测事件包括违章停车;所述至少一个属性过滤条件还包括违章停车区域;所述至少一个属性包括被监测车辆的位置;所述第三图像和所述第四图像均包含所述被监测车辆;
所述对所述至少一张待处理图像进行事件属性提取处理,得到所述待监测事件的至 少一个属性,包括:
对所述第三图像进行车辆检测处理,得到所述被监测车辆在所述第三图像中的第一位置;
对所述第四图像进行车辆检测处理,得到所述被监测车辆在所述第四图像中的第二位置;
所述至少一个属性符合所述至少一个属性过滤条件,包括:所述持续时长超过所述时长阈值,且所述第一位置和所述第二位置均位于所述违章停车区域内;
所述至少一个属性不符合所述至少一个属性过滤条件包括以下至少一种情况:所述持续时长未超过所述时长阈值、所述第一位置位于所述违章停车区域外、所述第二位置位于所述违章停车区域外。
结合本申请任一实施方式,所述至少一张待处理图像包括第五图像;所述至少一个属性过滤条件包括置信度阈值;
所述对所述至少一张待处理图像进行事件属性提取处理,得到所述待监测事件的至少一个属性,包括:
对所述第五图像进行对象检测处理,得到所述第五图像中被监测对象的置信度;
所述至少一个属性符合所述至少一个属性过滤条件,包括:所述被监测对象的置信度超过所述置信度阈值;
所述至少一个属性不符合所述至少一个属性过滤条件,包括:所述被监测对象的置信度未超过所述置信度阈值。
结合本申请任一实施方式,所述至少一个属性过滤条件包括报警时间段;
所述对所述至少一张待处理图像进行事件属性提取处理,得到所述待监测事件的至少一个属性,包括:
将第六图像的时间戳作为所述待监测事件的发生时间;所述第六图像为所述至少一张待处理图像中时间戳最晚的图像;
所述至少一个属性符合所述至少一个属性过滤条件,包括:所述待监测事件的发生时间处于所述报警时间段外;
所述至少一个属性不符合所述至少一个属性过滤条件,包括:所述待监测事件的发生时间处于所述报警时间段内。
结合本申请任一实施方式,在所述属性过滤条件的数量超过1的情况下,在所述对所述至少一张待处理图像进行事件属性提取处理,得到所述待监测事件的至少一个属性之前,所述方法还包括:
获取所述过滤条件所对应的待监测事件属性的优先级顺序;
所述对所述至少一张待处理图像进行事件属性提取处理,得到所述待监测事件的至少一个属性,包括:
对所述至少一张待处理图像进行第一属性提取处理,得到所述待监测事件的第一属性;所述第一属性为所述优先级顺序中优先级最高的属性;
在所述第一属性符合所述第一属性所对应的属性过滤条件的情况下,对所述至少一张待处理图像进行第二属性提取处理,得到所述待监测事件的第二属性;所述第二属性为所述优先级顺序中优先级次高的属性;
在所述第一属性不符合所述第一属性所对应的过滤条件的情况下,停止对所述至少一张待处理图像进行事件属性提取处理。
结合本申请任一实施方式,所述方法还包括:
在所述目标监测结果为所述待监测事件未发生的情况下,输出报警信息。
第二方面,提供了一种图像处理装置,所述装置包括:
获取单元,配置为获取至少一张待处理图像,以及待监测事件的至少一个属性过滤条件;
事件检测单元,配置为对所述至少一张待处理图像进行事件检测处理,得到所述待监测事件的中间检测结果;
属性提取单元,配置为对所述至少一张待处理图像进行事件属性提取处理,得到所述待监测事件的至少一个属性;
处理单元,配置为依据所述中间检测结果、所述至少一个属性和所述待监测事件的至少一个属性过滤条件,得到所述待监测事件的目标监测结果。
结合本申请任一实施方式,所述处理单元,配置为:
在所述中间检测结果为所述至少一张待处理图像中存在所述待监测事件,且所述至少一个属性符合所述至少一个属性过滤条件的情况下,确定所述目标监测结果为所述待监测事件已发生;
在所述中间检测结果为所述至少一张待处理图像中存在所述待监测事件,且所述至少一个属性不符合所述至少一个属性过滤条件的情况下,确定所述目标监测结果为所述待监测事件未发生。
结合本申请任一实施方式,所述属性提取单元,配置为:
在所述中间检测结果为所述至少一张待处理图像中存在所述待监测事件的情况下,对所述至少一张待处理图像进行事件属性提取处理,得到所述待监测事件的至少一个属性。
结合本申请任一实施方式,所述待监测事件包括非法入侵;所述至少一张待处理图像包括第一图像;所述第一图像包含非法入侵区域;
所述事件检测单元,配置为:
在确定所述非法入侵区域内存在被监测对象的情况下,确定所述中间检测结果为所述第一图像中存在所述非法入侵;所述被监测对象包括以下至少一个:人、非机动车;
在确定所述非法入侵区域内不存在被监测对象的情况下,确定所述中间检测结果为所述第一图像中不存在所述非法入侵。
结合本申请任一实施方式,所述至少一张待处理图像包括第三图像;所述至少一个属性过滤条件包括白名单特征数据库;所述至少一个属性包括所述被监测对象的身份特征;
所述属性提取单元,配置为:
对所述第二图像进行身份特征提取处理,得到所述被监测对象的身份特征数据;
所述至少一个属性符合所述至少一个属性过滤条件,包括:所述白名单特征数据库中不存在与所述身份特征数据匹配的特征数据;
所述至少一个属性不符合所述至少一个属性过滤条件,包括:所述白名单特征数据库中存在与所述身份特征数据匹配的特征数据。
结合本申请任一实施方式,所述至少一个属性过滤条件还包括尺寸范围;所述至少一个属性还包括被监测对象的尺寸;
所述属性提取单元,配置为:
对所述第二图像进行对象检测处理,得到所述被监测对象的尺寸;
所述至少一个属性符合所述至少一个属性过滤条件,包括:所述白名单特征数据库中不存在与所述身份特征匹配的特征数据,且所述被监测对象的尺寸处于所述尺寸范围内;
所述至少一个属性不符合所述至少一个属性过滤条件,包括:所述白名单特征数据库中不存在与所述身份特征匹配的特征数据,和/或,所述被监测对象的尺寸处于所述尺 寸范围外。
结合本申请任一实施方式,所述至少一张待处理图像包括第三图像和第四图像,所述第三图像的时间戳早于所述第四图像的时间戳;所述至少一个属性过滤条件包括时长阈值;所述至少一个属性包括所述待监测事件的持续时长;
所述属性提取单元,配置为:
将所述第三图像的时间戳作为所述待监测事件的起始时间,并将所述第四图像的时间戳作为所述待监测事件的结束时间,得到所述持续时长;
所述至少一个属性符合所述至少一个属性过滤条件,包括:所述持续时长超过所述时长阈值;
所述至少一个属性不符合所述至少一个属性过滤条件,包括:所述持续时长未超过所述时长阈值。
结合本申请任一实施方式,所述待监测事件包括违章停车;所述至少一个属性过滤条件还包括违章停车区域;所述至少一个属性包括被监测车辆的位置;所述第三图像和所述第四图像均包含所述被监测车辆;
所述属性提取单元,配置为:
对所述第三图像进行车辆检测处理,得到所述被监测车辆在所述第三图像中的第一位置;
对所述第四图像进行车辆检测处理,得到所述被监测车辆在所述第四图像中的第二位置;
所述至少一个属性符合所述至少一个属性过滤条件,包括:所述持续时长超过所述时长阈值,且所述第一位置和所述第二位置均位于所述违章停车区域内;
所述至少一个属性不符合所述至少一个属性过滤条件包括以下至少一种情况:所述持续时长未超过所述时长阈值、所述第一位置位于所述违章停车区域外、所述第二位置位于所述违章停车区域外。
结合本申请任一实施方式,所述至少一张待处理图像包括第五图像;所述至少一个属性过滤条件包括置信度阈值;
所述属性提取单元,配置为:
对所述第五图像进行对象检测处理,得到所述第五图像中被监测对象的置信度;
所述至少一个属性符合所述至少一个属性过滤条件,包括:所述被监测对象的置信度超过所述置信度阈值;
所述至少一个属性不符合所述至少一个属性过滤条件,包括:所述被监测对象的置信度未超过所述置信度阈值。
结合本申请任一实施方式,所述至少一个属性过滤条件包括报警时间段;
所述属性提取单元,配置为:
将所述第六图像的时间戳作为所述待监测事件的发生时间;所述第六图像为所述至少一张待处理图像中时间戳最晚的图像;
所述至少一个属性符合所述至少一个属性过滤条件,包括:所述待监测事件的发生时间处于所述报警时间段外;
所述至少一个属性不符合所述至少一个属性过滤条件,包括:所述待监测事件的发生时间处于所述报警时间段内。
结合本申请任一实施方式,所述获取单元,还配置为在所述属性过滤条件的数量超过1的情况下,在所述对所述至少一张待处理图像进行事件属性提取处理,得到所述待监测事件的至少一个属性之前,获取所述过滤条件所对应的待监测事件属性的优先级顺序;
所述属性提取单元,配置为:
对所述至少一张待处理图像进行第一属性提取处理,得到所述待监测事件的第一属性;所述第一属性为所述优先级顺序中优先级最高的属性;
在所述第一属性符合所述第一属性所对应的属性过滤条件的情况下,对所述至少一张待处理图像进行第二属性提取处理,得到所述待监测事件的第二属性;所述第二属性为所述优先级顺序中优先级次高的属性;
在所述第一属性不符合所述第一属性所对应的过滤条件的情况下,停止对所述至少一张待处理图像进行事件属性提取处理。
结合本申请任一实施方式,所述图像处理装置还包括:
输出单元,配置为在所述目标监测结果为所述待监测事件未发生的情况下,输出报警信息。
第三方面,提供了一种处理器,所述处理器配置为执行如上述第一方面及其任意一种可能实现的方式的方法。
第四方面,提供了一种电子设备,包括:处理器、发送装置、输入装置、输出装置和存储器,所述存储器配置为存储计算机程序代码,所述计算机程序代码包括计算机指令,在所述处理器执行所述计算机指令的情况下,所述电子设备执行如上述第一方面及其任意一种可能实现的方式的方法。
第五方面,提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,所述计算机程序包括程序指令,在所述程序指令被处理器执行的情况下,使所述处理器执行如上述第一方面及其任意一种可能实现的方式的方法。
第六方面,提供了一种计算机程序产品,所述计算机程序产品包括计算机程序或指令,在所述计算机程序或指令在计算机上运行的情况下,使得所述计算机执行上述第一方面及其任一种可能的实现方式的方法。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本申请。
附图说明
为了更清楚地说明本申请实施例或背景技术中的技术方案,下面将对本申请实施例或背景技术中所需要使用的附图进行说明。
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本申请的实施例,并与说明书一起用于说明本申请的技术方案。
图1为本申请实施例提供的一种图像处理方法的流程示意图;
图2为本申请实施例提供的一种图像处理装置的结构示意图;
图3为本申请实施例提供的一种图像处理装置的硬件结构示意图。
具体实施方式
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变 形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其他步骤或单元。
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B。另外,本文中术语“至少一种”表示多种中的任意一种或多种中的至少两种的任意组合,例如,包括A、B、C中的至少一种,可以表示包括从A、B和C构成的集合中选择的任意一个或多个元素。
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。
随着计算视觉技术的快速发展,各种具备不同功能的计算机视觉模型应运而生,例如,人脸识别模型可用于进行人脸识别,物体检测模型可用于检测物体,动作监测模型可用于监测是否发生特定动作。
基于此,电子设备使用计算机视觉模型对图像进行处理,可确定图像中是否有违规事件发生,其中,上述违规事件包括:垃圾满溢、打架斗殴等等。
由于在使用计算机视觉模型对图像进行处理之前,需要对计算机视觉模型进行训练。而计算机视觉模型的训练效果,将直接影响计算机视觉模型对违规事件的判断准确率。
在对计算机视觉模型进行训练的过程中,易出现过拟合和欠拟合的情况。当出现上述两种情况时,训练得到的计算机视觉模型对违规事件的判断准确率低。基于此,本申请实施例提供了一种技术方案,以修正计算机视觉模型对违规事件的判断结果,从而提高对违规事件的判断准确率。
本申请实施例的图像处理方法的执行主体是图像处理装置。可选的,图像处理装置可以是以下中的一种:手机、计算机、服务器、处理器、平板电脑。在一些可能的实现方式中,图像处理方法可以通过处理器调用存储器中存储的计算机可读指令的方式来实现。下面结合本申请实施例中的附图对本申请实施例进行描述。请参阅图1,图1为本申请实施例提供的一种图像处理方法的流程示意图。
101、获取至少一张待处理图像,以及待监测事件的至少一个属性过滤条件。
本申请实施例中,待处理图像可以包含任意内容。例如,待处理图像可以包括道路。又例如,待处理图像可以包括道路和车辆。再例如,待处理图像可以包括人。本申请对待处理图像中的内容不做限定。
在一种获取至少一张待处理图像的实现方式中,图像处理装置接收用户通过输入组件输入的至少一张待处理图像。上述输入组件包括:键盘、鼠标、触控屏、触控板和音频输入器等。
在另一种获取至少一张待处理图像的实现方式中,图像处理装置接收第一终端发送的至少一张待处理图像。可选的,第一终端可以是以下任意一种:手机、计算机、平板电脑、服务器、可穿戴设备。
在又一种获取至少一张待处理图像的实现方式中,图像处理装置与监控摄像头之间具有通信连接。图像处理装置可通过该通信连接接收监控摄像头发送的至少一张待处理图像。可选的,该监控摄像头部署于公路或室内。
在又一种获取至少一张待处理图像的实现方式中,图像处理装置与监控摄像头之间具有通信连接。图像处理装置可通过该通信连接接收监控摄像头发送的视频流,将视频流中的至少一张图像作为至少一张待处理图像。可选的,该监控摄像头部署于公路或室 内。
在又一种获取至少一张待处理图像的实现方式中,图像处理装置可以通过自身的图像采集组件,例如摄像头,直接采集得到至少一张待处理图像。
本申请实施例中,待监测事件可以是任意事件。可选的,待监测事件为违规事件,该待监测事件包括以下至少一个:打架斗殴、人员聚集、垃圾满溢、违章停车。
本申请实施例中,待监测事件的属性过滤条件用于过滤掉误识别事件。待监测事件的属性过滤条件包括:打架斗殴的最少人数、人员聚集的最少人数、垃圾满溢的监测时间、违章停车区域的位置、检测对象的置信度。
例如,打架斗殴至少需要2个人参与,在待监测事件为打架斗殴的情况下,待监测事件的属性过滤条件可以是至少2个人。这样,若图像处理装置使用计算机视觉模型对某一张图像进行处理,得到的处理结果为该图像包含打架斗殴事件,图像处理装置可使用属性过滤条件将该打架斗殴事件过滤掉。
又例如,人员聚集至少需要2个人参与,在待监测事件为人员聚集的情况下,待监测事件的属性过滤条件可以是至少2个人。这样,若图像处理装置使用计算机视觉模型对某一张图像进行处理,得到的处理结果为该图像包含人员聚集事件,图像处理装置可使用属性过滤条件将该人员聚集事件过滤掉。
再例如,处理垃圾满溢的工作人员的工作时间为9:00~20:00,在待监测事件为垃圾满溢的情况下,待监测事件的属性过滤条件可以是9:00~20:00。这样,若图像处理装置使用计算机视觉模型对某一张图像进行处理,得到的处理结果为该图像中包含垃圾满溢事件。而图像处理装置在确定采集该图像的时间处于20:00~9:00内的时候,可将该图像包含垃圾满溢事件过滤掉。
再例如,车辆在违章停车区域内停车时车辆违章停车,而车辆未在违章停车区域内停车时车辆未违章停车。因此,在待监测事件为违章停车的情况下,待监测事件的属性过滤条件可以是违章停车区域的位置。这样,若图像处理装置使用计算机视觉模型对某一张图像进行处理,得到处理结果为该图像中的车辆A违章停车,而在图像处理装置确定车辆A所处的位置处于违章停车区域外的情况下,图像处理装置可确定该图像未包含违章停车事件。
再例如,若待监测事件为行人非法入侵。在计算机视觉模型检测到待处理图像中有待确认对象非法入侵的情况下,图像处理装置对该待处理图像进行对象检测处理,得到该待确认对象的置信度。在该置信度未超过置信度阈值的情况下,图像处理装置确定该待确认对象不是人,因此可确定该待处理图像不包含行人非法入侵事件。
102、对上述至少一张待处理图像进行事件检测处理,得到上述待监测事件的中间检测结果。
本申请实施例中,事件检测处理可通过计算机视觉模型实现。上述计算机视觉模型包括:打架斗殴检测模型、人员聚集检测模型、垃圾满溢检测模型、违章停车检测模型。
本申请实施例中,待监测事件的中间检测结果包括:至少一张待处理图像中存在待监测事件或至少一张待处理图像中不存在待监测事件。图像处理装置使用计算机视觉模型对至少一张待处理图像进行事件检测处理,可得到中间检测结果。
例如,假设计算机视觉模型为打架斗殴检测模型。图像处理装置使用打架斗殴检测模型对图像进行事件检测处理,可确定图像中是否包含打架斗殴事件。
又例如,假设计算机视觉模型为人员聚集检测模型。图像处理装置使用人员聚集检测模型对图像进行事件检测处理,可确定图像中是否包含人员聚集事件。
再例如,假设计算机视觉模型为垃圾满溢检测模型。图像处理装置使用垃圾满溢检测模型对图像进行事件检测处理,可确定图像中是否包含垃圾满溢事件。
再例如,假设计算机视觉模型为违章停车检测模型。图像处理装置使用违章停车检测模型对图像进行事件检测处理,可确定图像中是否包含违章停车事件。
103、对上述至少一张待处理图像进行事件属性提取处理,得到上述待监测事件的至少一个属性。
本申请实施例中,待监测事件的属性包括:人数、发生时间、车辆所在位置、车辆停留的时长。例如,在待监测事件为打架斗殴事件的情况下,待监测事件的至少一个属性包括图像中的人数和人与人之间的距离;在待监测事件为聚集检测事件的情况下,待监测事件的至少一个属性包括图像中的人数;在待监测事件为垃圾满溢事件的情况下,待监测事件的至少一个属性包括图像的采集时间,即垃圾满溢的发生时间;在待监测事件为违章停车事件的情况下,待监测事件的至少一个属性包括图像的车辆所在位置和车辆停留的时长。
在一种对至少一张待处理图像进行事件属性提取处理的实现方式中,将至少一张待处理图像输入至属性提取模型,可得到待监测事件的至少一个属性。属性提取模型可以是,以属性为标注信息的图像作为训练数据,训练得到的卷积神经网络。通过属性提取模型对至少一张待处理图像进行事件属性提取处理,得到待监测事件的至少一个属性。
例如,至少一张待处理图像包括:待处理图像1。通过对属性提取模型对待处理图像1进行时间处理,得到的待监测事件的属性包括:待处理图像1中包含的人数。
又例如,至少一张待处理图像包括:待处理图像1和待处理图像2。通过对属性提取模型对待处理图像1和待处理图像2进行事件属性提取处理,得到的待监测事件的属性包括:待处理图像1中车辆所在的位置、待处理图像2中车辆所在的位置、车辆在待处理图像1和待处理图像2中的停留时长。
再例如,至少一张待处理图像包括:待处理图像1和待处理图像2。通过对属性提取模型对待处理图像1和待处理图像2进行事件属性提取处理,得到的待监测事件的属性包括:待处理图像1中包含的人数、待处理图像1中车辆所在的位置、待处理图像2中车辆所在的位置、车辆在待处理图像1和待处理图像2中的停留时长。
104、依据上述中间检测结果、上述至少一个属性和上述待监测事件的至少一个属性过滤条件,得到上述待监测事件的目标监测结果。
若待监测事件的中间检测结果为至少一张待处理图像中不存在待监测事件,此时,目标监测结果为待监测事件未发生。若待监测事件的中间检测结果为至少一张待处理图像中存在待监测事件,且待监测事件的属性不符合属性过滤条件,表征待监测事件未发生,即计算机视觉模型的检测结果是错误的,此时,目标监测结果为待监测事件未发生。若待监测事件的中间检测结果为至少一张待处理图像中存在待监测事件,且待监测事件的属性符合属性过滤条件,表征待监测事件已发生,即计算机视觉模型的检测结果是正确的,此时,目标监测结果为待监测事件已发生。
作为一种可选的实施方式,在中间检测结果为至少一张待处理图像中存在待监测事件,且至少一个属性符合至少一个属性过滤条件的情况下,图像处理装置确定目标监测结果为待监测事件已发生;在中间检测结果为至少一张待处理图像中存在待监测事件,且至少一个属性不符合至少一个属性过滤条件的情况下,确定目标监测结果为待监测事件未发生。
例如,假设待监测事件为打架斗殴事件,中间检测结果为待处理图像1中包含打架斗殴事件,待监测事件的至少一个属性包括:待处理图像1包含2个人,这2个人之间的距离为3米,属性过滤条件为至少包含2个人,且任意两个人之间的距离小于1米。由于待处理图像1中的2个人之间的距离超过1米,即待监测事件的属性不符合属性过滤条件。因此,图像处理装置确定目标监测结果为,待处理图像1中未发生打架斗殴事 件。
本申请实施例中,图像处理装置依据待监测事件的属性和属性过滤条件,对中间检测结果进行过滤,可过滤掉属性不符合属性过滤条件的检测结果,得到目标监测结果,可提升目标监测结果的准确率。
作为一种可选的实施方式,图像处理装置在执行步骤103的过程中执行以下步骤:
1、在上述中间检测结果为上述至少一张待处理图像中存在上述待监测事件的情况下,对上述至少一张待处理图像进行事件属性提取处理,得到上述待监测事件的至少一个属性。
在本步骤中,图像处理装置先通过执行步骤102得到中间检测结果。在确定中间检测结果为至少一张待处理图像中存在待监测事件的情况下执行步骤103,可减少图像处理装置的数据处理量。
作为一种可选的实施方式,图像处理装置在执行步骤102的过程中执行以下步骤:
2、在上述至少一个属性符合属性过滤条件的情况下,对上述至少一张待处理图像进行事件检测处理,得到上述待监测事件的中间检测结果。
在本步骤中,图像处理装置先通过执行步骤103得到待监测事件的至少一个属性。在确定待监测事件的至少一个属性符合属性过滤条件的情况下执行步骤102,可减少图像处理装置的数据处理量。
例如,假设待监测事件为打架斗殴事件。图像处理装置通过对待处理图像1进行事件属性提取处理,确定待处理图像1中只包含1个人。显然,待处理图像1中不可能存在打架斗殴事件,因此,图像处理装置可不用再执行步骤102。
作为一种可选的实施方式,待监测事件包括非法入侵,至少一张待处理图像包括第一图像,第一图像包含非法入侵区域。图像处理装置在执行步骤102的过程中执行以下步骤:
3、在确定上述非法入侵区域内存在被监测对象的情况下,确定上述中间检测结果为上述第一图像中存在上述非法入侵。
本申请实施例中,非法入侵包括以下至少一个:非机动车非法入侵、行人非法入侵。被监测对象包括以下至少一个:人、非机动车。非法入侵区域包括:高速公路区域、机动车行驶区域、特定区域。
例如,行人非法入侵指行人进入高速公路区域时易发生安全事故。因此在待监测事件为行人非法入侵的情况下,非法入侵区域包括高速公路区域。
又例如,非机动车非法入侵指非机动车进入机动车行驶区域时易发生安全事故。因此在待监测事件为非机动车非法入侵的情况下,非法入侵区域包括机动车行驶区域。
再例如,A会议室内正在召开会议,该会议的参会人员均为主办方邀请的,且该会议不允许参会人员之外的人员进入A会议室。因此在待监测事件为访客非法入侵的情况下,非法入侵区域包括A会议室。即A会议室为上述特定区域。
若图像处理装置通过对第一图像进行事件检测处理,确定非法入侵区域内存在被监测对象,表征被监测对象已发生非法入侵行为;若图像处理装置通过对第一图像进行事件检测处理,确定非法入侵区域内存在被监测对象,表征被监测对象未发生非法入侵行为。
因此,在确定非法入侵区域内存在被监测对象的情况下,图像处理装置确定中间检测结果为第一图像中存在非法入侵;在确定非法入侵区域内不存在被监测对象的情况下,图像处理装置确定中间检测结果为第一图像中不存在非法入侵。
例如,第一图像由道路上的监控摄像头采集。由于道路上的监控摄像头的监控区域固定,可在监控摄像头的监控区域内,确定与道路上的非机动非法入侵区域对应的区域, 作为非法入侵区域,例如,在监控摄像头部署于高速道路上的情况下,可将监控区域内的高速道路区域作为非法入侵区域。这样,图像处理装置可通过对第一图像进行事件检测处理,确定非机动车非法入侵区域内是否存在非机动车,进而得到检测结果。
作为一种可选的实施方式,至少一张待处理图像包括第二图像,至少一个属性过滤条件包括白名单特征数据库,至少一个属性包括被监测对象的身份特征。图像处理装置在执行步骤103的过程中执行以下步骤:
4、对上述第二图像进行身份特征提取处理,得到上述被监测对象的身份特征数据。
本步骤适用于上述特定区域内的非法入侵。白名单特征数据库包括白名单人物的人脸特征数据和/或白名单的人体特征数据。白名单为允许进入特定区域的人物。例如,特定区域为会场,白名单包括会议参会人员;特定区域为公司办公区域,白名单包括公司员工。
本申请实施例中,身份特征数据包括以下至少一个:人脸特征数据、人体特征数据。其中,人体特征数据携带图像中的人物的身份信息。
人体特征数据携带的人物的身份信息包括:人物的服饰属性、外貌特征和变化特征。服饰属性包括所有装饰人体的物品的特征中的至少一种(如上衣颜色、裤子颜色、裤子长度、帽子款式、鞋子颜色、打不打伞、箱包类别、有无口罩、口罩颜色)。外貌特征包括体型、性别、发型、发色、年龄段、是否戴眼镜、胸前是否抱东西。变化特征包括:姿态、步幅。
举例来说,上衣颜色或裤子颜色或鞋子颜色或发色的类别包括:黑色、白色、红色、橙色、黄色、绿色、蓝色、紫色、棕色。裤子长度的类别包括:长裤、短裤、裙子。帽子款式的类别包括:无帽子、棒球帽、鸭舌帽、平沿帽、渔夫帽、贝雷帽、礼帽。打不打伞的类别包括:打伞、未打伞。发型的类别包括:披肩长发、短发、光头、秃头。姿态类别包括:骑行姿态、站立姿态、行走姿态、奔跑姿态、睡卧姿态、平躺姿态。步幅指人物行走时的步幅大小,步幅大小可以用长度表示,如:0.3米、0.4米、0.5米、0.6米。
在该种实施方式中,图像处理装置通过将身份特征数据与白名单特征数据库中的特征数据进行比对,确定白名单特征数据库中是否存在与身份特征数据匹配的特征数据,来判断至少一个属性是否符合至少一个属性过滤条件。
具体的,图像处理装置确定白名单特征数据中不存在与身份特征数据匹配的特征数据,表征上述被监测对象不属于白名单,此时,图像处理装置可确定至少一个属性符合至少一个属性过滤条件;图像处理装置确定白名单特征数据中存在与身份特征数据匹配的特征数据,表征上述被监测对象属于白名单,此时,图像处理装置可确定至少一个属性不符合至少一个属性过滤条件。
图像处理装置通过将白名单特征数据库作为属性过滤条件,可减少误判,提升目标监测结果的准确率。
作为一种可选的实施方式,至少一个属性过滤条件还包括尺寸范围,至少一个属性还包括被监测对象的尺寸。图像处理装置在执行步骤103的过程中还执行以下步骤:
5、对上述第二图像进行对象检测处理,得到上述被监测对象的尺寸。
本申请实施例中,待监测对象的尺寸为待监测对象在图像中的尺寸。例如,假设待监测对象为人。待监测对象的尺寸可以是人在图像中所覆盖的像素点区域的长度。又例如,假设待监测对象为车辆。待监测对象的尺寸可以是车辆在图像中所覆盖的像素点区域的宽度。
由于在某些场景下,采集待处理图像的摄像头的位置是固定的,这样,在通过该摄像头采集到的图像中,被监测对象的尺寸是处于一个固定范围内的,本申请实施例中, 将该固定范围称为尺寸范围。
例如,在通过路口的监控摄像头采集到的图像中,人的高度最小为5个像素点、最大为15个像素点,此时,高度范围为[5,15]。又例如,在通过路口的监控摄像头采集到的图像中,车辆的宽度最小为10个像素点、最大为20个像素点,此时,尺寸范围为[10,20]。
图像处理装置通过对第二图像进行对象检测处理,可得到被监测对象在第二图像中的尺寸。例如,在被监测对象为人的情况下,图像处理装置通过对第二图像进行人物检测处理,可得到包含人的人物框,进而可依据人物框的尺寸得到人在第二图像中的尺寸。又例如,在被监测对象为人车辆的情况下,图像处理装置通过对第二图像进行车辆检测处理,可得到包含车辆的车辆框,进而可依据车辆框的尺寸得到车辆在第二图像中的尺寸。
在该种实施方式中,图像处理装置通过将身份特征数据与白名单特征数据库中的特征数据进行比对,确定白名单特征数据库中是否存在与身份特征数据匹配的特征数据,以及判断被监测对象的尺寸是否处于尺寸范围内,来判断至少一个属性是否符合至少一个属性过滤条件。
具体的,图像处理装置确定白名单特征数据中不存在与身份特征数据匹配的特征数据,且被监测对象的尺寸处于尺寸范围内,表征上述被监测对象不属于白名单,此时,图像处理装置可确定至少一个属性符合至少一个属性过滤条件;
图像处理装置确定白名单特征数据中存在与身份特征数据匹配的特征数据,且被监测对象的尺寸处于尺寸范围内,表征上述被监测对象属于白名单,此时,图像处理装置可确定至少一个属性不符合至少一个属性过滤条件;
图像处理装置确定白名单特征数据中不存在与身份特征数据匹配的特征数据,且被监测对象的尺寸处于尺寸范围外,表征上述被监测对象属于白名单,此时,图像处理装置可确定至少一个属性不符合至少一个属性过滤条件;
图像处理装置确定白名单特征数据中不存在与身份特征数据匹配的特征数据,且被监测对象的尺寸处于尺寸范围外,表征上述被监测对象属于白名单,此时,图像处理装置可确定至少一个属性不符合至少一个属性过滤条件。
本实施方式中,图像处理装置依据被监测对象的尺寸和尺寸范围,判断待监测事件的属性是否符合属性过滤条件,可提升目标监测结果的准确率。
作为一种可选的实施方式,至少一张待处理图像包括第三图像和第四图像,其中,第三图像的时间戳早于第四图像的时间戳。至少一个属性过滤条件包括时长阈值,至少一个属性包括待监测事件的持续时长。图像处理装置在执行步骤103的过程中执行以下步骤:
6、将上述第三图像的时间戳作为上述待监测事件的起始时间,并将上述第四图像的时间戳作为上述待监测事件的结束时间,得到上述持续时长。
例如,假设待监测事件为违章停车。图像处理装置通过对第三图像进行事件检测处理确定第三图像中的车辆A处于违章停车区域内,通过对第四图像进行事件检测处理确定第三图像中的车辆A处于违章停车区域内。图像处理装置进而确定车辆A违章停车的持续时长为第三图像的采集时间至第四图像的采集时间。即第三图像的时间戳为车辆A违章停车的起始时间,第四图像的时间戳为车辆A违章停车的结束时间。
应理解,本申请实施例中的第三图像和第四图像仅为示例,在实际处理中,图像处理装置可依据至少两张待处理图像,得到待监测事件的持续时长。
在该种实施方式中,图像处理装置通过将待监测事件的持续时长与时长阈值进行比较,确定待监测事件的持续时长是否超过时长阈值,来判断至少一个属性是否符合至少 一个属性过滤条件。
具体的,图像处理装置确定持续时长超过时长阈值,表征至少一个属性符合至少一个属性过滤条件;图像处理装置确定持续时长未超过时长阈值,表征至少一个属性不符合至少一个属性过滤条件。
可选的,图像处理装置还可通过对至少一张待处理图像进行对象检测处理,得到待监测事件中的监测对象所处的位置,作为待监测事件的至少一个属性。
例如,待监测事件为电动车非法进入居民楼。图像处理装置通过对第三图像和第四图像进行电动车检测处理,得到电动车在第三图像中的位置以及电动车在第四图像中的位置。在电动车在第三图像中的位置和电动车在第四图像中的位置均处于居民楼区域内,且电动车处于居民楼内的持续时长超过时长阈值的情况下,图像处理装置确定至少一个属性符合至少一个属性过滤条件;除此之外的情况,图像处理装置均视至少一个属性不符合至少一个属性过滤条件。
又例如,待监测事件为工地上未佩戴安全帽。图像处理装置通过对第三图像和第四图像进行电动车检测处理,得到人在第三图像中的位置以及人在第四图像中的位置。在人在第三图像中的位置和人在第四图像中的位置均处于工地区域内,且人处于工地内的持续时长超过时长阈值的情况下,图像处理装置确定至少一个属性符合至少一个属性过滤条件;除此之外的情况,图像处理装置均视至少一个属性不符合至少一个属性过滤条件。
再例如,待监测事件为加油站内打电话。图像处理装置通过对第三图像和第四图像进行电动车检测处理,得到人在第三图像中的位置以及人在第四图像中的位置。在人在第三图像中的位置和人在第四图像中的位置均处于加油站区域内,且人处于加油站内的持续时长超过时长阈值的情况下,图像处理装置确定至少一个属性符合至少一个属性过滤条件;除此之外的情况,图像处理装置均视至少一个属性不符合至少一个属性过滤条件。
作为一种可选的实施方式,待监测事件包括违章停车,至少一个属性过滤条件还包括违章停车区域,至少一个属性包括被监测车辆的位置,第三图像和第四图像均包含上述被监测车辆。图像处理装置在执行步骤103的过程中还执行以下步骤:
7、对上述第三图像进行车辆检测处理,得到上述被监测车辆在上述第三图像中的第一位置。
本申请实施例中,被监测车辆在图像中的位置可以是包含被监测车辆的车辆框在图像的像素坐标系下的位置。例如,被监测车辆在图像中的位置可以是,包含被监测车辆的车辆框的对角坐标在像素坐标系下的坐标。
图像处理装置通过对第三图像进行车辆检测处理,可得到被监测车辆在第三图像中的位置,即第一位置。
8、对上述第四图像进行车辆检测处理,得到上述被监测车辆在上述第四图像中的第二位置。
图像处理装置通过对第三图像进行车辆检测处理,可得到被监测车辆在第三图像中的位置,即第二位置。
在该种实施方式中,图像处理装置通过待监测事件的持续时长与时长阈值进行比较,确定待监测事件的持续时长是否超过时长阈值,以及判断被监测车辆的位置是否处于违章停车区域内,来判断至少一个属性是否符合至少一个属性过滤条件。
具体的,图像处理装置确定持续时长超过时长阈值,且第一位置和第二位置均位于违章停车区域内,表征至少一个属性符合至少一个属性过滤条件。
图像处理装置在确定以下至少一种情况发生的情况下,确定至少一个属性不符合至 少一个属性过滤条件:持续时长未超过时长阈值、第一位置位于违章停车区域外、第二位置位于违章停车区域外,具体的:
图像处理装置确定持续时长未超过时长阈值,且第一位置和第二位置均位于违章停车区域内,表征至少一个属性不符合至少一个属性过滤条件;
图像处理装置确定持续时长未超过时长阈值,且第一位置位于违章停车区域外、第二位置均位于违章停车区域内,表征至少一个属性不符合至少一个属性过滤条件;
图像处理装置确定持续时长未超过时长阈值,且第一位置位于违章停车区域内、第二位置均位于违章停车区域外,表征至少一个属性不符合至少一个属性过滤条件;
图像处理装置确定持续时长超过时长阈值,且第一位置和第二位置均位于违章停车区域外,表征至少一个属性不符合至少一个属性过滤条件;
图像处理装置确定持续时长未超过时长阈值,且第一位置和第二位置均位于违章停车区域外,表征至少一个属性不符合至少一个属性过滤条件。
作为一种可选的实施方式,至少一张待处理图像包括第五图像,至少一个属性过滤条件包括置信度阈值。图像处理装置在执行步骤103的过程中还执行以下步骤:
9、对上述第五图像进行对象检测处理,得到上述第五图像中被监测对象的置信度。
本步骤中,被监测对象可以是人或物。被监测对象的置信度表征被监测对象的可信度。例如,在被监测对象为人的情况下,被监测对象的置信度表征第五图像中的被监测对象为人的概率;在被监测对象为车的情况下,被监测对象的置信度表征第五图像中的被监测对象为车的概率。
在该种实施方式中,图像处理装置通过将被监测对象的置信度与置信度阈值进行比较,确定图像中的被监测对象是否可信,来判断至少一个属性是否符合至少一个属性过滤条件。
具体的,图像处理装置确定被监测对象的置信度超过置信度阈值,表征至少一个属性符合至少一个属性过滤条件;图像处理装置确定被监测对象的置信度未超过置信度阈值,表征至少一个属性不符合至少一个属性过滤条件。
作为一种可选的实施方式,至少一张待处理图像包括第六图像,至少一个属性过滤条件包括报警时间段。图像处理装置在执行步骤103的过程中还执行以下步骤:
10、将上述第六图像的时间戳作为上述待监测事件的发生时间。
本申请实施例中,第六图像为至少一张待处理图像中时间戳最晚的图像。报警时间段为图像处理装置在确定待监测事件发生的情况下进行报警的时间段。例如,待监测事件为垃圾满溢。图像处理装置在确定垃圾满溢事件已发生的情况下,通过输出报警信息提醒工作人员及时清理垃圾。但是在每天的23:00~4:00为工作人员的下班时间,显然在这段时间内输出报警信息是不合理的,因此,可将这段时间作为报警时间段。
在该种实施方式中,图像处理装置通过判断待监测事件的发生时间是否处于报警时间段内,确定至少一个属性是否符合至少一个属性过滤条件。
具体的,图像处理装置确定待监测事件的发生时间处于报警时间段外,表征至少一个属性符合至少一个属性过滤条件;图像处理装置确定待监测事件的发生时间处于报警时间段内,表征至少一个属性不符合至少一个属性过滤条件。
作为一种可选的实施方式,在属性过滤条件的数量超过1的情况下,在执行步骤103之前,图像处理装置还执行以下步骤:
11、获取上述过滤条件所对应的待监测事件属性的优先级顺序。
本申请实施例中,优先级越高的待监测事件属性,从待处理图像中提取出该属性所需的数据处理量越小。例如,图像处理装置从图像中获取图像的时间戳所需的数据处理量,比从图像中提取出车辆所在的位置所需的数据处理量小。因此,对待监测事件而言, 持续时长这个属性的优先级比车辆的位置这个属性的优先级要高。
在一种获取待监测事件属性的优先级顺序的实现方式中,图像处理装置接收用户通过输入组件输入的优先级顺序,作为待监测事件属性的优先级顺序。上述输入组件包括:键盘、鼠标、触控屏、触控板和音频输入器等。
在另一种获取待监测事件属性的优先级顺序的实现方式中,图像处理装置接收第二终端发送的优先级顺序,作为待监测事件属性的优先级顺序。可选的,第二终端可以是以下任意一种:手机、计算机、平板电脑、服务器、可穿戴设备。第二终端与第一终端可以是同一终端,也可以是不同终端。
在执行完步骤11之后,图像处理装置在执行步骤103的过程中执行以下步骤:
12、对上述至少一张待处理图像进行第一属性提取处理,得到上述待监测事件的第一属性。
本申请实施例中,第一属性为优先级顺序中优先级最高的属性。例如(例1),待监测事件为违章停车。待监测事件的属性包括:持续时长、车辆的位置、车辆的尺寸。假设待监测事件属性的优先级顺序中,优先级最高的属性为持续时长,优先级次高的属性为车辆的尺寸,优先级最低的属性为车辆的位置。
在本步骤中,图像处理装置首先通过对至少一张待处理图像进行第一属性提取处理,得到待监测事件的第一属性。例如,在例1中,图像处理装置首先获取至少一张待处理图像的时间戳。
13、在上述第一属性符合上述第一属性所对应的属性过滤条件的情况下,对上述至少一张待处理图像进行第二属性提取处理,得到上述待监测事件的第二属性。
本申请实施例中,第二属性为优先级顺序中优先级次高的属性。例如,在例1中,第二属性为车辆的尺寸。
图像处理装置在得到第一属性后,判断第一属性是否符合至少一个属性过滤条件中第一属性所对应的属性过滤条件。在第一属性符合第一属性所对应的属性过滤条件的情况下,图像处理装置对至少一张待处理图像进行第二属性提取处理,得到待监测事件的第二属性。
以例1为例,图像处理装置在确定车辆停止的持续时长超过时长阈值的情况下,对至少一张待处理图像进行车辆检测处理,得到车辆在待处理图像中的位置。
14、在上述第一属性不符合第一属性所对应的过滤条件的情况下,停止对上述至少一张待处理图像进行事件属性提取处理。
若第一属性不符合第一属性所对应的属性过滤条件,表征待监测的至少一个属性不符合至少一个属性过滤条件。因此,图像处理装置不用再继续从至少一张待处理图像中提取除第一属性之外的属性,这样可减少数据处理量。
可选的,若第二属性符合第二属性所对应的属性过滤条件,对至少一张待处理图像进行第三属性提取处理,得到待监测事件的第三属性。图像处理装置再判断第三属性是否符合第三属性所对应的属性过滤条件,不断循环直到某个属性不符合该属性所对应的属性过滤条件,图像处理装置停止执行属性提取处理。或者,图像处理装置再判断第三属性是否符合第三属性所对应的属性过滤条件,不断循环直到提取出待监测事件的所有属性。
本申请实施例中,图像处理装置在优先级高的属性符合属性过滤条件的情况下,从至少一张待处理图像中提取优先级次高的属性,可减少数据处理量,提高处理速度。
作为一种可选的实施方式,图像处理装置在确定目标监测结果为待监测事件未发生的情况下,输出报警信息,其中,报警信息包括以下至少一个:文字、声音、光线、震动、气味、指令、低电流刺激。例如,图像处理装置可通过向终端发送报警指令,该报 警指令用于指示终端输出告警信息。
基于本申请实施例提供的技术方案,本申请实施例还提供了几种可能的应用场景。
场景1:聚众扰乱社会秩序罪,是指聚众扰乱社会秩序,情节严重,致工作、生产、营业、教学、科研和医疗无法进行,造成严重损失的行为。随着越监控摄像头的增多,相关电子设备可通过对监控摄像头采集到的视频流进行处理,确定是否有人员聚集的事件发生,进而可减少公共安全事故的发生。
例如,A地的执法中心有一台服务器,该服务器与A地的监控摄像头之间具有通信连接。服务器通过该通信连接可获取到监控摄像头采集到的视频流。服务器使用计算机视觉模型对该视频流中的图像进行处理,可得到中间检测结果。服务器通过对视频流中的图像进行属性提取处理,可得到图像中的人数。
假设待监测事件的属性过滤条件为至少5人,即不将人数未超过5的情况视为人员聚集事件。那么服务器将基于上述技术方案,依据图像中的人数和中间检测结果,得到目标监测结果。
在目标监测结果为有人员聚集事件发生的情况下,服务器可向相关管理人员的终端发送包含告警指令,以提示相关管理人员有人员聚集事件发生。可选的,该告警指令携带人员聚集事件发生的地点和时间。
场景2:某停车场只允许属于车辆白名单的车辆停车,而不属于白名单的车辆进入该停车场属于非法入侵。通过在该停车场入口处安装监控摄像头,并将该监控摄像头采集到的视频流发送至服务器。服务器使用计算机视觉模型对该视频流进行处理,确定是否有车辆进入该停车场,得到中间检测结果。服务器并对该视频流进行属性提取处理,得到进入该停车场的车辆的车牌号码。
假设车辆白名单包括至少一个车牌号码。在中间检测结果为有车辆进入该停车场,且车辆白名单内不存在与该车辆的车辆牌号匹配的车辆号码的情况下,服务器确定该车辆非法入侵。进而可向相关管理人员的终端发送包含告警指令,以提示相关管理人员有车辆非法入侵停车场。可选的,该告警指令携带非法入侵车辆的车牌号码。
本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的撰写顺序并不意味着严格的执行顺序而对实施过程构成任何限定,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。
上述详细阐述了本申请实施例的方法,下面提供了本申请实施例的装置。
请参阅图2,图2为本申请实施例提供的一种图像处理装置的结构示意图,该图像处理装置1包括:获取单元11、事件检测单元12、属性提取单元13、处理单元14、
获取单元11,配置为获取至少一张待处理图像,以及待监测事件的至少一个属性过滤条件;
事件检测单元12,配置为对所述至少一张待处理图像进行事件检测处理,得到所述待监测事件的中间检测结果;
属性提取单元13,配置为对所述至少一张待处理图像进行事件属性提取处理,得到所述待监测事件的至少一个属性;
处理单元14,配置为依据所述中间检测结果、所述至少一个属性和所述待监测事件的至少一个属性过滤条件,得到所述待监测事件的目标监测结果。
结合本申请任一实施方式,所述处理单元14,配置为:
在所述中间检测结果为所述至少一张待处理图像中存在所述待监测事件,且所述至少一个属性符合所述至少一个属性过滤条件的情况下,确定所述目标监测结果为所述待监测事件已发生;
在所述中间检测结果为所述至少一张待处理图像中存在所述待监测事件,且所述至 少一个属性不符合所述至少一个属性过滤条件的情况下,确定所述目标监测结果为所述待监测事件未发生。
结合本申请任一实施方式,所述属性提取单元13,配置为:
在所述中间检测结果为所述至少一张待处理图像中存在所述待监测事件的情况下,对所述至少一张待处理图像进行事件属性提取处理,得到所述待监测事件的至少一个属性。
结合本申请任一实施方式,所述待监测事件包括非法入侵;所述至少一张待处理图像包括第一图像;所述第一图像包含非法入侵区域;
所述事件检测单元12,配置为:
在确定所述非法入侵区域内存在被监测对象的情况下,确定所述中间检测结果为所述第一图像中存在所述非法入侵;所述被监测对象包括以下至少一个:人、非机动车;
在确定所述非法入侵区域内不存在被监测对象的情况下,确定所述中间检测结果为所述第一图像中不存在所述非法入侵。
结合本申请任一实施方式,所述至少一张待处理图像包括第二图像;所述至少一个属性过滤条件包括白名单特征数据库;所述至少一个属性包括所述被监测对象的身份特征;
所述属性提取单元13,配置为:
对所述第二图像进行身份特征提取处理,得到所述被监测对象的身份特征数据;
所述至少一个属性符合所述至少一个属性过滤条件,包括:所述白名单特征数据库中不存在与所述身份特征数据匹配的特征数据;
所述至少一个属性不符合所述至少一个属性过滤条件,包括:所述白名单特征数据库中存在与所述身份特征数据匹配的特征数据。
结合本申请任一实施方式,所述至少一个属性过滤条件还包括尺寸范围;所述至少一个属性还包括被监测对象的尺寸;
所述属性提取单元13,配置为:
对所述第二图像进行对象检测处理,得到所述被监测对象的尺寸;
所述至少一个属性符合所述至少一个属性过滤条件,包括:所述白名单特征数据库中不存在与所述身份特征匹配的特征数据,且所述被监测对象的尺寸处于所述尺寸范围内;
所述至少一个属性不符合所述至少一个属性过滤条件,包括:所述白名单特征数据库中不存在与所述身份特征匹配的特征数据,和/或,所述被监测对象的尺寸处于所述尺寸范围外。
结合本申请任一实施方式,所述至少一张待处理图像包括第三图像和第四图像,所述第三图像的时间戳早于所述第四图像的时间戳;所述至少一个属性过滤条件包括时长阈值;所述至少一个属性包括所述待监测事件的持续时长;
所述属性提取单元13,配置为:
将所述第三图像的时间戳作为所述待监测事件的起始时间,并将所述第四图像的时间戳作为所述待监测事件的结束时间,得到所述持续时长;
所述至少一个属性符合所述至少一个属性过滤条件,包括:所述持续时长超过所述时长阈值;
所述至少一个属性不符合所述至少一个属性过滤条件,包括:所述持续时长未超过所述时长阈值。
结合本申请任一实施方式,所述待监测事件包括违章停车;所述至少一个属性过滤条件还包括违章停车区域;所述至少一个属性包括被监测车辆的位置;所述第三图像和 所述第四图像均包含所述被监测车辆;
所述属性提取单元13,配置为:
对所述第三图像进行车辆检测处理,得到所述被监测车辆在所述第三图像中的第一位置;
对所述第四图像进行车辆检测处理,得到所述被监测车辆在所述第四图像中的第二位置;
所述至少一个属性符合所述至少一个属性过滤条件,包括:所述持续时长超过所述时长阈值,且所述第一位置和所述第二位置均位于所述违章停车区域内;
所述至少一个属性不符合所述至少一个属性过滤条件包括以下至少一种情况:所述持续时长未超过所述时长阈值、所述第一位置位于所述违章停车区域外、所述第二位置位于所述违章停车区域外。
结合本申请任一实施方式,所述至少一张待处理图像包括第五图像;所述至少一个属性过滤条件包括置信度阈值;
所述属性提取单元13,配置为:
对所述第五图像进行对象检测处理,得到所述第五图像中被监测对象的置信度;
所述至少一个属性符合所述至少一个属性过滤条件,包括:所述被监测对象的置信度超过所述置信度阈值;
所述至少一个属性不符合所述至少一个属性过滤条件,包括:所述被监测对象的置信度未超过所述置信度阈值。
结合本申请任一实施方式,所述至少一个属性过滤条件包括报警时间段;
所述属性提取单元13,配置为:
将第六图像的时间戳作为所述待监测事件的发生时间;所述第六图像为所述至少一张待处理图像中时间戳最晚的图像;
所述至少一个属性符合所述至少一个属性过滤条件,包括:所述待监测事件的发生时间处于所述报警时间段外;
所述至少一个属性不符合所述至少一个属性过滤条件,包括:所述待监测事件的发生时间处于所述报警时间段内。
结合本申请任一实施方式,所述获取单元11,还配置为在所述属性过滤条件的数量超过1的情况下,在所述对所述至少一张待处理图像进行事件属性提取处理,得到所述待监测事件的至少一个属性之前,获取所述过滤条件所对应的待监测事件属性的优先级顺序;
所述属性提取单元13,配置为:
对所述至少一张待处理图像进行第一属性提取处理,得到所述待监测事件的第一属性;所述第一属性为所述优先级顺序中优先级最高的属性;
在所述第一属性符合所述第一属性所对应的属性过滤条件的情况下,对所述至少一张待处理图像进行第二属性提取处理,得到所述待监测事件的第二属性;所述第二属性为所述优先级顺序中优先级次高的属性;
在所述第一属性不符合所述第一属性所对应的过滤条件的情况下,停止对所述至少一张待处理图像进行事件属性提取处理。
结合本申请任一实施方式,所述图像处理装置1还包括:
输出单元15,配置为在所述目标监测结果为所述待监测事件未发生的情况下,输出报警信息。
本申请实施例中,图像处理装置依据待监测事件的属性和属性过滤条件,对中间检测结果进行过滤,可过滤掉属性不符合属性过滤条件的检测结果,得到目标监测结果, 可提升目标监测结果的准确率。
在一些实施例中,本申请实施例提供的装置具有的功能或包含的模块可以配置为执行上文方法实施例描述的方法,其具体实现可以参照上文方法实施例的描述,为了简洁,这里不再赘述。
图3为本申请实施例提供的一种图像处理装置的硬件结构示意图。该图像处理装置2包括处理器21,存储器22,输入装置23,输出装置24。该处理器21、存储器22、输入装置23和输出装置24通过连接器相耦合,该连接器包括各类接口、传输线或总线等等,本申请实施例对此不作限定。应当理解,本申请的各个实施例中,耦合是指通过特定方式的相互联系,包括直接相连或者通过其他设备间接相连,例如可以通过各类接口、传输线、总线等相连。
处理器21可以是一个或多个图形处理器(graphics processing unit,GPU),在处理器21是一个GPU的情况下,该GPU可以是单核GPU,也可以是多核GPU。可选的,处理器21可以是多个GPU构成的处理器组,多个处理器之间通过一个或多个总线彼此耦合。可选的,该处理器还可以为其他类型的处理器等等,本申请实施例不作限定。
存储器22可配置为存储计算机程序指令,以及配置为执行本申请方案的程序代码在内的各类计算机程序代码。可选地,存储器22包括但不限于是随机存储记忆体(random access memory,RAM)、只读存储器(read-only memory,ROM)、可擦除可编程只读存储器(erasable programmable read only memory,EPROM)、或便携式只读存储器(compact disc read-only memory,CD-ROM),该存储器22配置为存储相关指令及数据。
输入装置23配置为输入数据和/或信号,以及输出装置24配置为输出数据和/或信号。输入装置23和输出装置24可以是独立的器件,也可以是一个整体的器件。
可理解,本申请实施例中,存储器22不仅可配置为存储相关指令,还可配置为存储相关数据,如该存储器22可配置为存储通过输入装置23获取的至少一张待处理图像和至少一个属性过滤条件,又或者该存储器22还可配置为存储通过处理器21得到的目标监测结果等等,本申请实施例对于该存储器22中具体所存储的数据不作限定。
可以理解的是,图3仅仅示出了一种图像处理装置的简化设计。在实际应用中,图像处理装置还可以分别包含必要的其他元件,包含但不限于任意数量的输入/输出装置、处理器、存储器等,而所有可以实现本申请实施例的图像处理装置都在本申请的保护范围之内。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。所属领域的技术人员还可以清楚地了解到,本申请各个实施例描述各有侧重,为描述的方便和简洁,相同或类似的部分在不同实施例中可能没有赘述,因此,在某一实施例未描述或未详细描述的部分可以参见其他实施例的记载。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一 点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者通过所述计算机可读存储介质进行传输。所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如,数字通用光盘(digital versatile disc,DVD))、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:只读存储器(read-only memory,ROM)或随机存储存储器(random access memory,RAM)、磁碟或者光盘等各种可存储程序代码的介质。
工业实用性
本公开实施例公开了一种图像处理方法及装置、电子设备及存储介质,其中,图像处理方法包括:获取至少一张待处理图像,以及待监测事件的至少一个属性过滤条件;对至少一张待处理图像进行事件检测处理,得到待监测事件的中间检测结果;对至少一张待处理图像进行事件属性提取处理,得到待监测事件的至少一个属性;依据中间检测结果、至少一个属性和待监测事件的至少一个属性过滤条件,得到待监测事件的目标监测结果。上述方案通过修正计算机视觉模型对违规事件的判断结果,从而提高对违规事件的判断准确率。

Claims (16)

  1. 一种图像处理方法,所述方法包括:
    获取至少一张待处理图像,以及待监测事件的至少一个属性过滤条件;
    对所述至少一张待处理图像进行事件检测处理,得到所述待监测事件的中间检测结果;
    对所述至少一张待处理图像进行事件属性提取处理,得到所述待监测事件的至少一个属性;
    依据所述中间检测结果、所述至少一个属性和所述待监测事件的至少一个属性过滤条件,得到所述待监测事件的目标监测结果。
  2. 根据权利要求1所述的方法,其中,所述依据所述待监测事件的中间检测结果、所述至少一个属性和所述待监测事件的至少一个属性过滤条件,得到所述待监测事件的目标监测结果,包括:
    在所述中间检测结果为所述至少一张待处理图像中存在所述待监测事件,且所述至少一个属性符合所述至少一个属性过滤条件的情况下,确定所述目标监测结果为所述待监测事件已发生;
    在所述中间检测结果为所述至少一张待处理图像中存在所述待监测事件,且所述至少一个属性不符合所述至少一个属性过滤条件的情况下,确定所述目标监测结果为所述待监测事件未发生。
  3. 根据权利要求1或2所述的方法,其中,所述对所述至少一张待处理图像进行事件属性提取处理,得到所述待监测事件的至少一个属性,包括:
    在所述中间检测结果为所述至少一张待处理图像中存在所述待监测事件的情况下,对所述至少一张待处理图像进行事件属性提取处理,得到所述待监测事件的至少一个属性。
  4. 根据权利要求3所述的方法,其中,所述待监测事件包括非法入侵;所述至少一张待处理图像包括第一图像;所述第一图像包含非法入侵区域;
    所述对所述至少一张待处理图像进行事件检测处理,得到中间检测结果,包括:
    在确定所述非法入侵区域内存在被监测对象的情况下,确定所述中间检测结果为所述第一图像中存在所述非法入侵;所述被监测对象包括以下至少一个:人、非机动车;
    在确定所述非法入侵区域内不存在被监测对象的情况下,确定所述中间检测结果为所述第一图像中不存在所述非法入侵。
  5. 根据权利要求1至3中任意一项所述的方法,其中,所述至少一张待处理图像包括第二图像;所述至少一个属性过滤条件包括白名单特征数据库;所述至少一个属性包括被监测对象的身份特征;
    所述对所述至少一张待处理图像进行事件属性提取处理,得到所述待监测事件的至少一个属性,包括:
    对所述第二图像进行身份特征提取处理,得到所述被监测对象的身份特征数据;
    所述至少一个属性符合所述至少一个属性过滤条件,包括:所述白名单特征数据库中不存在与所述身份特征数据匹配的特征数据;
    所述至少一个属性不符合所述至少一个属性过滤条件,包括:所述白名单特征数据库中存在与所述身份特征数据匹配的特征数据。
  6. 根据权利要求5所述的方法,其中,所述至少一个属性过滤条件还包括尺寸范围;所述至少一个属性还包括被监测对象的尺寸;
    所述对所述至少一张待处理图像进行事件属性提取处理,得到所述待监测事件的至 少一个属性,还包括:
    对所述第二图像进行对象检测处理,得到所述被监测对象的尺寸;
    所述至少一个属性符合所述至少一个属性过滤条件,包括:所述白名单特征数据库中不存在与所述身份特征匹配的特征数据,且所述被监测对象的尺寸处于所述尺寸范围内;
    所述至少一个属性不符合所述至少一个属性过滤条件,包括:所述白名单特征数据库中不存在与所述身份特征匹配的特征数据,和/或,所述被监测对象的尺寸处于所述尺寸范围外。
  7. 根据权利要求1至3中任意一项所述的方法,其中,所述至少一张待处理图像包括第三图像和第四图像,所述第三图像的时间戳早于所述第四图像的时间戳;所述至少一个属性过滤条件包括时长阈值;所述至少一个属性包括所述待监测事件的持续时长;
    所述对所述至少一张待处理图像进行事件属性提取处理,得到所述待监测事件的至少一个属性,包括:
    将所述第三图像的时间戳作为所述待监测事件的起始时间,并将所述第四图像的时间戳作为所述待监测事件的结束时间,得到所述持续时长;
    所述至少一个属性符合所述至少一个属性过滤条件,包括:所述持续时长超过所述时长阈值;
    所述至少一个属性不符合所述至少一个属性过滤条件,包括:所述持续时长未超过所述时长阈值。
  8. 根据权利要求7所述的方法,其中,所述待监测事件包括违章停车;所述至少一个属性过滤条件还包括违章停车区域;所述至少一个属性包括被监测车辆的位置;所述第三图像和所述第四图像均包含所述被监测车辆;
    所述对所述至少一张待处理图像进行事件属性提取处理,得到所述待监测事件的至少一个属性,包括:
    对所述第三图像进行车辆检测处理,得到所述被监测车辆在所述第三图像中的第一位置;
    对所述第四图像进行车辆检测处理,得到所述被监测车辆在所述第四图像中的第二位置;
    所述至少一个属性符合所述至少一个属性过滤条件,包括:所述持续时长超过所述时长阈值,且所述第一位置和所述第二位置均位于所述违章停车区域内;
    所述至少一个属性不符合所述至少一个属性过滤条件包括以下至少一种情况:所述持续时长未超过所述时长阈值、所述第一位置位于所述违章停车区域外、所述第二位置位于所述违章停车区域外。
  9. 根据权利要求1至3中任意一项所述的方法,其中,所述至少一张待处理图像包括第五图像;所述至少一个属性过滤条件包括置信度阈值;
    所述对所述至少一张待处理图像进行事件属性提取处理,得到所述待监测事件的至少一个属性,包括:
    对所述第五图像进行对象检测处理,得到所述第五图像中被监测对象的置信度;
    所述至少一个属性符合所述至少一个属性过滤条件,包括:所述被监测对象的置信度超过所述置信度阈值;
    所述至少一个属性不符合所述至少一个属性过滤条件,包括:所述被监测对象的置信度未超过所述置信度阈值。
  10. 根据权利要求1至3中任意一项所述的方法,其中,所述至少一个属性过滤条件包括报警时间段;
    所述对所述至少一张待处理图像进行事件属性提取处理,得到所述待监测事件的至少一个属性,包括:
    将第六图像的时间戳作为所述待监测事件的发生时间;所述第六图像为所述至少一张待处理图像中时间戳最晚的图像;
    所述至少一个属性符合所述至少一个属性过滤条件,包括:所述待监测事件的发生时间处于所述报警时间段外;
    所述至少一个属性不符合所述至少一个属性过滤条件,包括:所述待监测事件的发生时间处于所述报警时间段内。
  11. 根据权利要求1至3中任意一项所述的方法,其中,在所述属性过滤条件的数量超过1的情况下,在所述对所述至少一张待处理图像进行事件属性提取处理,得到所述待监测事件的至少一个属性之前,所述方法还包括:
    获取所述过滤条件所对应的待监测事件属性的优先级顺序;
    所述对所述至少一张待处理图像进行事件属性提取处理,得到所述待监测事件的至少一个属性,包括:
    对所述至少一张待处理图像进行第一属性提取处理,得到所述待监测事件的第一属性;所述第一属性为所述优先级顺序中优先级最高的属性;
    在所述第一属性符合所述第一属性所对应的属性过滤条件的情况下,对所述至少一张待处理图像进行第二属性提取处理,得到所述待监测事件的第二属性;所述第二属性为所述优先级顺序中优先级次高的属性;
    在所述第一属性不符合所述第一属性所对应的过滤条件的情况下,停止对所述至少一张待处理图像进行事件属性提取处理。
  12. 根据权利要求1至11中任意一项所述的方法,其中,所述方法还包括:
    在所述目标监测结果为所述待监测事件未发生的情况下,输出报警信息。
  13. 一种图像处理装置,所述装置包括:
    获取单元,配置为获取至少一张待处理图像,以及待监测事件的至少一个属性过滤条件;
    事件检测单元,配置为对所述至少一张待处理图像进行事件检测处理,得到所述待监测事件的中间检测结果;
    属性提取单元,配置为对所述至少一张待处理图像进行事件属性提取处理,得到所述待监测事件的至少一个属性;
    处理单元,配置为依据所述中间检测结果、所述至少一个属性和所述待监测事件的至少一个属性过滤条件,得到所述待监测事件的目标监测结果。
  14. 一种电子设备,包括:处理器和存储器,所述存储器配置为存储计算机程序代码,所述计算机程序代码包括计算机指令,在所述处理器执行所述计算机指令的情况下,所述电子设备执行如权利要求1至12中任一项所述的方法。
  15. 一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,所述计算机程序包括程序指令,在所述程序指令被处理器执行的情况下,使所述处理器执行权利要求1至12中任意一项所述的方法。
  16. 一种计算机程序产品,所述计算机程序产品包括计算机程序或指令,在所述计算机程序或指令在计算机上运行的情况下,使所述计算机执行权利要求1至12中任一项所述的方法。
PCT/CN2021/090305 2020-09-28 2021-04-27 图像处理方法及装置、电子设备及存储介质 WO2022062396A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/874,477 US20220366697A1 (en) 2020-09-28 2022-07-27 Image processing method and apparatus, electronic device and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011043572.XA CN112241696A (zh) 2020-09-28 2020-09-28 图像处理方法及装置、电子设备及存储介质
CN202011043572.X 2020-09-28

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/874,477 Continuation US20220366697A1 (en) 2020-09-28 2022-07-27 Image processing method and apparatus, electronic device and storage medium

Publications (1)

Publication Number Publication Date
WO2022062396A1 true WO2022062396A1 (zh) 2022-03-31

Family

ID=74171851

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/090305 WO2022062396A1 (zh) 2020-09-28 2021-04-27 图像处理方法及装置、电子设备及存储介质

Country Status (4)

Country Link
US (1) US20220366697A1 (zh)
CN (1) CN112241696A (zh)
TW (1) TW202213177A (zh)
WO (1) WO2022062396A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112241696A (zh) * 2020-09-28 2021-01-19 深圳市商汤科技有限公司 图像处理方法及装置、电子设备及存储介质
CN112949390B (zh) * 2021-01-28 2024-03-15 浙江大华技术股份有限公司 一种基于视频质量的事件检测方法、装置
CN113469021A (zh) * 2021-06-29 2021-10-01 深圳市商汤科技有限公司 视频处理及装置、电子设备及计算机可读存储介质
CN116304600B (zh) * 2023-03-06 2024-02-02 四川省林业科学研究院 基于大数据分析的外来入侵物种预警方法及系统
CN117456430A (zh) * 2023-12-26 2024-01-26 广州汇豪计算机科技开发有限公司 一种视频识别方法、电子设备和存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170085773A1 (en) * 2013-08-23 2017-03-23 Sony Corporation Image capturing device, image capturing method, and information distribution system
CN107818312A (zh) * 2017-11-20 2018-03-20 湖南远钧科技有限公司 一种基于异常行为识别的嵌入式系统
CN110309735A (zh) * 2019-06-14 2019-10-08 平安科技(深圳)有限公司 异常侦测方法、装置、服务器及存储介质
CN111263114A (zh) * 2020-02-14 2020-06-09 北京百度网讯科技有限公司 异常事件报警方法和装置
CN111372043A (zh) * 2020-02-06 2020-07-03 浙江大华技术股份有限公司 异常检测方法以及相关设备、装置
CN112241696A (zh) * 2020-09-28 2021-01-19 深圳市商汤科技有限公司 图像处理方法及装置、电子设备及存储介质

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110442742A (zh) * 2019-07-31 2019-11-12 深圳市商汤科技有限公司 检索图像的方法及装置、处理器、电子设备及存储介质
CN110491135B (zh) * 2019-08-20 2021-10-22 深圳市商汤科技有限公司 检测违章停车的方法及相关装置
CN110969115B (zh) * 2019-11-28 2023-04-07 深圳市商汤科技有限公司 行人事件的检测方法及装置、电子设备和存储介质
CN111325171A (zh) * 2020-02-28 2020-06-23 深圳市商汤科技有限公司 异常停车监测方法及相关产品

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170085773A1 (en) * 2013-08-23 2017-03-23 Sony Corporation Image capturing device, image capturing method, and information distribution system
CN107818312A (zh) * 2017-11-20 2018-03-20 湖南远钧科技有限公司 一种基于异常行为识别的嵌入式系统
CN110309735A (zh) * 2019-06-14 2019-10-08 平安科技(深圳)有限公司 异常侦测方法、装置、服务器及存储介质
CN111372043A (zh) * 2020-02-06 2020-07-03 浙江大华技术股份有限公司 异常检测方法以及相关设备、装置
CN111263114A (zh) * 2020-02-14 2020-06-09 北京百度网讯科技有限公司 异常事件报警方法和装置
CN112241696A (zh) * 2020-09-28 2021-01-19 深圳市商汤科技有限公司 图像处理方法及装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN112241696A (zh) 2021-01-19
TW202213177A (zh) 2022-04-01
US20220366697A1 (en) 2022-11-17

Similar Documents

Publication Publication Date Title
WO2022062396A1 (zh) 图像处理方法及装置、电子设备及存储介质
CN110491004B (zh) 一种居民社区人员安全管理系统及方法
CN106203458B (zh) 人群视频分析方法及系统
CN107358146B (zh) 视频处理方法、装置及存储介质
CN105844263B (zh) 共享共同属性的视频对象的概要示图
WO2019104949A1 (zh) 一种实现人员大数据采集分析的住宅门禁系统
KR101215948B1 (ko) 신체정보 및 얼굴인식에 기반한 감시 시스템의 영상정보 마스킹 방법
JP6905850B2 (ja) 画像処理システム、撮像装置、学習モデル作成方法、情報処理装置
CN107169458B (zh) 数据处理方法、装置及存储介质
KR101360246B1 (ko) 다기능 방범카메라 통합방범 시스템
CN112233300A (zh) 一种基于人工智能的社区通行防疫监控联防系统及其方法
US20090110248A1 (en) Face Recognition System
CN104318217A (zh) 一种基于分布式云计算的人脸识别情报分析方法和系统
CN107527012A (zh) 闯红灯监控方法、装置及监控处理设备
CN106355154B (zh) 一种监控视频中检测频繁过人的方法
CN110442742A (zh) 检索图像的方法及装置、处理器、电子设备及存储介质
CN110503821A (zh) 行人及非机动车过街智能管理控制系统
TWI638569B (zh) 監控系統與監控方法
CN109035774A (zh) 一种智能头盔巡检仪的控制系统及控制方法
CN113837030A (zh) 用于疫情防控的人员智能管控方法、系统及计算机设备
JP5718632B2 (ja) 部位認識装置、部位認識方法、及び部位認識プログラム
CN110291516A (zh) 信息处理设备、信息处理方法和程序
CN107301373B (zh) 数据处理方法、装置及存储介质
CN107316011A (zh) 数据处理方法、装置及存储介质
CN112419637B (zh) 安防图像数据的处理方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21870784

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 10.07.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 21870784

Country of ref document: EP

Kind code of ref document: A1