CN113011291A - Event detection method and device, electronic equipment and storage medium - Google Patents
Event detection method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN113011291A CN113011291A CN202110236987.7A CN202110236987A CN113011291A CN 113011291 A CN113011291 A CN 113011291A CN 202110236987 A CN202110236987 A CN 202110236987A CN 113011291 A CN113011291 A CN 113011291A
- Authority
- CN
- China
- Prior art keywords
- determining
- video stream
- escalator
- area
- speed
- 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.)
- Granted
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 125
- 238000000034 method Methods 0.000 claims abstract description 43
- 230000002159 abnormal effect Effects 0.000 claims description 61
- 230000033001 locomotion Effects 0.000 claims description 19
- 238000004590 computer program Methods 0.000 claims description 15
- 239000003550 marker Substances 0.000 claims description 5
- 238000012545 processing Methods 0.000 description 24
- 238000010586 diagram Methods 0.000 description 17
- 238000004891 communication Methods 0.000 description 10
- 230000006870 function Effects 0.000 description 10
- 238000005516 engineering process Methods 0.000 description 9
- 230000009466 transformation Effects 0.000 description 7
- 239000011159 matrix material Substances 0.000 description 6
- 206010000117 Abnormal behaviour Diseases 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 5
- 230000005236 sound signal Effects 0.000 description 4
- 230000006399 behavior Effects 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 3
- 238000013527 convolutional neural network Methods 0.000 description 3
- 238000012544 monitoring process Methods 0.000 description 3
- 230000001133 acceleration Effects 0.000 description 2
- 230000009471 action Effects 0.000 description 2
- 239000000835 fiber Substances 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000010295 mobile communication Methods 0.000 description 2
- 230000001902 propagating effect Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 238000012549 training Methods 0.000 description 2
- RYGMFSIKBFXOCR-UHFFFAOYSA-N Copper Chemical compound [Cu] RYGMFSIKBFXOCR-UHFFFAOYSA-N 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 229910052802 copper Inorganic materials 0.000 description 1
- 239000010949 copper Substances 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 238000009440 infrastructure construction Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 229910044991 metal oxide Inorganic materials 0.000 description 1
- 150000004706 metal oxides Chemical class 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/40—Scenes; Scene-specific elements in video content
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/40—Scenes; Scene-specific elements in video content
- G06V20/44—Event detection
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Image Analysis (AREA)
Abstract
The present disclosure relates to an event detection method and apparatus, an electronic device, and a storage medium, wherein the method includes: acquiring a first video stream of the escalator; carrying out human body detection on the first video stream, and determining a first area where a target object is located in the first video stream; determining a relative speed between the target object and the escalator according to a first image position of a target tracking point of the first area in a video frame of the first video stream; and determining an event detection result of the target object according to the relative speed. The method and the device for detecting the event can improve the accuracy of event detection.
Description
Technical Field
The present disclosure relates to the field of computer vision technologies, and in particular, to an event detection method and apparatus, an electronic device, and a storage medium.
Background
With the development of economy and the continuous improvement of infrastructure construction, the application of the escalator in markets, office buildings, public transportation and other scenes is more and more extensive. When the escalator brings convenience, the pedestrians have abnormal actions on the escalator, such as falling, retrograde motion, running, squatting and the like, and possible accidents are more and more attractive. If abnormal actions on the escalator cannot be detected in time and the escalator is alarmed to stop running in time, great loss can be caused to the life and property safety of pedestrians on the escalator.
Disclosure of Invention
The present disclosure provides an event detection technical solution.
According to an aspect of the present disclosure, there is provided an event detection method including: acquiring a first video stream of the escalator; carrying out human body detection on the first video stream, and determining a first area where a target object is located in the first video stream; determining a relative speed between the target object and the escalator according to a first image position of a target tracking point of the first area in a video frame of the first video stream; and determining an event detection result of the target object according to the relative speed.
In one possible implementation, the determining a relative speed between the target object and the escalator according to a first image position of a target tracking point of the first area in a video frame of the first video stream includes: determining a first plane position of the target tracking point in a plane coordinate system according to the first image position and a coordinate corresponding relation between the image coordinate system of the video frame and the plane coordinate system where the escalator is located; determining a first moving speed of the target object according to a first plane position of a target tracking point in a plurality of video frames of the first video stream; determining the relative speed according to the ratio of the first moving speed to the second moving speed of the escalator.
In one possible implementation, the determining a first moving speed of the target object according to a first plane position of a target tracking point in a plurality of video frames of the first video stream includes: and determining a first moving speed of the target object in the vertical direction by a least square straight line fitting mode according to the coordinates of the plurality of first plane positions in the vertical direction.
In one possible implementation, the method further includes: acquiring a calibration image of the escalator, wherein the acquisition area of the calibration image is the same as the acquisition area of the first video stream; determining a second area of the escalator in the calibration image; and determining the coordinate corresponding relation according to the second image positions of the multiple vertexes of the second area in the calibration image and the second plane positions of the multiple vertexes in the plane coordinate system.
In one possible implementation, the method further includes: acquiring a second video stream of the escalator, wherein the acquisition area of the second video stream is the same as that of the first video stream, and a calibration object is placed on the escalator; performing target detection on the second video stream, and determining a third area where a marker in the second video stream is located; determining a third plane position of the calibrated tracking point in the plane coordinate system according to a third image position of the calibrated tracking point of the third area in the video frame of the second video stream and the coordinate corresponding relation; determining a second moving speed of the escalator in the vertical direction according to a third plane position of a marked tracking point in a plurality of video frames of the second video stream.
In a possible implementation manner, the determining an event detection result of the target object according to the relative speed includes: determining that the event detection result is the occurrence of a first class of abnormal event if the relative speed is less than a first speed threshold; or when the relative speed is greater than or equal to the first speed threshold and less than or equal to a second speed threshold, determining that the event detection result is that no abnormal event occurs, wherein the second speed threshold is greater than the first speed threshold; or when the relative speed is greater than the second speed threshold and less than or equal to a third speed threshold, determining that the event detection result is that a second type of abnormal event occurs, wherein the third speed threshold is greater than the second speed threshold; or determining that the event detection result is the occurrence of an abnormal event of a third category when the relative speed is greater than the third speed threshold.
In one possible implementation, the method further includes: and sending alarm information corresponding to the type of the abnormal event when the event detection result indicates that the abnormal event occurs.
In one possible implementation, the first category of abnormal events includes retrograde events, the second category of abnormal events includes walking events, and the third category of abnormal events includes running events.
According to an aspect of the present disclosure, there is provided an event detection apparatus including:
the first video stream acquisition module is used for acquiring a first video stream of the escalator; the first area determining module is used for carrying out human body detection on the first video stream and determining a first area where a target object in the first video stream is located; a relative speed determination module for determining a relative speed between the target object and the escalator according to a first image position of a target tracking point of the first area in a video frame of the first video stream; and the event detection module is used for determining an event detection result of the target object according to the relative speed.
In one possible implementation, the relative speed determination module includes: the position determining submodule is used for determining a first plane position of the target tracking point in a plane coordinate system according to the first image position and a coordinate corresponding relation between the image coordinate system of the video frame and the plane coordinate system where the escalator is located; a speed determination submodule, configured to determine a first moving speed of the target object according to a first plane position of a target tracking point in a plurality of video frames of the first video stream; and the relative speed determining submodule is used for determining the relative speed according to the ratio of the first moving speed to the second moving speed of the escalator.
In one possible implementation, the speed determination submodule is configured to: and determining a first moving speed of the target object in the vertical direction by a least square straight line fitting mode according to the coordinates of the plurality of first plane positions in the vertical direction.
In one possible implementation, the apparatus further includes: the calibration image acquisition module is used for acquiring a calibration image of the escalator, and the acquisition area of the calibration image is the same as that of the first video stream; the second area determining module is used for determining a second area of the escalator in the calibration image; and the coordinate relation determining module is used for determining the coordinate corresponding relation according to the second image positions of the plurality of vertexes of the second area in the calibration image and the second plane positions of the plurality of vertexes in the plane coordinate system.
In one possible implementation, the apparatus further includes: the second video stream acquisition module is used for acquiring a second video stream of the escalator, the acquisition area of the second video stream is the same as that of the first video stream, and a calibration object is placed on the escalator; a third area determining module, configured to perform target detection on the second video stream, and determine a third area in which a marker in the second video stream is located; a position determining module, configured to determine a third plane position of the calibration tracking point in the plane coordinate system according to a third image position of the calibration tracking point in the video frame of the second video stream in the third area and the coordinate correspondence; and the speed determining module is used for determining a second moving speed of the escalator in the vertical direction according to a third plane position of the marked tracking point in a plurality of video frames of the second video stream.
In one possible implementation, the event detection module is further configured to: determining that the event detection result is the occurrence of a first class of abnormal event if the relative speed is less than a first speed threshold; or when the relative speed is greater than or equal to the first speed threshold and less than or equal to a second speed threshold, determining that the event detection result is that no abnormal event occurs, wherein the second speed threshold is greater than the first speed threshold; or when the relative speed is greater than the second speed threshold and less than or equal to a third speed threshold, determining that the event detection result is that a second type of abnormal event occurs, wherein the third speed threshold is greater than the second speed threshold; or determining that the event detection result is the occurrence of an abnormal event of a third category when the relative speed is greater than the third speed threshold.
In one possible implementation, the apparatus further includes: and the alarm module is used for sending alarm information corresponding to the type of the abnormal event under the condition that the event detection result is that the abnormal event occurs.
In one possible implementation, the first category of abnormal events includes retrograde events, the second category of abnormal events includes walking events, and the third category of abnormal events includes running events.
According to an aspect of the present disclosure, there is provided an electronic device including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to invoke the memory-stored instructions to perform the above-described method.
According to an aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the above-described method.
According to the embodiment of the disclosure, the area where the object is located in the video stream can be detected; determining the relative speed between the object and the escalator according to the image position of the target tracking point of the area; the event detection result is determined according to the relative speed, and the accuracy of event detection can be improved, so that the probability of accidents is reduced, and the cost of manpower detection is reduced.
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 disclosure. Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure.
Fig. 1 shows a flow diagram of an event detection method according to an embodiment of the present disclosure.
Fig. 2a and 2b show a schematic view of an escalator in a planar coordinate system.
Fig. 3 shows a block diagram of an event detection device according to an embodiment of the present disclosure.
Fig. 4 shows a block diagram of an electronic device in accordance with an embodiment of the disclosure.
Fig. 5 shows a block diagram of an electronic device in accordance with an embodiment of the disclosure.
Detailed Description
Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers can indicate functionally identical or similar elements. While the various aspects of the embodiments are presented in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
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 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.
Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements and circuits that are well known to those skilled in the art have not been described in detail so as not to obscure the present disclosure.
The event detection method can be applied to scenes such as shopping malls, office buildings, public transportation and the like, and based on a deep learning method, the motion speed of an object (such as a pedestrian) is estimated by analyzing the video stream of the region where the escalator is located in the scene, and is compared with the elevator speed, so that whether the pedestrian has abnormal behaviors such as running or retrograde motion or not is judged. When abnormal behaviors occur, the area of the escalator where the abnormal behaviors occur is located and timely alarmed so as to carry out corresponding treatment, for example, the operation of the escalator is stopped, and therefore the risk of safety accidents is reduced.
Fig. 1 shows a flowchart of an event detection method according to an embodiment of the present disclosure, as shown in fig. 1, the event detection method includes:
in step S11, a first video stream of the escalator is acquired;
in step S12, performing human body detection on the first video stream, and determining a first area where a target object is located in the first video stream;
in step S13, determining a relative speed between the target object and the escalator according to a first image position of a target tracking point of the first area in a video frame of the first video stream;
in step S14, an event detection result of the target object is determined according to the relative velocity of the target object.
In one possible implementation, the event detection method may be performed by an electronic device such as a terminal device or a server, where the terminal device may be a User Equipment (UE), a mobile device, a User terminal, a cellular phone, a cordless phone, a Personal Digital Assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, or the like, and the method may be implemented by a processor calling a computer-readable instruction stored in a memory. Alternatively, the method may be performed by a server.
For example, at least one image capturing device, such as at least one camera facing the escalator, may be disposed at the position of the escalator to be detected, so as to capture the video stream of the escalator and detect an object (e.g., a pedestrian) riding on the escalator in the video stream. The installation position of the image acquisition device, the acquisition mode of the video stream and the specific area corresponding to the video stream are not limited in the disclosure.
In one possible implementation, in step S11, a video stream (referred to as a first video stream) of the escalator may be acquired, for example, the first video stream uploaded by the image capture device is received; and decoding the acquired first video stream to obtain a decoded first video stream (also referred to as a picture stream).
In one possible implementation manner, in step S12, human body detection may be performed on the decoded first video stream, and a human body frame in each video frame of the video stream is determined; and tracking the human body frames in the video frames to determine the human body frames of pedestrians (which can be called target objects) belonging to the same identity, namely, to determine a first area where the target object in the first video stream is located.
The human body detection mode can be, for example, human body key point identification, human body contour detection and the like; the human body tracking mode may be, for example, determining objects belonging to the same identity according to the intersection ratio of human body frames in adjacent video frames. It will be appreciated by those skilled in the art that human detection and tracking can be accomplished in any manner known in the relevant art, and the present disclosure is not limited thereto.
In one possible implementation, human detection and tracking may be performed on each video frame of the first video stream; the first video stream can also be sampled at certain time intervals, and human body detection and tracking are carried out on sampled video frames; and key frames in the first video stream can be acquired, and human body detection and tracking can be carried out on the key frames. The present disclosure is not so limited.
In one possible implementation, after the first area is determined, at least one target tracking point may be determined from the first area so as to calculate the moving speed of the target object. The vertex, the center point, or a point on the boundary of the area of the first area may be used as the target tracking point, for example, and the present disclosure does not limit the selection of the target tracking point.
In one possible implementation manner, in step S13, the moving speed of the target object may be calculated according to the first image position of the target tracking point in a plurality of video frames, for example, the moving speed of the target object may be calculated by a least-squares straight line fitting manner according to a plurality of position coordinates of the target tracking point; according to the predetermined moving speed of the escalator and the moving speed of the target object, the relative speed between the target object and the escalator can be determined.
In one possible implementation manner, in step S14, an event detection result of the target object may be determined according to the relative speed. For example, a plurality of speed thresholds may be preset, and the event detection result is determined as the occurrence of an abnormal event or the non-occurrence of an abnormal event according to the relationship between the relative speed and each speed threshold.
In one possible implementation, the object on the escalator may have abnormal behavior such as retrograde motion, walking, or running, and accordingly, the abnormal event may include a plurality of categories. For example, a first category of exception events includes retrograde events, a second category of exception events includes walking events, a third category of exception events includes running events, and the like. The present disclosure is not limited to a particular category of exception event.
In one possible implementation, if the event detection result is that an abnormal event occurs, alarm information corresponding to the category of the abnormal event may be generated and transmitted. The alarm information may include a reminder of the abnormal event and may also include an area where the target object in which the abnormal event occurs is located, so that the relevant person can perform positioning. The specific content of the alarm information is not limited by the present disclosure.
In one possible implementation, an alarm message can be sent, for example, to the control device of the escalator, so that the control device stops the operation of the escalator; the warning information can also be sent to the related personnel in charge of the escalator operation, so that the related personnel stop the escalator operation and go to the escalator for rescue and the like. The present disclosure does not limit the content of the warning information.
According to the embodiment of the disclosure, the area where the object is located in the video stream can be detected; determining the relative speed between the object and the escalator according to the image position of the target tracking point of the area; the event detection result is determined according to the relative speed, and the accuracy of event detection can be improved, so that the probability of accidents is reduced, and the cost of manpower detection is reduced.
The following provides an explanation of the event detection method of the embodiments of the present disclosure.
As described above, the video stream of the area where the escalator is located may be collected by the camera, and the collected video stream may be transmitted to the local electronic device such as the front server or the cloud server. The electronic device may decode the received video stream to obtain a decoded video stream.
In step S12, the human body detection and tracking may be performed on the decoded video stream through the detection and tracking network, so as to detect the human body frame in each video frame of the video stream, and track the human body frames of pedestrians belonging to the same identity, thereby obtaining the first region where the target object in the video stream is located. The detection tracking network may be a convolutional neural network, and the network structure of the detection tracking network is not limited by the present disclosure.
After the first region is obtained, the position of the target tracking point in the first region may be determined in order to calculate the moving speed of the target object.
Because the perspective transformation effect (that is, the size of the target in the image) exists in the image coordinate system of the video frame, the moving speeds of the escalator are different, and the subsequent analysis is not convenient, the plane coordinate system of the plane where the escalator is located can be adopted, so that the subsequent processing is convenient. In this case, the coordinate correspondence between the image coordinate system of the video frame and the plane coordinate system of the escalator may be determined in advance before the event detection is performed.
In one possible implementation manner, the event detection method according to the embodiment of the present disclosure may further include:
acquiring a calibration image of the escalator, wherein the acquisition area of the calibration image is the same as the acquisition area of the first video stream;
determining a second area of the escalator in the calibration image;
and determining the coordinate corresponding relation according to the second image positions of the multiple vertexes of the second area in the calibration image and the second plane positions of the multiple vertexes in the plane coordinate system.
For example, the image of the escalator can be acquired by the camera under the condition that no or few pedestrians exist as a calibration image; or a video frame is selected from the video stream of the escalator to be used as a calibration image. The capture area of the calibration image is the same as the capture area of the first video stream. The present disclosure does not limit the manner in which the calibration image is obtained.
In one possible implementation, the area of the escalator in the calibration image (which may be referred to as the second area) may be determined. The second area can be marked manually; and the area detection can be carried out on the calibration image through the trained area detection network, so that the second area of the escalator in the calibration image is determined. The area detection network may be, for example, a convolutional neural network, and the present disclosure does not limit the specific network structure and training mode of the area detection network.
In one possible implementation, the position coordinates of a plurality of vertices of the second region in the calibration image (which may be referred to as second image positions) may be determined, for example, the position coordinates of four vertices of the second region in the image coordinate system, i.e., top left, top right, bottom left, and bottom right.
In one possible implementation, the position coordinates (x) of the four vertices p1, p2, p3, p4 in the image coordinate system can be marked according to the moving direction of the escalator1,y1),(x2,y2),(x3,y3),(x4,y4) Setting the second plane positions of the four vertexes p1, p2, p3 and p4 in the plane coordinate system of the escalator as respectively; (x'1,y′1)=(0,0),(x′2,y′2)=(w,0),(x′3,y′3)=(0,h),(x′4,y′4) (w, h) wherein w and h are in a planar coordinate system, respectivelyThe width and the height of the elevator can be arbitrarily assigned with a positive real number.
Fig. 2a and 2b show a schematic view of an escalator in a planar coordinate system. Fig. 2a shows the situation with the moving direction of the escalator upwards; fig. 2b shows the situation with the moving direction of the escalator downwards.
In one possible implementation, a perspective transformation matrix (referred to as an H matrix) between the image coordinate system and the plane coordinate system, that is, a coordinate correspondence between the image coordinate system and the plane coordinate system, may be calculated according to the second image positions of the vertices p1, p2, p3, p4 in the image coordinate system and the second plane positions of the vertices p1, p2, p3, p4 in the plane coordinate system. The perspective transformation matrix has 8 undetermined parameters, and the perspective transformation matrix between the image coordinate system and the plane coordinate system can be uniquely determined through four vertexes p1, p2, p3 and p 4.
In this way, the coordinate corresponding relation between the image coordinate system and the plane coordinate system can be determined, so that the position coordinates of the escalator and the object can be transformed in the subsequent processing, and the convenience and the accuracy of speed calculation are improved.
The moving speed of the escalator can also be calibrated in advance before the event detection is carried out.
In one possible implementation manner, the event detection method according to the embodiment of the present disclosure may further include:
acquiring a second video stream of the escalator, wherein the acquisition area of the second video stream is the same as that of the first video stream, and a calibration object is placed on the escalator;
performing target detection on the second video stream, and determining a third area where a marker in the second video stream is located;
determining a third plane position of the calibrated tracking point in the plane coordinate system according to a third image position of the calibrated tracking point of the third area in the video frame of the second video stream and the coordinate corresponding relation;
determining a second moving speed of the escalator in the vertical direction according to a third plane position of a marked tracking point in a plurality of video frames of the second video stream.
For example, a calibration object that is stationary relative to the escalator can be placed on the escalator with no or few pedestrians, and a video stream (which may be referred to as a second video stream) of the escalator can be captured by the camera. Wherein the acquisition area of the second video stream is the same as the acquisition area of the first video stream. The object may be, for example, an article or a worker, etc., to which the present disclosure is not limited.
In one possible implementation, a section of the video stream in which a person or an article stationary relative to the escalator is present may also be intercepted from the first video stream of the escalator as a second video stream; and the person or item is used as a calibration object. The present disclosure does not limit the manner in which the second video stream is obtained.
In one possible implementation, target detection may be performed on at least two video frames of the second video stream through a trained target detection network, and a region of the calibration object in the video frames (which may be referred to as a third region) is determined. The target detection network may be, for example, a convolutional neural network, and the present disclosure does not limit the specific network structure and training manner of the target detection network.
In a possible implementation manner, a calibrated tracking point in the third region may be determined, and the calibrated tracking point may be, for example, a vertex, a center point, or a point on a boundary of the region of the third region.
In one possible implementation, the image coordinates (referred to as third image position) of the nominal tracking point in the ith video frame and the jth video frame of the second video stream are set to (x)i,yi) And (x)j,yj). From the coordinate correspondence (i.e., H matrix) determined above, the position coordinates (referred to as the third plane position) of the calibration tracking point in the plane coordinate system can be determined as (x)i′,yi') and (x)j′,yj′)。
In a possible implementation manner, if the moving speed of the escalator is constant and the speed is constant, the third implementation manner can be adoptedPlane position (x)i′,yi') and (x)j′,yj') the second moving speed v of the escalator in the vertical direction is determined by the following formula (1)y0:
vy0=(y′j-y′i)/(j-i) (1)
In this way, the moving speed of the escalator can be calibrated in advance in order to determine the relative speed in the subsequent processing.
After the first area is obtained in step S12, the position of the target tracking point in the first area may be determined so as to calculate the moving speed of the target object.
Considering that the body of the target object may move, resulting in position change; and the foot of the target object usually falls on the elevator plane, and the position is more accurate, so the middle point of the bottom edge of the first area can be used as a target tracking point, so that the accuracy of the calculation of the moving speed is improved.
In one possible implementation manner, the coordinates of the lower left vertex and the lower right vertex of the first region in the image coordinate system are respectively set as (x)bl,ybl) And (x)br,ybr) Then the coordinates of the target tracking point in the image coordinate system can be expressed as (x)c,yc)=((xbl+xbr)/2,(ybl+ybr) 2), i.e. the first image position.
In one possible implementation, step S13 may include:
determining a first plane position of the target tracking point in a plane coordinate system according to the first image position and a coordinate corresponding relation between the image coordinate system of the video frame and the plane coordinate system where the escalator is located;
determining a first moving speed of the target object according to a first plane position of a target tracking point in a plurality of video frames of the first video stream;
determining the relative speed according to the ratio of the first moving speed to the second moving speed of the escalator.
For example, the first image position (x) of the target tracking point can be determined according to the coordinate correspondence (i.e. H matrix) between the image coordinate system of the video frame and the plane coordinate system of the escalatorc,yc) Performing coordinate transformation to obtain a first plane position (x ') of the target tracking point in a plane coordinate system'c,yc'). From a first planar position of a target tracking point of the target object in a plurality of video frames, a first movement velocity may be determined.
In one possible implementation, the step of determining a first moving speed of the target object according to a first plane position of a target tracking point in a plurality of video frames of the first video stream may include:
and determining a first moving speed of the target object in the vertical direction by a least square straight line fitting mode according to the coordinates of the plurality of first plane positions in the vertical direction.
That is, coordinate transformation may be performed according to first image positions of the target tracking point in a video frame at the current time and a plurality of video frames (for example, 30 video frames) before the current time, respectively, to obtain a plurality of first plane positions; y 'according to ordinate of a plurality of first planar positions'cThe first moving speed v of the target object in the vertical direction at the current moment can be estimated by adopting a least square straight line fitting modey. In this way, the accuracy of the velocity calculation can be improved.
It should be understood that other ways of estimating the first moving speed may be used, and the disclosure is not limited thereto.
In one possible implementation, the relative speed v between the target object and the escalator is determined as a function of the ratio between the first movement speed and the second movement speed of the escalatorr。
Because the first moving speed and the second moving speed are relative numerical values, the accuracy of subsequent judgment can be improved by adopting a speed ratio mode. It should be understood that other ways of determining the relative speed between the target object and the escalator may be used, as the present disclosure is not limited thereto.
In this way, the relative speed between the target object and the escalator can be determined for subsequent determination of whether an abnormal event has occurred.
In one possible implementation manner, determining the event detection result of the target object according to the relative speed in step S14 includes:
determining that the event detection result is the occurrence of a first class of abnormal event if the relative speed is less than a first speed threshold; or
Determining that the event detection result is that no abnormal event occurs when the relative speed is greater than or equal to the first speed threshold and less than or equal to a second speed threshold, wherein the second speed threshold is greater than the first speed threshold; or
Determining that the event detection result is that a second type of abnormal event occurs when the relative speed is greater than the second speed threshold and less than or equal to a third speed threshold, wherein the third speed threshold is greater than the second speed threshold; or
And determining that the event detection result is the occurrence of an abnormal event of a third category when the relative speed is greater than the third speed threshold.
For example, for abnormal behaviors such as retrograde motion, walking or running which may occur to an object on an escalator, a first category of abnormal events may be set to include retrograde motion events, a second category of abnormal events may include walking events, and a third category of abnormal events may include running events. The present disclosure is not limited to a particular category of exception event.
In one possible implementation, a plurality of speed thresholds may be set respectively according to a plurality of categories of abnormal events, and the event detection result is determined according to the relationship between the relative speed and each speed threshold. For example, a first speed threshold Thresh may be setbackA second speed threshold ThreshwalkAnd a third speed threshold ThreshrunThe second speed threshold is greater than the first speed threshold, and the third speed threshold is greater than the second speed threshold.
The first speed threshold may be, for example, -0.9, the second speed threshold may be, for example, 0.9, and the third speed threshold may be, for example, 1.8. The present disclosure is not limited to specific values for each speed threshold.
Table 1 shows the correspondence between the relative speed and the determination result.
TABLE 1
Relative velocity | The result of the judgment |
vr<Threshback | Retrograde motion |
Threshback≤vr≤Threshwalk | At rest |
Threshwalk<vr≤Threshrun | Walk |
Threshrun<vr | Running motion |
In one possible implementation, as shown in Table 1, if the relative velocity vrLess than a first speed threshold ThreshbackThen, the moving direction and the electromotive force of the target object can be consideredThe escalator is opposite, and the reverse speed is great. In this case, it may be determined that the target object has a retrograde motion behavior, and the event detection result is determined to be the occurrence of a retrograde event.
In one possible implementation, as shown in Table 1, if the relative velocity vrGreater than or equal to a first speed threshold ThreshbackAnd is less than or equal to the second speed threshold ThreshwalkThe speed of the target object relative to the escalator can be considered to be small. In this case, it can be determined that the target object is stationary on the escalator, and the event detection result is determined that no abnormal event has occurred.
In one possible implementation, as shown in Table 1, if the relative velocity vrGreater than a second speed threshold ThreshwalkAnd is less than or equal to a third speed threshold ThreshrunThen the target object can be considered to be walking forward on the escalator. In this case, the event detection result is determined as the occurrence of a walking event.
In one possible implementation, as shown in Table 1, if the relative velocity vrGreater than a third speed threshold ThreshrunThen the target object can be considered to be running forward on the escalator. In this case, the event detection result is determined as the occurrence of the running event.
In a possible implementation manner, the abnormal event may also be determined to occur when the relative speed is within the corresponding threshold interval and lasts for a certain time, so as to avoid false detection which may occur when the relative speed is determined once. The present disclosure does not limit the specific determination method.
By the method, abnormal events of retrograde motion, walking and running can be judged, the accuracy of event detection is improved, and the cost of manpower detection is reduced.
In one possible implementation manner, after determining the event detection result in step S14, the event detection method according to the embodiment of the present disclosure may further include:
and sending alarm information corresponding to the type of the abnormal event when the event detection result indicates that the abnormal event occurs.
That is, if the event detection result is that an abnormal event occurs, alarm information corresponding to the category of the abnormal event, i.e., alarm information corresponding to a retrograde motion event, a walking event, or a running event, may be generated and transmitted.
In one possible implementation, the alarm information may also be generated and sent when some types of abnormal events occur. For example, only when a retrograde motion event occurs, alarm information is sent; or sending alarm information when a retrograde motion event or a running event occurs. The present disclosure does not limit the transmission condition of the alarm information.
In a possible implementation manner, the alarm information may include a reminder of the abnormal event and may further include an area where the target object in which the abnormal event occurs is located, so that the relevant person can perform positioning. The specific content of the alarm information is not limited by the present disclosure.
In one possible implementation, an alarm message can be sent, for example, to the control device of the escalator, so that the control device stops the operation of the escalator; the warning information can also be sent to the related personnel in charge of the escalator operation, so that the related personnel stop the escalator operation and go to the escalator for rescue and the like. The present disclosure does not limit the content of the warning information.
By the mode, the alarm can be given in time when the abnormity is judged so as to carry out corresponding treatment, thereby reducing the risk of safety accidents.
According to the event detection method disclosed by the embodiment of the disclosure, the area where the object is located in the video stream can be detected, the transformation of the tracking point of the area between the image coordinate system of the video frame and the plane coordinate system of the elevator is realized, and the speed of the pedestrian under the plane coordinate system of the elevator is estimated, so that whether dangerous actions such as retrograde motion, walking, running and the like of the pedestrian exist or not is judged, an alarm is given in time, the accuracy of event detection can be improved, and the risk of safety accidents is reduced.
According to the event detection method disclosed by the embodiment of the disclosure, event detection can be realized only by using a monocular camera without other sensors (such as an infrared sensor and the like); and moreover, the processing mode of the relative speed of the pedestrian relative to the elevator is adopted, extra strict calibration is not needed, the escalator elevator equipment with different speed configurations can be adapted, and the efficiency of event detection is effectively improved.
The event detection method can be applied to the field of security monitoring and applied to escalator pedestrian dangerous behavior detection and alarm related products, for example, the method is deployed in an escalator self-service monitoring system in application scenes such as superstores, supermarkets, subway stations and office buildings, and automatic detection and alarm of dangerous behaviors such as pedestrian retrograde motion, walking and running on an elevator are realized, so that elevator deceleration or elevator stopping measures are taken, and the cost of manpower monitoring is reduced.
It is understood that the above-mentioned method embodiments of the present disclosure can be combined with each other to form a combined embodiment without departing from the logic of the principle, which is limited by the space, and the detailed description of the present disclosure is omitted. Those skilled in the art will appreciate that in the above methods of the specific embodiments, the specific order of execution of the steps should be determined by their function and possibly their inherent logic.
In addition, the present disclosure also provides an event detection apparatus, an electronic device, a computer-readable storage medium, and a program, which can be used to implement any event detection method provided by the present disclosure, and the corresponding technical solutions and descriptions and corresponding descriptions in the method section are not repeated.
Fig. 3 shows a block diagram of an event detection apparatus according to an embodiment of the present disclosure, which, as shown in fig. 3, includes:
a first video stream acquiring module 31, configured to acquire a first video stream of the escalator;
a first region determining module 32, configured to perform human body detection on the first video stream, and determine a first region where a target object in the first video stream is located;
a relative speed determination module 33, configured to determine a relative speed between the target object and the escalator according to a first image position of a target tracking point of the first area in a video frame of the first video stream;
and the event detection module 34 is configured to determine an event detection result of the target object according to the relative speed.
In one possible implementation, the relative speed determination module includes: the position determining submodule is used for determining a first plane position of the target tracking point in a plane coordinate system according to the first image position and a coordinate corresponding relation between the image coordinate system of the video frame and the plane coordinate system where the escalator is located; a speed determination submodule, configured to determine a first moving speed of the target object according to a first plane position of a target tracking point in a plurality of video frames of the first video stream; and the relative speed determining submodule is used for determining the relative speed according to the ratio of the first moving speed to the second moving speed of the escalator.
In one possible implementation, the speed determination submodule is configured to: and determining a first moving speed of the target object in the vertical direction by a least square straight line fitting mode according to the coordinates of the plurality of first plane positions in the vertical direction.
In one possible implementation, the apparatus further includes: the calibration image acquisition module is used for acquiring a calibration image of the escalator, and the acquisition area of the calibration image is the same as that of the first video stream; the second area determining module is used for determining a second area of the escalator in the calibration image; and the coordinate relation determining module is used for determining the coordinate corresponding relation according to the second image positions of the plurality of vertexes of the second area in the calibration image and the second plane positions of the plurality of vertexes in the plane coordinate system.
In one possible implementation, the apparatus further includes: the second video stream acquisition module is used for acquiring a second video stream of the escalator, the acquisition area of the second video stream is the same as that of the first video stream, and a calibration object is placed on the escalator; a third area determining module, configured to perform target detection on the second video stream, and determine a third area in which a marker in the second video stream is located; a position determining module, configured to determine a third plane position of the calibration tracking point in the plane coordinate system according to a third image position of the calibration tracking point in the video frame of the second video stream in the third area and the coordinate correspondence; and the speed determining module is used for determining a second moving speed of the escalator in the vertical direction according to a third plane position of the marked tracking point in a plurality of video frames of the second video stream.
In one possible implementation, the event detection module is further configured to: determining that the event detection result is the occurrence of a first class of abnormal event if the relative speed is less than a first speed threshold; or when the relative speed is greater than or equal to the first speed threshold and less than or equal to a second speed threshold, determining that the event detection result is that no abnormal event occurs, wherein the second speed threshold is greater than the first speed threshold; or when the relative speed is greater than the second speed threshold and less than or equal to a third speed threshold, determining that the event detection result is that a second type of abnormal event occurs, wherein the third speed threshold is greater than the second speed threshold; or determining that the event detection result is the occurrence of an abnormal event of a third category when the relative speed is greater than the third speed threshold.
In one possible implementation, the apparatus further includes: and the alarm module is used for sending alarm information corresponding to the type of the abnormal event under the condition that the event detection result is that the abnormal event occurs.
In one possible implementation, the first category of abnormal events includes retrograde events, the second category of abnormal events includes walking events, and the third category of abnormal events includes running events.
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.
Embodiments of the present disclosure also provide a computer-readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the above-mentioned method. The computer readable storage medium may be a non-volatile computer readable storage medium.
An embodiment of the present disclosure further provides an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to invoke the memory-stored instructions to perform the above-described method.
The embodiments of the present disclosure also provide a computer program product, which includes computer readable code, and when the computer readable code runs on a device, a processor in the device executes instructions for implementing the event detection method provided in any one of the above embodiments.
The embodiments of the present disclosure also provide another computer program product for storing computer readable instructions, which when executed cause a computer to perform the operations of the event detection method provided in any of the above embodiments.
The electronic device may be provided as a terminal, server, or other form of device.
Fig. 4 illustrates a block diagram of an electronic device 800 in accordance with an embodiment of the disclosure. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, or the like terminal.
Referring to fig. 4, electronic device 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 806 provides power to the various components of the electronic device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.
The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the electronic device 800 is in an operation mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the electronic device 800. For example, the sensor assembly 814 may detect an open/closed state of the electronic device 800, the relative positioning of components, such as a display and keypad of the electronic device 800, the sensor assembly 814 may also detect a change in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, orientation or acceleration/deceleration of the electronic device 800, and a change in the temperature of the electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a Complementary Metal Oxide Semiconductor (CMOS) or Charge Coupled Device (CCD) image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 may access a wireless network based on a communication standard, such as a wireless network (WiFi), a second generation mobile communication technology (2G) or a third generation mobile communication technology (3G), or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium, such as the memory 804, is also provided that includes computer program instructions executable by the processor 820 of the electronic device 800 to perform the above-described methods.
Fig. 5 illustrates a block diagram of an electronic device 1900 in accordance with an embodiment of the disclosure. For example, the electronic device 1900 may be provided as a server. Referring to fig. 5, electronic device 1900 includes a processing component 1922 further including one or more processors and memory resources, represented by memory 1932, for storing instructions, e.g., applications, executable by processing component 1922. The application programs stored in memory 1932 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1922 is configured to execute instructions to perform the above-described method.
The electronic device 1900 may also include a power component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input/output (I/O) interface 1958. The electronic device 1900 may operate based on an operating system, such as the Microsoft Server operating system (Windows Server), stored in the memory 1932TM) Graphical user interface based on apple IncSurface operating system (Mac OS X)TM) Multi-user, multi-process computer operating system (Unix)TM) Free and open native code Unix-like operating System (Linux)TM) Open native code Unix-like operating System (FreeBSD)TM) Or the like.
In an exemplary embodiment, a non-transitory computer readable storage medium, such as the memory 1932, is also provided that includes computer program instructions executable by the processing component 1922 of the electronic device 1900 to perform the above-described methods.
The present disclosure may be systems, methods, and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for causing a processor to implement various aspects of the present disclosure.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but is not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer program instructions for carrying out operations of the present disclosure may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, the electronic circuitry that can execute the computer-readable program instructions implements aspects of the present disclosure by utilizing the state information of the computer-readable program instructions to personalize the electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA).
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The computer program product may be embodied in hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied in a computer storage medium, and in another alternative embodiment, the computer program product is embodied in a Software product, such as a Software Development Kit (SDK), or the like.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.
Claims (11)
1. An event detection method, comprising:
acquiring a first video stream of the escalator;
carrying out human body detection on the first video stream, and determining a first area where a target object is located in the first video stream;
determining a relative speed between the target object and the escalator according to a first image position of a target tracking point of the first area in a video frame of the first video stream;
and determining an event detection result of the target object according to the relative speed.
2. The method of claim 1, wherein determining the relative speed between the target object and the escalator from a first image position of a target tracking point of the first zone in a video frame of the first video stream comprises:
determining a first plane position of the target tracking point in a plane coordinate system according to the first image position and a coordinate corresponding relation between the image coordinate system of the video frame and the plane coordinate system where the escalator is located;
determining a first moving speed of the target object according to a first plane position of a target tracking point in a plurality of video frames of the first video stream;
determining the relative speed according to the ratio of the first moving speed to the second moving speed of the escalator.
3. The method of claim 2, wherein determining the first movement velocity of the target object based on the first planar position of the target tracking point in the plurality of video frames of the first video stream comprises:
and determining a first moving speed of the target object in the vertical direction by a least square straight line fitting mode according to the coordinates of the plurality of first plane positions in the vertical direction.
4. A method according to claim 2 or 3, characterized in that the method further comprises:
acquiring a calibration image of the escalator, wherein the acquisition area of the calibration image is the same as the acquisition area of the first video stream;
determining a second area of the escalator in the calibration image;
and determining the coordinate corresponding relation according to the second image positions of the multiple vertexes of the second area in the calibration image and the second plane positions of the multiple vertexes in the plane coordinate system.
5. The method according to any one of claims 2-4, further comprising:
acquiring a second video stream of the escalator, wherein the acquisition area of the second video stream is the same as that of the first video stream, and a calibration object is placed on the escalator;
performing target detection on the second video stream, and determining a third area where a marker in the second video stream is located;
determining a third plane position of the calibrated tracking point in the plane coordinate system according to a third image position of the calibrated tracking point of the third area in the video frame of the second video stream and the coordinate corresponding relation;
determining a second moving speed of the escalator in the vertical direction according to a third plane position of a marked tracking point in a plurality of video frames of the second video stream.
6. The method according to any one of claims 1-5, wherein determining the event detection result of the target object according to the relative velocity comprises:
determining that the event detection result is the occurrence of a first class of abnormal event if the relative speed is less than a first speed threshold; or
Determining that the event detection result is that no abnormal event occurs when the relative speed is greater than or equal to the first speed threshold and less than or equal to a second speed threshold, wherein the second speed threshold is greater than the first speed threshold; or
Determining that the event detection result is that a second type of abnormal event occurs when the relative speed is greater than the second speed threshold and less than or equal to a third speed threshold, wherein the third speed threshold is greater than the second speed threshold; or
And determining that the event detection result is the occurrence of an abnormal event of a third category when the relative speed is greater than the third speed threshold.
7. The method of claim 6, further comprising:
and sending alarm information corresponding to the type of the abnormal event when the event detection result indicates that the abnormal event occurs.
8. The method of claim 6 or 7, wherein the first category of exception events comprises a retrograde event, the second category of exception events comprises a walking event, and the third category of exception events comprises a running event.
9. An event detection device, comprising:
the first video stream acquisition module is used for acquiring a first video stream of the escalator;
the first area determining module is used for carrying out human body detection on the first video stream and determining a first area where a target object in the first video stream is located;
a relative speed determination module for determining a relative speed between the target object and the escalator according to a first image position of a target tracking point of the first area in a video frame of the first video stream;
and the event detection module is used for determining an event detection result of the target object according to the relative speed.
10. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to invoke the memory-stored instructions to perform the method of any one of claims 1 to 8.
11. A computer readable storage medium having computer program instructions stored thereon, which when executed by a processor implement the method of any one of claims 1 to 8.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110236987.7A CN113011291B (en) | 2021-03-03 | 2021-03-03 | Event detection method and device, electronic equipment and storage medium |
PCT/CN2021/107285 WO2022183663A1 (en) | 2021-03-03 | 2021-07-20 | Event detection method and apparatus, and electronic device, storage medium and program product |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110236987.7A CN113011291B (en) | 2021-03-03 | 2021-03-03 | Event detection method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113011291A true CN113011291A (en) | 2021-06-22 |
CN113011291B CN113011291B (en) | 2024-08-09 |
Family
ID=76404355
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110236987.7A Active CN113011291B (en) | 2021-03-03 | 2021-03-03 | Event detection method and device, electronic equipment and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN113011291B (en) |
WO (1) | WO2022183663A1 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113673443A (en) * | 2021-08-24 | 2021-11-19 | 长沙海信智能系统研究院有限公司 | Object reverse detection method and device, electronic equipment and storage medium |
CN114882393A (en) * | 2022-03-29 | 2022-08-09 | 华南理工大学 | Road reverse running and traffic accident event detection method based on target detection |
WO2022183663A1 (en) * | 2021-03-03 | 2022-09-09 | 上海商汤智能科技有限公司 | Event detection method and apparatus, and electronic device, storage medium and program product |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101607668A (en) * | 2008-06-17 | 2009-12-23 | 上海阿艾依智控系统有限公司 | Embedded computer vision escalator pedestrian flow supervision and alarm device |
CN101670973A (en) * | 2008-09-09 | 2010-03-17 | 东芝电梯株式会社 | Escalator monitoring system |
EP2909122A1 (en) * | 2012-10-18 | 2015-08-26 | Inventio AG | Safety device of an elevator system |
CN105654060A (en) * | 2016-01-04 | 2016-06-08 | 中海网络科技股份有限公司 | Method for acquiring vehicle speed from road monitoring video |
WO2017093818A1 (en) * | 2015-11-30 | 2017-06-08 | Geden Roger Graham | Improvements in or relating to linear escalators |
CN107220992A (en) * | 2017-06-16 | 2017-09-29 | 华南理工大学 | With reference to machine vision and the escalator floor plates video frequency monitoring method of infrared array |
CN108287250A (en) * | 2018-02-01 | 2018-07-17 | 中国计量大学 | Escalator step speed-measuring method based on machine vision |
CN111797759A (en) * | 2020-07-03 | 2020-10-20 | 重庆市特种设备检测研究院 | Active intervention monitoring method for dangerous elevator taking behavior of escalator |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5089304B2 (en) * | 2007-09-13 | 2012-12-05 | 三菱電機株式会社 | Escalator safety device |
CN107786837B (en) * | 2016-08-24 | 2021-06-04 | 杭州海康威视数字技术股份有限公司 | Escalator dangerous state detection method and device |
CN110188644B (en) * | 2019-05-22 | 2021-06-29 | 广东寰球智能科技有限公司 | Escalator passenger dangerous behavior monitoring system and method based on visual analysis |
CN111924695A (en) * | 2020-07-09 | 2020-11-13 | 上海市隧道工程轨道交通设计研究院 | Intelligent safety protection system for subway escalator and working method of intelligent safety protection system |
CN113011291B (en) * | 2021-03-03 | 2024-08-09 | 上海商汤智能科技有限公司 | Event detection method and device, electronic equipment and storage medium |
-
2021
- 2021-03-03 CN CN202110236987.7A patent/CN113011291B/en active Active
- 2021-07-20 WO PCT/CN2021/107285 patent/WO2022183663A1/en active Application Filing
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101607668A (en) * | 2008-06-17 | 2009-12-23 | 上海阿艾依智控系统有限公司 | Embedded computer vision escalator pedestrian flow supervision and alarm device |
CN101670973A (en) * | 2008-09-09 | 2010-03-17 | 东芝电梯株式会社 | Escalator monitoring system |
EP2909122A1 (en) * | 2012-10-18 | 2015-08-26 | Inventio AG | Safety device of an elevator system |
WO2017093818A1 (en) * | 2015-11-30 | 2017-06-08 | Geden Roger Graham | Improvements in or relating to linear escalators |
CN105654060A (en) * | 2016-01-04 | 2016-06-08 | 中海网络科技股份有限公司 | Method for acquiring vehicle speed from road monitoring video |
CN107220992A (en) * | 2017-06-16 | 2017-09-29 | 华南理工大学 | With reference to machine vision and the escalator floor plates video frequency monitoring method of infrared array |
CN108287250A (en) * | 2018-02-01 | 2018-07-17 | 中国计量大学 | Escalator step speed-measuring method based on machine vision |
CN111797759A (en) * | 2020-07-03 | 2020-10-20 | 重庆市特种设备检测研究院 | Active intervention monitoring method for dangerous elevator taking behavior of escalator |
Non-Patent Citations (2)
Title |
---|
SEMEN UIMONEN等: "Energy consumption of escalators in low traffic environment", 《ENERGY AND BUILDINGS》, 1 August 2016 (2016-08-01), pages 287 - 297 * |
杜启亮等: "基于视频监控的手扶电梯乘客异常行为识别", 《华南理工大学学报(自然科学版)》, vol. 48, no. 8, 31 August 2020 (2020-08-31), pages 10 - 21 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2022183663A1 (en) * | 2021-03-03 | 2022-09-09 | 上海商汤智能科技有限公司 | Event detection method and apparatus, and electronic device, storage medium and program product |
CN113673443A (en) * | 2021-08-24 | 2021-11-19 | 长沙海信智能系统研究院有限公司 | Object reverse detection method and device, electronic equipment and storage medium |
CN113673443B (en) * | 2021-08-24 | 2024-08-16 | 长沙海信智能系统研究院有限公司 | Object retrograde detection method, device, electronic equipment and storage medium |
CN114882393A (en) * | 2022-03-29 | 2022-08-09 | 华南理工大学 | Road reverse running and traffic accident event detection method based on target detection |
Also Published As
Publication number | Publication date |
---|---|
WO2022183663A1 (en) | 2022-09-09 |
CN113011291B (en) | 2024-08-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113011290A (en) | Event detection method and device, electronic equipment and storage medium | |
EP3163498B1 (en) | Alarming method and device | |
CN113011291B (en) | Event detection method and device, electronic equipment and storage medium | |
CN111310665A (en) | Violation event detection method and device, electronic equipment and storage medium | |
CN109801270B (en) | Anchor point determining method and device, electronic equipment and storage medium | |
CN109948494B (en) | Image processing method and device, electronic equipment and storage medium | |
CN112818844A (en) | Security check abnormal event detection method and device, electronic equipment and storage medium | |
CN112560986B (en) | Image detection method and device, electronic equipment and storage medium | |
CN111104920B (en) | Video processing method and device, electronic equipment and storage medium | |
CN111222404A (en) | Method, device and system for detecting co-pedestrian, electronic equipment and storage medium | |
CN111222939A (en) | Robot-based hotel service method and device | |
CN110969115A (en) | Pedestrian event detection method and device, electronic equipment and storage medium | |
CN111435422B (en) | Action recognition method, control method and device, electronic equipment and storage medium | |
CN112633184A (en) | Alarm method and device, electronic equipment and storage medium | |
CN112270288A (en) | Living body identification method, access control device control method, living body identification device, access control device and electronic device | |
CN113486759B (en) | Dangerous action recognition method and device, electronic equipment and storage medium | |
CN113920492A (en) | Method and device for detecting people in vehicle, electronic equipment and storage medium | |
CN111680646A (en) | Motion detection method and device, electronic device and storage medium | |
CN114187498A (en) | Occlusion detection method and device, electronic equipment and storage medium | |
CN113762169A (en) | People flow statistical method and device, electronic equipment and storage medium | |
CN111753611A (en) | Image detection method, device and system, electronic equipment and storage medium | |
CN113791408B (en) | Method, device and storage medium for indoor positioning target object | |
CN113822216A (en) | Event detection method, device, system, electronic equipment and storage medium | |
CN112464898A (en) | Event detection method and device, electronic equipment and storage medium | |
CN108398127A (en) | A kind of indoor orientation method and device |
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 | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: DE Ref document number: 40044669 Country of ref document: HK |
|
GR01 | Patent grant | ||
GR01 | Patent grant |