CN112069939A - Event detection method and device, electronic equipment and storage medium - Google Patents

Event detection method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112069939A
CN112069939A CN202010852209.6A CN202010852209A CN112069939A CN 112069939 A CN112069939 A CN 112069939A CN 202010852209 A CN202010852209 A CN 202010852209A CN 112069939 A CN112069939 A CN 112069939A
Authority
CN
China
Prior art keywords
image
target event
event
target
exists
Prior art date
Legal status (The legal status 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 status listed.)
Withdrawn
Application number
CN202010852209.6A
Other languages
Chinese (zh)
Inventor
任晓园
钱能胜
李嘉宾
朱斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Sensetime Technology Co Ltd
Original Assignee
Shenzhen Sensetime Technology Co Ltd
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 Shenzhen Sensetime Technology Co Ltd filed Critical Shenzhen Sensetime Technology Co Ltd
Priority to CN202010852209.6A priority Critical patent/CN112069939A/en
Publication of CN112069939A publication Critical patent/CN112069939A/en
Withdrawn legal-status Critical Current

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
    • G06V20/41Higher-level, semantic clustering, classification or understanding of video scenes, e.g. detection, labelling or Markovian modelling of sport events or news items
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Alarm Systems (AREA)

Abstract

The application discloses an event detection method and device, electronic equipment and a storage medium. The event detection method comprises the following steps: detecting that a target event exists in a first image of a video stream; performing event detection on a second image positioned after the first image in the video stream to determine whether the target event exists in the second image; and determining that the target event exists in a first number of frames of second images after the first image, and generating a first alarm message indicating that the target event exists. According to the scheme, the accuracy of event detection can be improved.

Description

Event detection method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of image processing technologies, and in particular, to an event detection method and apparatus, an electronic device, and a storage medium.
Background
In daily life, a specific area often has a special purpose, so that the specific area is used for a specific object, and the occupation of the specific area by the rest of the objects is prohibited. In the smart city planning, shared bicycles need to be parked in a shared bicycle parking area, garbage needs to be thrown in a garbage area, street umbrella canopies are forbidden to occupy lanes in a road area and the like, but abnormal events such as street umbrella canopies occupying lanes, road garbage exposure, illegal parking of the shared bicycles and the like often occur due to uncontrollable factors.
In order to improve the fine management level of cities and improve the quality of life of citizens, abnormal events are usually detected by monitoring video streams to generate alarm information. In the prior art, false alarm of alarm information often occurs when event detection and alarm are performed on images in a video stream. Therefore, how to improve the accuracy of event detection becomes an urgent problem to be solved.
Disclosure of Invention
The application at least provides an event detection method and device, electronic equipment and a storage medium.
A first aspect of the present application provides an event detection method, including: detecting that a target event exists in a first image of a video stream; performing event detection on a second image positioned after the first image in the video stream to determine whether the target event exists in the second image; and determining that the target event exists in a first number of frames of second images after the first image, and generating a first alarm message indicating that the target event exists.
Therefore, after a target event exists in a first image of a video stream, event detection is carried out on a second image behind the first image in the video stream, the existence state of the target event is continuously tracked, when the target event exists in a first number of frames of second images behind the first image, the target event is indicated to exist continuously, a first alarm message indicating that the target event exists is generated, the accuracy of event detection can be improved, and the situation that the target event is detected in each frame of image immediately, so that frequent alarms are caused is avoided, and therefore user experience can be improved.
Wherein the first alert message includes at least one of: event type, start time, event level of the target event.
Therefore, the information of the event type, the starting time, the event level and the like of the target event can be sent out through the alarm message.
Wherein the determining that the target event exists in a first number of frames of second images after the first image comprises: and determining that the target event exists in each frame of second image of which the time interval with the first image is less than or equal to the alarm triggering time length.
Therefore, the alarm triggering time length is preset, and under the condition that whether the target event exists in each frame of second image of which the time interval with the first image is smaller than or equal to the alarm triggering time length is determined, the target event exists in the first number of frames of second images behind the first image, so that after the target event continuously exists and reaches the alarm triggering time length, whether a first alarm message indicating the existence of the target event is generated is judged, and the accuracy of alarm is improved.
Wherein, after the generating a first alert message indicating the presence of the target event, the method further comprises: performing event detection on a third image which is positioned after the second image in the video stream to determine whether the target event exists in the third image; and determining that the target event does not exist in at least one continuous frame of the third image, and generating a second alarm message indicating that the target event is ended.
Therefore, after the first alarm information is generated, whether the target event exists in the third image of the video stream or not is continuously tracked, so that the situation that the target event exists in the third image is continuously monitored, new alarm information is not generated before the target event is finished, the complete starting and ending state of the target event is tracked, and continuous target event continuous pushing of the alarm information is avoided.
Wherein, after the determining that the target event is not present for at least one consecutive frame of the third image, the method further comprises: counting a time interval from the first image to a third image without the target event as the duration of the target event; recording the duration of the target event and/or packaging the duration into the second warning message.
Therefore, the duration of the target event is known through the statistical time interval, the continuous tracking of the target event is realized, and the situation that the target event exists in the video stream image continuously is integrated into a continuous event alarm.
And the second image or the third image of two adjacent frames is two frames of images separated by a second number of frames in the video stream.
Therefore, the detection and identification of the target event in the video stream are realized through the frame extraction strategy, the processing efficiency of the first alarm information or the second alarm information can be improved, and the detection resource of the target event is reduced.
Wherein the performing event detection on a second image of the video stream after the first image to determine whether the target event exists in the second image, or performing event detection on a third image of the video stream after the second image to determine whether the target event exists in the third image comprises: acquiring the probability of the target event existing in the second image or the third image; and if the probability corresponding to the second image or the third image is greater than a preset probability threshold, determining that the target event exists in the second image or the third image.
Therefore, after the target event exists in the first image of the video stream, the event detection is continuously carried out on the second image and the third image after the first image, so that the existence condition of the target event is determined, and the continuous tracking of the target event is realized. By comparing the size relationship between the probability of the target event existing in the second image or the third image and the preset probability threshold, the second image with the probability corresponding to the second image or the third image being less than or equal to the preset probability threshold can be filtered, whether the target event exists in the second image or the third image can be judged more accurately, and the second image or the third image with higher probability of the target event can be filtered.
Wherein the method further comprises at least one of the following steps: receiving processing feedback information of the target event fed back by the first terminal, and recording the current processing state of the target event based on the processing feedback information; receiving a query instruction of a second terminal to a target event, and feeding back information of the target event to the second terminal, wherein the information of the target event comprises at least one of an event type, a start time, an end time, a duration, an event grade and the current processing state of the target event.
Therefore, the query of the target event can be realized, and the processing condition of the target event can be known by processing the feedback information.
Wherein the detecting that the target event exists in the first image of the video stream comprises: determining a first detection area of the first image for the target event if it is determined that the current time is within the detection time of the target event; performing target object detection on the first detection area, and determining that a target event associated with a target object exists in the first image under the condition that the target object exists in the first detection area; the event detection of a second image in the video stream after the first image to determine whether the target event exists in the second image comprises: determining a second detection region of the second image for the target event; and detecting a target object in the second detection area to determine whether the target object exists in the second detection area, wherein if the target object exists in the second detection area, the target event related to the target object exists in the second image.
Therefore, the target object detection is carried out on the first detection area or the second detection area, so that the target event is identified, and the target event related to the target object exists in the corresponding image.
Wherein, prior to the detecting that the target event exists in the first image of the video stream, the method further comprises: providing a management interface of at least one type of the target event; acquiring and storing the configuration parameters of the target event input by a user through the management interface, wherein the configuration parameters of the target event comprise at least one of the following parameters: the detection time of the target event, the detection area in the image of the video stream, the event level and the alarm trigger time length, wherein the alarm trigger time length is used for determining the frame number of the first number of frames.
Therefore, the configuration parameters of the target event are flexibly adjusted through the management interface, the alarm triggering condition in the event detection is customized, the event detection is more suitable for the actual needs of the user, the expansibility or universality of the event detection method is improved, and the scene applicability is improved.
A second aspect of the present application provides an event detection apparatus, including: the detection module is used for detecting that a target event exists in a first image of the video stream; the detection module is further used for carrying out event detection on a second image positioned after the first image in the video stream so as to determine whether the target event exists in the second image; and the warning information generation module is used for determining that the target event exists in a first number of frames of second images after the first image and generating a first warning message indicating that the target event exists.
A third aspect of the present application provides an electronic device, which includes a memory and a processor coupled to each other, wherein the processor is configured to execute program instructions stored in the memory to implement the event detection method in the first aspect.
A fourth aspect of the present application provides a computer-readable storage medium having stored thereon program instructions that, when executed by a processor, implement the event detection method of the first aspect described above.
According to the scheme, after the target event exists in the first image of the video stream, the second image behind the first image in the video stream is detected, the existence state of the target event is continuously tracked, the target event is continuously existed under the condition that the target event exists in the first number of frames of second images behind the first image, the first alarm message indicating the existence of the target event is generated, and the accuracy of event detection can be improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the application.
FIG. 1 is a schematic flow chart diagram illustrating an embodiment of an event detection method according to the present application;
FIG. 2 is a schematic flow chart diagram illustrating another embodiment of an event detection method according to the present application;
FIG. 3 is a schematic diagram of an embodiment of an event detection device according to the present application;
FIG. 4 is a block diagram of an embodiment of an electronic device of the present application;
FIG. 5 is a block diagram of an embodiment of a computer-readable storage medium of the present application.
Detailed Description
The following describes in detail the embodiments of the present application with reference to the drawings attached hereto.
In the following description, for purposes of explanation and not limitation, specific details are set forth such as particular system structures, interfaces, techniques, etc. in order to provide a thorough understanding of the present application.
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship. Further, the term "plurality" herein means two or more than two. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
In daily life, a specific area often has a special purpose, so that the specific area is used for a specific object, and the occupation of the specific area by the rest of the objects is prohibited. In the smart city planning, shared bicycles need to be parked in a shared bicycle parking area, garbage needs to be thrown in a garbage area, street umbrella canopies are forbidden to occupy lanes in a road area and the like, but abnormal events such as street umbrella canopies occupying lanes, road garbage exposure, illegal parking of the shared bicycles and the like often occur due to uncontrollable factors. In order to improve the fine management level of cities and improve the quality of life of citizens, a target event is detected and alarm information is generated by monitoring a video stream, so that a processing person can timely and effectively process the target event.
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating an event detection method according to an embodiment of the present application. Specifically, the method may include the steps of:
step S11: a target event is detected in a first image of a video stream.
The video stream is acquired by a video acquisition device such as a camera and consists of a plurality of frame images. And detecting whether a target event exists in the image of the video stream by acquiring the video stream, and if so, taking the frame image as a first image. The first image is a first frame image of the target object continuously appearing in the video stream and indicates the beginning of the target event, so that whether the first warning information needs to be sent or not can be judged by utilizing the first image and images behind the first image.
The event types of the target events include but are not limited to abnormal events such as street umbrella street occupancy, road garbage exposure, illegal parking of shared vehicles and the like. In order to improve the expansibility or the universality of the event detection method, improve the scene applicability, and adjust the rules and the strategies for generating the first alarm information according to the actual conditions, the configuration parameters corresponding to the target events can be set in a self-defined manner aiming at the target events with different or the same event types; and setting configuration parameters corresponding to the target event in a self-defined manner aiming at different video streams. In a disclosed embodiment, prior to detecting the presence of a target event in a first image of a video stream, a management interface for at least one type of target event may be provided; and acquiring and storing the configuration parameters of the target event input by the user through a management interface. The configuration parameters of the target event include at least one of: the detection time of the target event, the detection area in the image of the video stream, the event level and the alarm trigger duration. The detection time of the target event is used for judging whether the event detection method of the embodiment of the disclosure is executed at the current time, and the detection time can set a time interval in a user-defined mode. The detection area of the target event in the image of the video stream is used for locating the area for target object detection, so that in the case that the target object exists in the detection area, the target event related to the target object exists in the image of the video stream. The event grade comprises custom set event grade types such as major risk, general risk and the like. The alarm trigger duration is used to determine the frame number of the first number of frames in step S13 in the embodiment of the present disclosure. The configuration parameters of the target event include default configuration parameters, and when the configuration parameters of the target event input by the user are not detected, the default configuration parameters are used as the configuration parameters of the target event, for example, the detection time in the default configuration parameters is long-term valid, the event level is general risk, and the like. Therefore, the configuration parameters of the target event are flexibly adjusted through the management interface, the alarm triggering condition in the event detection is customized, the event detection is more suitable for the actual needs of the user, the expansibility or universality of the event detection method is improved, and the scene applicability is improved.
When event detection is performed on different target events, target objects associated with the target events may appear in different detection areas in the image. In a disclosed embodiment, in the event that it is determined that it is currently within the detection time of the target event, determining a first detection region of the first image for the target event; and carrying out target object detection on the first detection area, and determining that the first image has a target event associated with the target object under the condition that the first detection area has the target object, so as to detect that the first image of the video stream has the target event. The first detection area is an interesting area corresponding to the target event and formed by drawing a plurality of area point coordinates, and the size of the area can be set by self-definition. Different event types can correspond to different first detection areas, so that when the target object detection is carried out on the first detection area and the target object exists in the first detection area, the target event related to the target object exists in the first image, and the classification and identification of the target event and the target object are achieved.
Step S12: and carrying out event detection on a second image positioned after the first image in the video stream to determine whether the second image has a target event.
In the embodiment of the disclosure, the situation that the first alarm information is sent immediately after the target event is detected to exist in the single-frame image is avoided, and after the target event is detected to exist in the first image of the video stream, the event detection is continuously performed on the second image behind the first image, so that the accuracy of the event detection is improved. The event detection may be to determine whether a target event exists in an image in the video stream, and the event detection method is not particularly limited. In the case that target events of multiple event types exist, the target events correspond to target objects one to one, and event detection is to determine whether target objects related to the target events exist in images in a video stream. In a disclosed embodiment, in order to improve the accuracy of event detection and further improve the accuracy of target event judgment, when event detection is performed on a second image located behind a first image in a video stream, a second detection area of the second image is determined for a target event; and detecting the target object in the second detection area to determine whether the target object exists in the second detection area, wherein if the target object exists in the second detection area, a target event related to the target object exists in the second image, and further, the target event exists in the second image. Therefore, after the target event exists in the first image of the video stream, the event detection is continuously carried out on the second image after the first image, so that the existence condition of the target event is determined, and the continuous tracking of the target event is realized.
In order to improve the accuracy of target event detection, in a disclosed embodiment, when event detection is performed on a second image located behind a first image in a video stream, the probability that a target event exists in the second image is acquired; and if the probability corresponding to the second image is greater than a preset probability threshold, determining that the second image has the target event. The obtaining manner of the probability of the target event existing in the second image includes, but is not limited to, an algorithm model, and is not particularly limited herein. The size of the preset probability threshold can be set by a user, for example, 80%, 90%, etc., and is not limited in detail herein. By comparing the size relationship between the probability of the target event existing in the second image and the preset probability threshold, the second image with the probability less than or equal to the preset probability threshold corresponding to the second image can be filtered out, and whether the target event exists in the second image can be judged more accurately.
Step S13: and determining that the target event exists in a first number of frames of second images after the first image, and generating a first alarm message indicating that the target event exists.
And determining that the target event exists in a second image of a first number of frames after the first image, indicating that the target event continuously exists all the time, and generating a first alarm message indicating that the target event exists. In the embodiment of the disclosure, when it is determined that the target event exists in all the multiple frames of images, the first alarm information is generated only when it is determined that the target event continuously exists, so that the first alarm information is prevented from being repeatedly generated and pushed when the target event exists in a single frame of image, that is, the first alarm information is sent, the multiple frames of second images can be sorted, and no alarm is performed when the target event does not exist in the first number of frames of second images. Therefore, the target event exists in the first image and the second images of the first number of frames behind the first image, the existing state of the target event is tracked, more effective and accurate first alarm information is obtained, and the false alarm of the first alarm information is reduced.
The first alert message includes at least one of: event type, start time, event rating of the target event. The event types of the target events comprise abnormal events such as street umbrella shed road occupation, road garbage exposure, illegal parking of shared vehicles and the like. The start time of the target event may be a time corresponding to the first image and may also be a time corresponding to the generation of the first warning message indicating the presence of the target event. The event level of the target event can be set in a self-defined mode, for example, different video streams correspond to the same or different event levels; the different event types correspond to the same or different event classes, etc., and are not specifically limited herein.
The frame number of the first number of frames can be set by self according to needs, for example, the size of the frame number is directly set, 5 frames, 20 frames and the like; the first number of frames may also be determined according to the alarm trigger duration, for example, the first number of frames may be all or a part of frames within the alarm trigger duration, so that when it is determined that the target event exists in each frame of the second images with the time interval from the first image being less than or equal to the alarm trigger duration, it is determined that the target event exists in each frame of the second images of the first number of frames after the first image. The second image may be continuous; the second images may also be spaced, for example, the two adjacent frames of the second images are two frames of images separated by a second number of frames in the video stream, wherein the number of the second number of frames can be customized according to the requirement.
In an application embodiment, after a target event exists in a first image of a video stream, the image within an alarm triggering time duration is taken as a second image, so that the target event exists in each frame of the second image of which the time interval with the first image is smaller than or equal to the alarm triggering time duration, that is, the target event exists in a first number of frames of the second image after the first image, and a first alarm message indicating that the target event exists is generated. In order to improve the time efficiency of processing the first alarm information and reduce the detection resources of the target event, after the first image of the video stream is detected to have the target event, the images separated by a second number of frames within the alarm triggering time duration are taken as second images to realize frame extraction detection, if the second images are determined to have the target event, the second images of a first number of frames behind the first image are determined to have the target event, and a first alarm message indicating that the target event exists is generated, so that the detection and identification of the target event in the video stream are realized through a frame extraction strategy. In the embodiment of the present disclosure, by detecting that a target event exists in a video stream in a second image and exceeds an alarm trigger duration, specifically, within the alarm trigger duration, if it is detected that the target event does not exist in the second image, the first alarm information is not generated, the event detection is ended, step S11 is repeatedly executed to detect that the target event exists in the first image of the video stream and subsequent steps thereof, and if it is detected that the target event exists in all the second images within the alarm trigger duration, a piece of first alarm information is generated, which may reduce the number of the first alarm information and reduce interference of more and more complicated first alarm information on user judgment and decision making.
In the embodiment of the disclosure, the first warning information is generated only when the target event exists in all the second images of the first number of frames after the first image, and the first warning information is not generated if it is detected that the target event does not exist in any second image of the second images of the first number of frames after the first image, so that compared with the case that the first warning information is sent once the target event exists in the images in the video stream, the effectiveness of the first warning information is improved.
According to the scheme, after the target event exists in the first image of the video stream, the existence state of the target event is continuously tracked by performing event detection on the second image behind the first image in the video stream, and under the condition that the target event exists in the first number of frames of second images behind the first image, the target event is continuously tracked, the first alarm message indicating the existence of the target event is generated, so that the accuracy of event detection can be improved, and the frequent alarm caused by the fact that the alarm is immediately performed when the target event is detected in each frame of image is avoided, so that the user experience can be improved.
In order to track the complete start and end states of a target event, after generating a first alarm message indicating that the target event exists, whether the target event continuously exists can be further continuously judged until the target event is ended. Referring to fig. 2, fig. 2 is a schematic flowchart illustrating an event detection method according to another embodiment of the present application. Specifically, the method may include the steps of:
step S21: a target event is detected in a first image of a video stream.
In the embodiment of the disclosure, under the condition that the current time is determined to be within the detection time of the target event, a first detection area of a first image is determined for the target event; and carrying out target object detection on the first detection area, and determining that the first image has a target event associated with the target object when the first detection area has the target object.
Step S22: and carrying out event detection on a second image positioned after the first image in the video stream to determine whether the second image has a target event.
In the embodiment of the disclosure, when event detection is performed on a second image located behind a first image in a video stream, a second detection area of the second image is determined for a target event; and carrying out target object detection on the second detection area to determine whether the target object exists in the second detection area. If the target object exists in the second detection area, the second image has a target event related to the target object, and therefore the second image can be determined to have the target event.
Step S23: and determining that the target event exists in a first number of frames of second images after the first image, and generating a first alarm message indicating that the target event exists.
In the embodiment of the disclosure, it is determined that a target event exists in each frame of second images, of which the time interval with a first image is less than or equal to the alarm trigger time length, so that it is determined that the target event exists in a first number of frames of second images after the first image, and a first alarm message indicating that the target event exists is generated. In order to quickly determine the existence state of the target event within the alarm triggering time length, the two adjacent frames of second images are two frames of images separated by a second number of frames in the video stream. When event detection is carried out on a second image behind a first image in a video stream, the probability that a target event exists in the second image is obtained; and if the probability corresponding to the second image is greater than a preset probability threshold, determining that the second image has the target event. Under the condition that the target event exists in the selected second image within the alarm triggering duration, the target event is indicated to exist continuously, and a first alarm message indicating that the target event exists is generated, so that the accuracy of event detection can be improved.
For the rest of the descriptions of step S21-step S23, reference may be made to the detailed descriptions of step S11-step S13 shown in fig. 1, which are not repeated herein.
Step S24: and carrying out event detection on a third image positioned after the second image in the video stream to determine whether the third image has the target event.
And after the first alarm information is generated, continuously tracking whether the target event exists in a third image of the video stream, thereby continuously focusing on the change state of the target event. Specifically, when event detection is performed on a third image behind the second image in the video stream, the probability that a target event exists in the third image is obtained; and if the probability corresponding to the third image is greater than a preset probability threshold, determining that the third image has the target event. By comparing the size relationship between the probability of the target event existing in the third image and the preset probability threshold, the third image with the probability less than or equal to the preset probability threshold corresponding to the third image can be filtered out, and whether the target event exists in the third image can be judged more accurately. In order to continue to quickly determine the existence state of the target event after the first warning information is generated, the third image of two adjacent frames may be two images separated by a second number of frames in the video stream.
Step S25: and determining that the target event does not exist in at least one continuous third image frame, and generating a second alarm message indicating that the target event is ended.
In the embodiment of the present disclosure, when it is detected that the third image of the target event does not exist in the first frame, a second warning message indicating that the target event has ended may be generated; in order to improve the accuracy of judging the target event, when it is determined that the target event does not exist in the continuous multi-frame third images, the state that the target event does not exist in the third images is shown to last for a period of time, and then a second warning message indicating that the target event is finished is generated. The frame number of the third image can also be determined by a preset end time, wherein the preset end time can be set by self. After the first alarm information is generated, the change process of the target event is tracked by continuously carrying out event detection on a third image which is positioned behind the second image in the video stream until the target event does not exist in at least one continuous frame of third image, and then the target event is judged to be ended. In the embodiment of the disclosure, after the first alarm information is output, the situation that the target event exists in the third image can be continuously monitored, and new alarm information is not generated any more before the target event is ended, so that the events needing continuous alarm are merged into one continuous target event. When judging whether the target event is finished, the number of frames of the third image may be increased in order to improve the accuracy of the judgment, and the number of frames of the third image is not specifically limited herein.
The first alarm information indicates the presence of the target event, indicated at the beginning of the target event, and the second alarm information indicates the end of the target event. In order to know the state condition of the target event, the duration of the target event can be acquired, so that the duration of the target event can be recorded or packaged into a corresponding alarm message. In a disclosed embodiment, after the first warning information is generated and before it is determined that the target event does not exist in at least one continuous frame of the third image, a time interval between the first image and the third image may be counted to serve as a duration of the target event, the duration of the target event is periodically updated according to a preset period until it is determined that the target event does not exist in at least one continuous frame of the third image, the time interval between the first image and the third image in which the target event does not exist is acquired to serve as the duration of the target event, and then the duration of the target event is recorded in the whole process of starting the target event, an intermediate duration state of the target event, and an end state of the target event. Packing the duration into a first warning message before determining that the target event does not exist in at least one continuous frame of the third image; and packaging the duration into a second alarm message after determining that the target event does not exist in at least one continuous third image. In another disclosed embodiment, only after determining that the target event does not exist in the continuous at least one frame of the third image, the time interval from the first image to the third image without the target event is counted as the duration of the target event, so that the duration of the target event can be recorded, and the duration can be packaged into the second warning message. Therefore, the duration of the target event is known through the statistical time interval, the continuous tracking of the target event is realized, and the situation that the target event exists in the video stream image continuously is integrated into a continuous event alarm.
In a disclosed embodiment, after the first warning information is generated, processing feedback information of the target event fed back by the first terminal may be received, and the current processing state of the target event is recorded based on the processing feedback information. The first terminal includes, but is not limited to, a terminal used by the target event handler, a terminal used by the administrator, and the like, wherein the terminal used by the administrator can receive and forward the processing feedback information sent by the terminal used by the target event handler. It can be understood that, in order to facilitate query of the target event, a query instruction of the second terminal to the target event may be received, and information of the target event may be fed back to the second terminal. Wherein the information of the target event includes at least one of an event type, a start time, an end time, a duration, an event level, and a current processing state of the target event. The second terminal is any terminal and can send the query instruction, and the second terminal can prompt the information of the target event in a bubble prompt mode, a voice prompt mode, a popup prompt mode and the like, which is not limited herein. The event type, start time, and event level of the target event correspond to the event type, start time, and event level of the target event. The end time of the target event corresponds to a time at which a second warning message indicating that the target event has ended is generated, and the current processing state is generated based on the processing feedback information. The query instruction may query a target event that has ended before the query instruction occurs, or may query a target event that is currently occurring, in other words, the target event queried by the query instruction may be any target event that issues the first warning information, and is not limited herein.
In an application embodiment, after detecting that a target event exists in a first image of a video stream, the image within the alarm trigger duration is taken as a second image, if it is detected that the target event does not exist in the second image within the alarm trigger duration, the first alarm information is not generated, step S21 is repeatedly executed to detect that the target event exists in the first image of the video stream and the subsequent steps thereof, until it is detected that the target event exists in all the second images within the alarm trigger duration, the first alarm information indicating that the target event exists is generated, so that the first alarm information is not generated when the target event continuously exists in the second image, otherwise, the target event exists in the first image of the video stream is re-detected, and the re-detected target event is another new target event. After generating a piece of first alarm information indicating that the target event exists, continuously carrying out event detection on a third image positioned behind the second image in the video stream, during which, when the target event exists in the third image, no alarm is carried out, and when determining that the target event does not exist in at least one continuous frame of the third image, generating a second alarm information indicating that the target event has ended. In this embodiment of the application, the manner of determining whether the target event exists in the image of the video stream is as follows: and acquiring the probability of the target event existing in the second image or the third image, and determining that the target event exists in the second image or the third image when the probability corresponding to the second image or the third image is greater than a preset probability threshold.
According to the scheme, after a target event exists in a first image of a video stream, event detection is carried out on a second image behind the first image in the video stream, the existence state of the target event is continuously tracked, the target event is continuously existed under the condition that the target event exists in a first number of frames of second images behind the first image, a first alarm message indicating that the target event exists is generated, and the accuracy of event detection can be improved; further, event detection is carried out on a third image behind the second image in the video stream, and under the condition that it is determined that no target event exists in at least one continuous frame of the third image, a second alarm message indicating that the target event is ended is generated, so that the whole process of the target event is monitored and recorded, the complete starting and ending state of the target event is tracked, and continuous pushing of alarm information by the target event is avoided.
It will be understood by those skilled in the art that in the method of the present invention, the order of writing the steps does not imply a strict order of execution and any limitations on the implementation, and the specific order of execution of the steps should be determined by their function and possible inherent logic.
Referring to fig. 3, fig. 3 is a schematic structural diagram of an event detection device 30 according to an embodiment of the present application. The event detection device 30 comprises a detection module 31 and an alarm information generation module 32, wherein the detection module 31 is used for detecting that a target event exists in a first image of a video stream; the detection module is further used for carrying out event detection on a second image positioned behind the first image in the video stream so as to determine whether a target event exists in the second image; and the alarm information generating module 32 is configured to determine that a target event exists in a first number of frames of second images after the first image, and generate a first alarm message indicating that the target event exists.
In a disclosed embodiment, the first alert message includes at least one of: event type, start time, event level of the target event; and/or when the alarm information generation module 32 determines that the target event exists in a first number of frames of second images after the first image, it is further configured to determine that the target event exists in each frame of second images whose time interval with the first image is less than or equal to the alarm trigger time length.
In a disclosed embodiment, after generating the first warning message indicating that the target event exists, the detection module 31 is further configured to perform event detection on a third image, located after the second image, in the video stream to determine whether the target event exists in the third image; the warning information generating module 32 is further configured to determine that the target event does not exist in at least one consecutive frame of the third image, and generate a second warning message indicating that the target event has ended.
In a disclosed embodiment, the event detection apparatus 30 further includes a time counting module 33, after the alarm information generating module 32 is configured to determine that the target event does not exist in at least one consecutive frame of the third image, the time counting module 33 is configured to count a time interval from the first image to the third image in which the target event does not exist as a duration of the target event; the duration of the target event is recorded and/or packaged into a second alert message.
In a disclosed embodiment, the second image or the third image of two adjacent frames is two images separated by a second number of frames in the video stream.
In a disclosed embodiment, the detection module 31 is configured to perform event detection on a second image located after the first image in the video stream to determine whether a target event exists in the second image, or the detection module 31 is configured to perform event detection on a third image located after the second image in the video stream to determine whether a target event exists in the third image, and is further configured to obtain a probability that a target event exists in the second image or the third image; and if the probability corresponding to the second image or the third image is greater than a preset probability threshold, determining that the second image or the third image has the target event.
In a disclosed embodiment, the event detecting apparatus 30 further includes a receiving module 34, where the receiving module 34 is configured to receive processing feedback information of the target event fed back by the first terminal, and record a current processing state of the target event based on the processing feedback information; the receiving module 34 is further configured to receive a query instruction of the second terminal for the target event, and feed back information of the target event to the second terminal, where the information of the target event includes at least one of an event type, a start time, an end time, a duration, an event level, and a current processing state of the target event.
In a disclosed embodiment, the detection module 31 is configured to, when detecting that a target event exists in a first image of the video stream, determine a first detection area of the first image for the target event if it is determined that the first image is currently within a detection time of the target event; and carrying out target object detection on the first detection area, and determining that the first image has a target event associated with the target object when the first detection area has the target object. The detection module 31 is configured to perform event detection on a second image located after the first image in the video stream to determine whether a target event exists in the second image, and further configured to determine a second detection area of the second image for the target event; and performing target object detection on the second detection area to determine whether the target object exists in the second detection area, wherein if the target object exists in the second detection area, a target event related to the target object exists in the second image.
In a disclosed embodiment, the event detection apparatus 30 further includes a configuration parameter obtaining module 35, where before the detection module 31 is configured to detect that the target event exists in the first image of the video stream, the configuration parameter obtaining module 35 is configured to provide a management interface for at least one type of target event; acquiring and storing configuration parameters of a target event input by a user through a management interface, wherein the configuration parameters of the target event comprise at least one of the following parameters: the method comprises the steps of detecting the target event, detecting areas in images of the video stream, event levels and an alarm triggering time, wherein the alarm triggering time is used for determining the frame number of a first number of frames.
According to the scheme, after the detection module 31 detects that the target event exists in the first image of the video stream, the detection module continuously tracks the existence state of the target event by performing event detection on the second image behind the first image in the video stream, and the alarm information generation module 32 indicates that the target event continuously exists and generates the first alarm message indicating that the target event exists under the condition that the target event exists in the first number of frames of second images behind the first image, so that the accuracy of event detection can be improved.
Referring to fig. 4, fig. 4 is a schematic block diagram of an embodiment of an electronic device 40 according to the present application. The electronic device 40 comprises a memory 41 and a processor 42 coupled to each other, and the processor 42 is configured to execute program instructions stored in the memory 41 to implement the steps of any of the above-described event detection method embodiments. In one particular implementation scenario, electronic device 40 may include, but is not limited to: a microcomputer, a server, and the electronic device 40 may also include a mobile device such as a notebook computer, a tablet computer, and the like, which is not limited herein.
In particular, the processor 42 is configured to control itself and the memory 41 to implement the steps of any of the above-described event detection method embodiments. Processor 42 may also be referred to as a CPU (Central Processing Unit). The processor 42 may be an integrated circuit chip having signal processing capabilities. The Processor 42 may also be a general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. In addition, the processor 42 may be commonly implemented by an integrated circuit chip.
According to the scheme, the accuracy of event detection can be improved.
Referring to fig. 5, fig. 5 is a block diagram illustrating an embodiment of a computer-readable storage medium 50 according to the present application. The computer readable storage medium 50 stores program instructions 501 capable of being executed by a processor, the program instructions 501 being for implementing the steps of any of the above-described embodiments of the image detection model training method, or implementing the steps of any of the above-described embodiments of the image detection method.
According to the scheme, the accuracy of event detection can be improved.
In some embodiments, functions of or modules included in the apparatus provided in the embodiments of the present disclosure may be used to execute the method described in the above method embodiments, and specific implementation thereof may refer to the description of the above method embodiments, and for brevity, will not be described again here.
The foregoing description of the various embodiments is intended to highlight various differences between the embodiments, and the same or similar parts may be referred to each other, and for brevity, will not be described again herein.
In the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a module or a unit is merely one type of logical division, and an actual implementation may have another division, for example, a unit or a component may be combined or integrated with another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some interfaces, and may be in an electrical, mechanical or other form.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.

Claims (13)

1. An event detection method, comprising:
detecting that a target event exists in a first image of a video stream;
performing event detection on a second image positioned after the first image in the video stream to determine whether the target event exists in the second image;
and determining that the target event exists in a first number of frames of second images after the first image, and generating a first alarm message indicating that the target event exists.
2. The method of claim 1, wherein the first alert message comprises at least one of: event type, start time, event level of the target event.
3. The method of claim 1 or 2, wherein the determining that the target event exists for a first number of frames of second images after the first image comprises:
and determining that the target event exists in each frame of second image of which the time interval with the first image is less than or equal to the alarm triggering time length.
4. The method according to any of claims 1 to 3, wherein after said generating a first alert message indicating the presence of the target event, the method further comprises:
performing event detection on a third image which is positioned after the second image in the video stream to determine whether the target event exists in the third image;
and determining that the target event does not exist in at least one continuous frame of the third image, and generating a second alarm message indicating that the target event is ended.
5. The method of claim 4, wherein after said determining that the target event is not present for at least one consecutive frame of the third image, the method further comprises:
counting a time interval from the first image to a third image without the target event as the duration of the target event;
recording the duration of the target event and/or packaging the duration into the second warning message.
6. The method according to claim 4 or 5, wherein the second image or the third image of two adjacent frames is two images separated by a second number of frames in the video stream.
7. The method according to claim 1 or 4, wherein the performing event detection on a second image of the video stream after the first image to determine whether the target event exists in the second image, or performing event detection on a third image of the video stream after the second image to determine whether the target event exists in the third image comprises:
acquiring the probability of the target event existing in the second image or the third image;
and if the probability corresponding to the second image or the third image is greater than a preset probability threshold, determining that the target event exists in the second image or the third image.
8. The method according to any one of claims 1 to 7, characterized in that the method further comprises at least one of the following steps:
receiving processing feedback information of the target event fed back by the first terminal, and recording the current processing state of the target event based on the processing feedback information;
and receiving a query instruction of a second terminal to the target event, and feeding back information of the target event to the second terminal, wherein the information of the target event comprises at least one of an event type, a start time, an end time, a duration, an event grade and the current processing state of the target event.
9. The method according to any one of claims 1 to 8, wherein the detecting that the first image of the video stream has the target event comprises:
determining a first detection area of the first image for the target event if it is determined that the current time is within the detection time of the target event;
performing target object detection on the first detection area, and determining that a target event associated with a target object exists in the first image under the condition that the target object exists in the first detection area;
the event detection of a second image in the video stream after the first image to determine whether the target event exists in the second image comprises:
determining a second detection region of the second image for the target event;
and detecting a target object in the second detection area to determine whether the target object exists in the second detection area, wherein if the target object exists in the second detection area, the target event related to the target object exists in the second image.
10. The method according to any of claims 1 to 9, wherein prior to said detecting that the target event is present in the first image of the video stream, the method further comprises:
providing a management interface of at least one type of the target event;
acquiring and storing the configuration parameters of the target event input by a user through the management interface, wherein the configuration parameters of the target event comprise at least one of the following parameters: the detection time of the target event, the detection area in the image of the video stream, the event level and the alarm trigger time length, wherein the alarm trigger time length is used for determining the frame number of the first number of frames.
11. An event detection device, comprising:
the detection module is used for detecting that a target event exists in a first image of the video stream;
the detection module is further used for carrying out event detection on a second image positioned after the first image in the video stream so as to determine whether the target event exists in the second image;
and the warning information generation module is used for determining that the target event exists in a first number of frames of second images after the first image and generating a first warning message indicating that the target event exists.
12. An electronic device comprising a memory and a processor coupled to each other;
the processor is configured to execute the program instructions stored in the memory to implement the event detection method of any one of claims 1 to 10.
13. A computer readable storage medium having stored thereon program instructions which, when executed by a processor, implement the event detection method of any of claims 1 to 10.
CN202010852209.6A 2020-08-21 2020-08-21 Event detection method and device, electronic equipment and storage medium Withdrawn CN112069939A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010852209.6A CN112069939A (en) 2020-08-21 2020-08-21 Event detection method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010852209.6A CN112069939A (en) 2020-08-21 2020-08-21 Event detection method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112069939A true CN112069939A (en) 2020-12-11

Family

ID=73659921

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010852209.6A Withdrawn CN112069939A (en) 2020-08-21 2020-08-21 Event detection method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112069939A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112734699A (en) * 2020-12-24 2021-04-30 浙江大华技术股份有限公司 Article state warning method and device, storage medium and electronic device
CN112883782A (en) * 2021-01-12 2021-06-01 上海肯汀通讯科技有限公司 Method, device, equipment and storage medium for identifying putting behaviors
CN113438286A (en) * 2021-06-15 2021-09-24 上海商汤智能科技有限公司 Information pushing method and device, electronic equipment and storage medium
CN113469021A (en) * 2021-06-29 2021-10-01 深圳市商汤科技有限公司 Video processing apparatus, electronic device, and computer-readable storage medium
CN114040244A (en) * 2021-10-14 2022-02-11 北京激浊扬清文化科技有限公司 Method, system, device and medium for reducing error events in edge vision scene
CN114640608A (en) * 2022-04-01 2022-06-17 上海商汤智能科技有限公司 Test method and device, electronic equipment and computer readable storage medium
WO2022222445A1 (en) * 2021-04-23 2022-10-27 深圳市商汤科技有限公司 Event detection output method, event policy determination method and apparatus, electronic device, and computer-readable storage medium

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112734699A (en) * 2020-12-24 2021-04-30 浙江大华技术股份有限公司 Article state warning method and device, storage medium and electronic device
CN112883782A (en) * 2021-01-12 2021-06-01 上海肯汀通讯科技有限公司 Method, device, equipment and storage medium for identifying putting behaviors
CN112883782B (en) * 2021-01-12 2023-03-24 上海肯汀通讯科技有限公司 Method, device, equipment and storage medium for identifying putting behaviors
WO2022222445A1 (en) * 2021-04-23 2022-10-27 深圳市商汤科技有限公司 Event detection output method, event policy determination method and apparatus, electronic device, and computer-readable storage medium
CN113438286A (en) * 2021-06-15 2021-09-24 上海商汤智能科技有限公司 Information pushing method and device, electronic equipment and storage medium
CN113469021A (en) * 2021-06-29 2021-10-01 深圳市商汤科技有限公司 Video processing apparatus, electronic device, and computer-readable storage medium
CN114040244A (en) * 2021-10-14 2022-02-11 北京激浊扬清文化科技有限公司 Method, system, device and medium for reducing error events in edge vision scene
CN114040244B (en) * 2021-10-14 2024-01-05 北京激浊扬清文化科技有限公司 Method, system, equipment and medium for reducing error event in edge vision scene
CN114640608A (en) * 2022-04-01 2022-06-17 上海商汤智能科技有限公司 Test method and device, electronic equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN112069939A (en) Event detection method and device, electronic equipment and storage medium
CN112069937A (en) Event detection method and device, electronic equipment and storage medium
CN108038837B (en) Method and system for detecting target in video
CN108734967B (en) Method, device and system for monitoring illegal vehicle
CN101163234A (en) Method of implementing pattern recognition and image monitoring using data processing device
CN108806272A (en) A kind of method and device for reminding more motor vehicle car owner's illegal parking behaviors
US11176698B2 (en) Analysis apparatus, analysis method, and storage medium
CN113380034B (en) Accident positioning method and apparatus, electronic device, and computer-readable storage medium
CN105979143A (en) Method and device for regulating spherical camera shooting parameters
CN110880205B (en) Parking charging method and device
CN113450578B (en) Traffic violation event evidence obtaining method, device, equipment and system
CN109118806A (en) A kind of unit exception detection method, apparatus and system
CN109120916B (en) Camera fault detection method and device and computer equipment
CN113362592A (en) Method, system, and computer-readable storage medium for identifying an offending traffic participant
CN112597924B (en) Electric bicycle track tracking method, camera device and server
CN113723282B (en) Vehicle driving prompting method, device, electronic equipment and storage medium
CN113112814B (en) Snapshot method and device without stopping right turn and computer storage medium
CN106358271B (en) Positioning method, method for determining identification wireless local area network and related device
CN110969895A (en) Vehicle distance detection method, device, system and server
CN113096394A (en) Method and device for determining object of target type, storage medium and electronic device
JP2002044647A (en) Audio-visual cooperative sensing method and system, and recording medium for recording the method
CN116597632A (en) Video alarm method based on dome camera and related device
CN104050812A (en) Security warning method based on virtualization boundary and vehicle license plate recognition technology
KR101961199B1 (en) Method and Apparatus for Recording Timeline
JP2020008924A (en) License plate recognition device, license plate recognition method, and program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20201211

WW01 Invention patent application withdrawn after publication