WO2022183663A1 - Event detection method and apparatus, and electronic device, storage medium and program product - Google Patents

Event detection method and apparatus, and electronic device, storage medium and program product Download PDF

Info

Publication number
WO2022183663A1
WO2022183663A1 PCT/CN2021/107285 CN2021107285W WO2022183663A1 WO 2022183663 A1 WO2022183663 A1 WO 2022183663A1 CN 2021107285 W CN2021107285 W CN 2021107285W WO 2022183663 A1 WO2022183663 A1 WO 2022183663A1
Authority
WO
WIPO (PCT)
Prior art keywords
video stream
speed
escalator
category
event detection
Prior art date
Application number
PCT/CN2021/107285
Other languages
French (fr)
Chinese (zh)
Inventor
徐孟莹
曾星宇
于志鹏
梁鼎
Original Assignee
上海商汤智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 上海商汤智能科技有限公司 filed Critical 上海商汤智能科技有限公司
Publication of WO2022183663A1 publication Critical patent/WO2022183663A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/44Event detection

Definitions

  • the present disclosure relates to the technical field of computer vision, and in particular, to an event detection method, apparatus, electronic device, storage medium and program product.
  • the present disclosure provides an event detection method, apparatus, electronic device, storage medium and program product.
  • an event detection method including: acquiring a first video stream of an escalator; performing human body detection on the first video stream, and determining the first video stream where a target object is located in the first video stream. an area; according to the first image position of the target point of the first area in the video frame of the first video stream, determine the relative speed between the target object and the escalator; according to the relative speed , and determine the event detection result of the target object.
  • determining the distance between the target object and the escalator according to the first image position of the target point of the first area in the video frame of the first video stream The relative speed includes: according to the first image position and the coordinate correspondence between the image coordinate system of the video frame and the plane coordinate system where the escalator is located, determining that the target point is in the plane coordinate system according to the first plane position of the target point in the multiple video frames of the first video stream, determine the first moving speed of the target object; according to the first moving speed and the motor The ratio between the second moving speeds of the escalator determines the relative speed.
  • the relative speed between the target object and the escalator can be determined, and then the behavior events of the target object on the escalator can be determined based on the relative speed, so as to determine whether an abnormal event occurs subsequently.
  • the determining the first moving speed of the target object according to the first plane position of the target point in multiple video frames of the first video stream includes: according to multiple first The coordinates of the plane position in the vertical direction are used to determine the first moving speed of the target object in the vertical direction by means of least squares straight line fitting.
  • the first moving speed is the moving speed of the target object in the vertical direction
  • the first moving speed can be kept consistent with the moving speed of the escalator, thereby making the determined relative speed accurate.
  • the method further includes: acquiring a calibration image of the escalator, where the collection area of the calibration image is the same as the collection area of the first video stream; the second area in the calibration image; according to the second image positions of the plurality of vertices of the second area in the calibration image, and the second plane positions of the plurality of vertices in the plane coordinate system, The coordinate correspondence is determined.
  • the coordinate correspondence 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 accuracy of the speed calculation can be improved.
  • the method further includes: acquiring a second video stream of the escalator, where the collection area of the second video stream is the same as the collection area of the first video stream, and the electric escalator A calibration object is placed on the escalator; target detection is performed on the second video stream to determine a third area where the calibration object is located in the second video stream; The third image position in the video frame of the second video stream, and the coordinate correspondence, determine the third plane position of the calibration point in the plane coordinate system; The third plane position determines the second moving speed of the escalator in the vertical direction.
  • the moving speed of the escalator can be pre-calibrated so that the relative speed can be determined in subsequent processing.
  • the determining the event detection result of the target object according to the relative speed includes at least one of the following: when the relative speed is less than a first speed threshold, determining the The event detection result is the occurrence of an abnormal event of the first category; when the relative speed is greater than or equal to the first speed threshold and less than or equal to the second speed threshold, it is determined that the event detection result is that no abnormal event has occurred , the second speed threshold is greater than the first speed threshold; when the relative speed is greater than the second speed threshold and less than or equal to the third speed threshold, determine that the event detection result is the occurrence of the second speed threshold category of abnormal events, the third speed threshold is greater than the second speed threshold; when the relative speed is greater than the third speed threshold, it is determined that the event detection result is the occurrence of a third category of abnormal events.
  • the method further includes: when the event detection result is the occurrence of at least one of the following abnormal events, sending alarm information corresponding to the category of the abnormal event: the first A category of abnormal events, a second category of abnormal events, the third category of abnormal events.
  • the abnormal events of the first category include retrograde events
  • the abnormal events of the second category include walking events
  • the abnormal events of the third category include running events.
  • an event detection apparatus comprising:
  • the first video stream acquisition part is configured to acquire the first video stream of the escalator;
  • the first area determination part is configured to perform human body detection on the first video stream, and determine the first video stream where the target object is located. an area;
  • a relative speed determination part configured to determine the relative speed between the target object and the escalator according to the first image position of the target point of the first area in the video frame of the first video stream The speed;
  • the event detection part is configured to determine the event detection result of the target object according to the relative speed.
  • the relative speed determination part includes: a position determination sub-part, configured according to the first image position, the image coordinate system of the video frame and the plane coordinates where the escalator is located The coordinate correspondence between the coordinate systems is used to determine the first plane position of the target point in the plane coordinate system; the speed determination sub-section is configured to be based on the first video frame of the first video stream. a plane position to determine a first moving speed of the target object; a relative speed determining subsection configured to determine the relative speed according to the ratio between the first moving speed and the second moving speed of the escalator .
  • the speed determination sub-section is configured to: determine the vertical direction of the target object by means of least squares straight line fitting according to the coordinates of the multiple first plane positions in the vertical direction the first movement speed on .
  • the device further includes: a calibration image acquisition part, configured to acquire a calibration image of the escalator, where the collection area of the calibration image is the same as the collection area of the first video stream;
  • the second area determination part is configured to determine the second area of the escalator in the calibration image;
  • the coordinate relationship determination part is configured to determine the second area in the calibration image according to the plurality of vertices of the second area The image position, and the second plane position of the plurality of vertices in the plane coordinate system determine the coordinate correspondence.
  • the apparatus further includes: a second video stream acquiring part, configured to acquire a second video stream of the escalator, the capture area of the second video stream being the same as the first video stream
  • the collection area of the stream is the same, and a calibration object is placed on the escalator
  • the third area determination part is configured to perform target detection on the second video stream, and determine the third area where the calibration object is located in the second video stream
  • the position determination part is configured to determine the calibration point in the plane coordinates according to the third image position of the calibration point of the third area in the video frame of the second video stream, and the coordinate correspondence a third plane position in the system
  • a speed determination part configured to determine the second movement of the escalator in the vertical direction according to the third plane position of the calibration point in the plurality of video frames of the second video stream speed.
  • the event detection part is further configured to at least one of the following: when the relative speed is less than a first speed threshold, determine that the event detection result is the occurrence of an abnormal event of the first category ; In the case that the relative speed is greater than or equal to the first speed threshold and less than or equal to the second speed threshold, determine that the event detection result is that no abnormal event has occurred, and the second speed threshold is greater than the first speed threshold a speed threshold; when the relative speed is greater than the second speed threshold and less than or equal to the third speed threshold, it is determined that the event detection result is the occurrence of a second category of abnormal events, and the third speed threshold is greater than the second speed threshold; when the relative speed is greater than the third speed threshold, it is determined that the event detection result is the occurrence of an abnormal event of a third category.
  • the apparatus further includes: an alarm part configured to send an alarm corresponding to the category of the abnormal event when the event detection result is the occurrence of at least one of the following abnormal events Information: the first category of abnormal events, the second category of abnormal events, the third category of abnormal events.
  • the abnormal events of the first category include retrograde events
  • the abnormal events of the second category include walking events
  • the abnormal events of the third category include running events.
  • an electronic device comprising: a processor; a memory configured to store instructions executable by the processor; wherein the processor is configured to invoke the instructions stored in the memory to execute the above method.
  • a computer-readable storage medium having computer program instructions stored thereon, the computer program instructions implementing the above method when executed by a processor.
  • a computer program product comprising computer readable code, when the computer readable code is executed on a device, a processor in the device executes instructions for implementing the above event detection method.
  • the area where the object is located in the video stream can be detected; the relative speed between the object and the escalator can be determined according to the image position of the target point in the area; the event detection result can be determined according to the relative speed, which can improve the The accuracy of event detection, thereby reducing the probability of accidents and reducing the cost of human detection.
  • FIG. 1 shows a flowchart of an event detection method according to an embodiment of the present disclosure
  • Figure 2a shows a schematic diagram of the moving direction of the escalator in a plane coordinate system when the moving direction is upward;
  • Fig. 2b shows a schematic diagram in the case where the moving direction of the escalator is downward in a plane coordinate system
  • FIG. 2c is a schematic diagram of a process framework of an event detection method provided by an embodiment of the present disclosure.
  • FIG. 3 shows a block diagram of an event detection apparatus according to an embodiment of the present disclosure
  • FIG. 4 shows a block diagram of an electronic device according to an embodiment of the present disclosure
  • FIG. 5 shows a block diagram of another electronic device according to an embodiment of the present disclosure.
  • the event detection method can be applied to scenes such as shopping malls, office buildings, and public transportation.
  • scenes such as shopping malls, office buildings, and public transportation.
  • the speed of movement is compared with the speed of the elevator to determine whether pedestrians have abnormal behaviors such as walking, running or retrograde.
  • an abnormal behavior occurs, locate the area where the abnormal behavior occurs on the escalator and give an alarm in time for corresponding processing, such as stopping the operation of the escalator, thereby reducing the risk of safety accidents.
  • FIG. 1 shows a flowchart of an event detection method according to an embodiment of the present disclosure.
  • the event detection method includes:
  • step S11 obtain the first video stream of the escalator
  • step S12 human body detection is carried out to the first video stream to determine the first area where the target object is located in the first video stream;
  • step S13 the relative speed between the target object and the escalator is determined according to the first image position of the target point of the first area in the video frame of the first video stream;
  • step S14 the event detection result of the target object is determined according to the relative speed of the target object.
  • the event detection method may be performed by an electronic device such as a terminal device or a server
  • the terminal device may be one of the following: a mobile phone (Mobile Phone), a tablet computer (Pad), a wireless transceiver Computers, PDAs, desktop computers, personal digital assistants, portable media players, smart speakers, navigation devices, smart watches, smart glasses, smart necklaces and other wearable devices, pedometers, digital TVs, virtual reality (VR) ) terminal equipment, Augmented Reality (AR) terminal equipment, wireless terminals in Industrial Control, wireless terminals in Self Driving, wireless terminals in Remote Medical Surgery, Wireless terminal in Smart Grid, wireless terminal in Transportation Safety, wireless terminal in Smart City, wireless terminal in Smart Home, vehicle in Internet of Vehicles system , in-vehicle equipment, in-vehicle module, etc.
  • the method can be implemented by the processor calling computer-readable instructions stored in the memory.
  • the method may be performed by a server.
  • At least one image acquisition device can be installed at the location where the escalator to be detected is located, for example, at least one camera facing the escalator can be installed, so as to collect the video stream of the escalator, and monitor the object riding on the escalator in the video stream. (eg pedestrians) for detection.
  • the present disclosure does not limit the installation position of the image acquisition device, the acquisition method of the video stream, and the specific area corresponding to the video stream.
  • a video stream of the escalator (referred to as the first video stream) may be acquired, for example, a first video stream uploaded by an image capture device may be received; The stream is decoded to obtain a decoded first video stream (also referred to as a picture stream).
  • human body detection may be performed on the decoded first video stream to determine the human body frame in each video frame of the video stream; and follow the human body frame in each video frame , determine the body frame of a pedestrian (which may be called a target object) belonging to the same identity, that is, determine the first area where the target object is located in the first video stream.
  • a pedestrian which may be called a target object
  • the method of human body detection may be, for example, human body key point recognition, human body contour detection, etc.
  • the method of human body tracking may be, for example, determining objects belonging to the same identity according to the intersection ratio of human body frames in adjacent video frames.
  • human body detection and follow-up may be performed on each video frame of the first video stream; the first video stream may also be sampled at a certain time interval, and human body detection and follow-up may be performed on the sampled video frames ; It can also obtain key frames in the first video stream, and perform human detection and follow-up on the key frames. This disclosure does not limit this.
  • At least one target point may be determined from the first area, so as to calculate the moving speed of the target object.
  • the vertex of the first region, the center point, or the point on the boundary of the region can be used as the target point, and the present disclosure does not limit the selection of the target point.
  • the moving speed of the target object may be calculated according to the first image positions of the target point in multiple video frames, for example, according to the multiple position coordinates of the target point, by The least squares straight line fitting method is used to calculate the moving speed of the target object; 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.
  • the event detection result of the target object may be determined according to the relative speed.
  • multiple speed thresholds may be preset, and according to the relationship between the relative speed and each speed threshold, it is determined that the event detection result is an abnormal event or no abnormal event occurs.
  • the object on the escalator may have abnormal behaviors such as retrograde, walking, or running, and accordingly, the abnormal event may include multiple categories.
  • the abnormal events in the first category include retrograde events
  • the abnormal events in the second category include walking events
  • the abnormal events in the third category include running events.
  • the present disclosure does not limit the specific categories of abnormal events.
  • alarm information corresponding to the category of the abnormal event may be generated and sent.
  • the alarm information may include a reminder of the abnormal event, and may also include the area where the target object where the abnormal event occurs, so that the relevant personnel can locate it.
  • the present disclosure does not limit the specific content of the alarm information.
  • alarm information can be sent to the control device of the escalator, so that the control device can stop the operation of the escalator; the alarm information can also be sent to a device that can be seen by the relevant personnel responsible for the operation of the escalator (such as terminal equipment and/or screen display equipment, etc.), so that the relevant personnel can stop the operation of the escalator and go to the escalator for rescue, etc.
  • the present disclosure does not limit the content of the alarm information.
  • the area where the object is located in the video stream can be detected; the relative speed between the object and the escalator can be determined according to the image position of the target point in the area; the event detection result can be determined according to the relative speed, which can improve the The accuracy of event detection, thereby reducing the probability of accidents and reducing the cost of human detection.
  • the video stream of the area where the escalator is located can be captured by the camera, and the captured video stream can be transmitted to electronic devices such as a local front-end server or a cloud server.
  • the electronic device can decode the received video stream to obtain the decoded video stream.
  • step S12 the human body detection and follow-up can be performed on the decoded video stream through the detection network, the human body frame in each video frame of the video stream is detected, and the human body frame of the pedestrian belonging to the same identity is followed to obtain the human body frame in the video stream.
  • the detection network may be a convolutional neural network, and the present disclosure does not limit the network structure of the detection network.
  • the position of the target point in the first area can be determined so as to calculate the moving speed of the target object.
  • the plane where the escalator is located can be used. Planar coordinate system for easy subsequent processing.
  • the coordinate correspondence between the image coordinate system of the video frame and the plane coordinate system of the escalator may be predetermined before the event detection.
  • the event detection method according to the embodiment of the present disclosure may further include:
  • the coordinate correspondence is determined according to the second image positions of the plurality of vertices in the calibration image and the second plane positions of the plurality of vertices in the plane coordinate system.
  • the image of the escalator can be collected by the camera as the calibration image; or a video frame can be selected from the video stream of the escalator as the calibration image.
  • the collection area of the calibration image is the same as the collection area of the first video stream. The present disclosure does not limit the acquisition method of the calibration image.
  • an area (which may be referred to as a second area) of the escalator in the calibration image may be determined.
  • the second area can be marked manually; the second area of the escalator in the calibration image can also be determined by performing area detection on the calibration image through the trained area detection network.
  • the region detection network may be, for example, a convolutional neural network, and the present disclosure does not limit the specific network structure and training method of the region detection network.
  • the position coordinates of the multiple vertices of the second region in the calibration image may be determined, for example, the upper left, upper right, lower left, and lower right of the second region may be determined.
  • the position coordinates of a vertex in the image coordinate system may be determined, for example, the upper left, upper right, lower left, and lower right of the second region may be determined.
  • the position coordinates (x 1 , y 1 ), (x 2 , y of the four vertices p1 , p2 , p3 and p4 in the image coordinate system can be marked 2 ), (x 3 , y 3 ), (x 4 , y 4 ), and set the four vertices p1, p2, p3, p4,
  • Fig. 2a shows a schematic diagram in a case where the moving direction of the escalator in a plane coordinate system is upward
  • Fig. 2b shows a schematic diagram in a case where the moving direction of the escalator in a plane coordinate system is downward.
  • the second plane position in the system can be used to calculate the perspective transformation matrix (called the H matrix) between the image coordinate system and the plane coordinate system, that is, the coordinate correspondence between the image coordinate system and 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 the four vertices p1, p2, p3, and p4.
  • the coordinate correspondence 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 accuracy of the speed calculation can be improved.
  • the moving speed of the escalator can also be pre-calibrated.
  • the event detection method according to the embodiment of the present disclosure may further include:
  • the second moving speed of the escalator in the vertical direction is determined according to the third plane position of the calibration point in the plurality of video frames of the second video stream.
  • a calibration object that is stationary relative to the escalator can be placed on the escalator, and a video stream of the escalator (which can be referred to as a second video stream) can be captured by a camera.
  • the collection area of the second video stream is the same as the collection area of the first video stream.
  • the calibration object can be, for example, an item or a staff member, which is not limited in the present disclosure.
  • a video stream in which a person or item is stationary relative to the escalator can also be intercepted from the first video stream of the escalator, as the second video stream; and the person or item is used as the second video stream. calibrator.
  • the present disclosure does not limit the acquisition method of the second video stream.
  • the trained target detection network may be used to perform target detection on at least two video frames of the second video stream to determine the area of the calibration object in the video frame (which may be referred to as the third area).
  • 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 method of the target detection network.
  • a calibration point in the third area may be determined, and the calibration point may be, for example, a vertex, a center point, or a point on the boundary of the third area, and the present disclosure does not limit the selection of the calibration point .
  • the image coordinates (called the third image position) of the calibration point in the i-th video frame and the j-th video frame of the second video stream respectively (x i , y i ) and (x j , y j ).
  • the position coordinates (called the third plane position) of the calibration point in the plane coordinate system can be determined as (x′ i , y′ i ) and (x′ j , y'j ).
  • the second moving speed v y0 of the escalator in the vertical direction is determined by the following formula (1):
  • v y0 (y′ j -y′ i )/(ji) (1);
  • the moving speed of the escalator can be pre-calibrated so that the relative speed can be determined in subsequent processing.
  • the position of the target point in the first area can be determined so as to calculate the moving speed of the target object.
  • the midpoint of the bottom edge of the first area can be used as the target point to improve Accuracy of movement speed calculations.
  • step S13 may include:
  • the relative speed is determined according to the ratio between the first moving speed and the second moving speed of the escalator.
  • coordinate transformation can be performed on the first image position (x c , y c ) of the target point according to the coordinate correspondence between the image coordinate system of the video frame and the plane coordinate system where the escalator is located (ie, the H matrix). , obtain the first plane position (x′ c , y′ c ) of the target point in the plane coordinate system.
  • the first moving speed may be determined according to the first plane position of the target point of the target object in the plurality of video frames.
  • the relative speed between the target object and the escalator can be determined, and then the behavior events of the target object on the escalator can be determined based on the relative speed, so as to determine whether an abnormal event occurs subsequently.
  • the step of determining the first moving speed of the target object according to the first plane position of the target point in multiple video frames of the first video stream may include:
  • the first moving speed of the target object in the vertical direction is determined by means of least squares straight line fitting.
  • coordinate transformation can be performed respectively according to the first image position of the target point in the video frame at the current moment and the multiple video frames (for example, 30 video frames) before the current moment to obtain a plurality of first plane positions;
  • the first moving speed vy of the target object in the vertical direction at the current moment can be estimated by means of least squares straight line fitting. In this way, the accuracy of the velocity calculation can be improved.
  • first moving speed may also be estimated in other manners, which is not limited in the present disclosure.
  • the relative speed v r between the target object and the escalator is determined according to the ratio between the first moving speed and the second moving speed of the escalator.
  • the speed ratio method can improve the accuracy of subsequent determination. It should be understood that the relative speed between the target object and the escalator may also be determined in other manners, which is not limited in the present disclosure.
  • the first moving speed is the moving speed of the target object in the vertical direction
  • the first moving speed can be kept consistent with the moving speed of the escalator, thereby making the determined relative speed accurate.
  • step S14 the event detection result of the target object is determined according to the relative speed, including at least one of the following:
  • the relative speed is greater than or equal to the first speed threshold and less than or equal to a second speed threshold, it is determined that the event detection result is that no abnormal event has occurred, and the second speed threshold is greater than the first speed threshold speed threshold;
  • the relative speed is greater than the second speed threshold and less than or equal to a third speed threshold, determine that the event detection result is the occurrence of a second category of abnormal events, the third speed threshold being greater than the third speed threshold Two speed thresholds;
  • the event detection result is the occurrence of an abnormal event of a third category.
  • the abnormal events of the first category include retrograde events
  • the abnormal events of the second category include walking events
  • the third category of abnormal events can be set.
  • the abnormal events include running events, etc.
  • the present disclosure does not limit the specific categories of abnormal events.
  • multiple speed thresholds may be set respectively, 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 back , a second speed threshold Thresh walk and a third speed threshold Thresh run may be set. The 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
  • the third speed threshold may be, for example, 1.8.
  • the present disclosure does not limit the specific value of each speed threshold.
  • Table 1 shows the correspondence between the relative speed and the determination result.
  • the relative speed v r is less than the first speed threshold Thresh back , it can be considered that the moving direction of the target object is opposite to that of the escalator, and the reverse speed is relatively large. In this case, it can be determined that the target object has retrograde behavior, and the event detection result is determined to be a retrograde event.
  • the relative speed v r is greater than or equal to the first speed threshold Thresh back and less than or equal to the second speed threshold Thresh walk , it can be considered that the target object is relative to the escalator speed is smaller. In this case, it can be determined that the target object is stationary on the escalator, and it can be determined that the event detection result is that no abnormal event has occurred.
  • the relative velocity when the relative velocity is within the corresponding threshold interval and lasts for a certain period of time, it can be determined that an abnormal event has occurred, so as to avoid possible false detections during a single relative velocity determination.
  • the present disclosure does not limit the specific determination method.
  • the event detection method according to the embodiment of the present disclosure may further include:
  • alarm information corresponding to the category of the abnormal event is sent: the abnormal event of the first category, the abnormal event of the second category, the A third category of abnormal events.
  • alarm information corresponding to the category of the abnormal event that is, alarm information corresponding to a retrograde event, a walking event, or a running event may be generated and sent.
  • alarm information may also be generated and sent when some types of abnormal events occur. For example, only when a retrograde event occurs, the alarm information is sent; or, when a retrograde event or a running event occurs, the alarm information is sent.
  • the present disclosure does not limit the sending conditions of the alarm information.
  • the alarm information may include a reminder of an abnormal event, and may also include an area where the target object where the abnormal event occurs, so that relevant personnel can locate.
  • the present disclosure does not limit the specific content of the alarm information.
  • alarm information can be sent to the control device of the escalator, so that the control device can stop the operation of the escalator; the alarm information can also be sent to a device that can be seen by the relevant personnel responsible for the operation of the escalator (such as terminal equipment and/or screen display equipment, etc.), so that the relevant personnel can stop the operation of the escalator and go to the escalator for rescue, etc.
  • the present disclosure does not limit the content of the alarm information.
  • FIG. 2c is a schematic diagram of a process framework of an event detection method provided by an embodiment of the present disclosure.
  • the process framework includes a pedestrian detection and following module, a walking and running retrograde recognition module, and a squatting recognition module.
  • the pedestrian detection and follow-up module After the input video stream is decoded, it is input to the pedestrian detection and follow-up module, and the first area of each pedestrian is obtained (represented as the vertex coordinates of the upper left corner and the lower right corner of each pedestrian detection frame (x 1 , y 1 ), (x 2 , y 2 ), and the follower ID of the corresponding pedestrian).
  • the pedestrian detection frame can be a rectangular frame.
  • pedestrian detection is usually implemented by a deep neural network, and pedestrian following algorithms include algorithms based on deep learning, algorithms based on IoU matching, etc.
  • the embodiments of the present disclosure do not limit which detection and following algorithms are used.
  • the posture recognition result of the target object can be obtained by performing posture recognition on the image of the first area corresponding to the first area through the trained posture recognition network, that is, the posture recognition result is output through the posture recognition network.
  • the gesture recognition network may be a squatting recognition module, so that the squatting event is output through the squatting recognition module.
  • the walking-running retrograde recognition module can use video streams to analyze pedestrian movement speed, compare it with the elevator speed, and then determine whether the pedestrian has running or retrograde behavior, such as outputting running and retrograde events.
  • the walking and running retrograde recognition module can be used to realize steps S13 and S14: according to the first image position of the target point of the first area in the video frame of the first video stream, determine the target object and the escalator The relative speed between the two; according to the relative speed, the event detection result of the target object is determined.
  • the area where the object is located in the video stream can be detected, and the transformation of the point in the area between the image coordinate system of the video frame and the elevator plane coordinate system can be realized.
  • the speed of pedestrians is estimated to determine whether there are dangerous actions such as pedestrians retrograde, walking, running, etc., and timely warning can improve the accuracy of event detection and reduce the risk of safety accidents.
  • event detection can be realized only by using a monocular camera without other sensors (such as infrared sensors, etc.); Additional strict calibration can be adapted to escalator elevator equipment with different speed configurations, which effectively improves the efficiency of event detection.
  • the event detection method can be applied to the field of security monitoring, and can be applied to escalator pedestrian dangerous behavior detection and alarm related products, for example, escalator self-service monitoring systems deployed in large shopping malls, supermarkets, subway stations, office buildings and other application scenarios , to realize automatic detection and alarm of dangerous behaviors such as pedestrians retrograde, walking, running, etc. on the elevator, so as to take measures to slow down the elevator or stop the elevator, and reduce the cost of human monitoring.
  • escalator pedestrian dangerous behavior detection and alarm related products for example, escalator self-service monitoring systems deployed in large shopping malls, supermarkets, subway stations, office buildings and other application scenarios , to realize automatic detection and alarm of dangerous behaviors such as pedestrians retrograde, walking, running, etc. on the elevator, so as to take measures to slow down the elevator or stop the elevator, and reduce the cost of human monitoring.
  • the present disclosure also provides an event detection device, an electronic device, a computer-readable storage medium, and a program, all of which can be used to implement any event detection method provided by the present disclosure.
  • an event detection device an electronic device, a computer-readable storage medium, and a program, all of which can be used to implement any event detection method provided by the present disclosure.
  • FIG. 3 shows a block diagram of an event detection apparatus according to an embodiment of the present disclosure. As shown in FIG. 3 , the apparatus includes:
  • the first video stream acquiring part 31 is configured to acquire the first video stream of the escalator
  • the first area determination part 32 is configured to perform human body detection on the first video stream, and determine the first area where the target object is located in the first video stream;
  • a relative speed determination part 33 configured to determine the relative speed between the target object and the escalator according to the first image position of the target point of the first area in the video frame of the first video stream;
  • the event detection part 34 is configured to determine the event detection result of the target object according to the relative speed.
  • the relative speed determination part includes: a position determination sub-part, configured according to the first image position, the image coordinate system of the video frame and the plane coordinates where the escalator is located The coordinate correspondence between the coordinate systems is used to determine the first plane position of the target point in the plane coordinate system; the speed determination sub-section is configured to be based on the first video frame of the first video stream. a plane position to determine a first moving speed of the target object; a relative speed determining subsection configured to determine the relative speed according to the ratio between the first moving speed and the second moving speed of the escalator .
  • the velocity determination sub-section is configured to: determine the vertical direction of the target object by a least squares line fitting method according to the coordinates of a plurality of first plane positions in the vertical direction. The first movement speed in the direction.
  • the device further includes: a calibration image acquisition part, configured to acquire a calibration image of the escalator, where the collection area of the calibration image is the same as the collection area of the first video stream;
  • the second area determination part is configured to determine the second area of the escalator in the calibration image;
  • the coordinate relationship determination part is configured to determine the second area in the calibration image according to the plurality of vertices of the second area The image position, and the second plane position of the plurality of vertices in the plane coordinate system determine the coordinate correspondence.
  • the apparatus further includes: a second video stream acquiring part, configured to acquire a second video stream of the escalator, the capture area of the second video stream being the same as the first video stream
  • the collection area of the stream is the same, and a calibration object is placed on the escalator
  • the third area determination part is configured to perform target detection on the second video stream, and determine the third area where the calibration object is located in the second video stream
  • the position determination part is configured to determine the calibration point in the plane coordinates according to the third image position of the calibration point of the third area in the video frame of the second video stream, and the coordinate correspondence a third plane position in the system
  • a speed determination part configured to determine the second movement of the escalator in the vertical direction according to the third plane position of the calibration point in the plurality of video frames of the second video stream speed.
  • the event detection part is further configured to at least one of the following: when the relative speed is less than a first speed threshold, determine that the event detection result is the occurrence of an abnormal event of the first category ; In the case that the relative speed is greater than or equal to the first speed threshold and less than or equal to the second speed threshold, determine that the event detection result is that no abnormal event has occurred, and the second speed threshold is greater than the first speed threshold a speed threshold; when the relative speed is greater than the second speed threshold and less than or equal to the third speed threshold, it is determined that the event detection result is the occurrence of a second category of abnormal events, and the third speed threshold is greater than the second speed threshold; when the relative speed is greater than the third speed threshold, it is determined that the event detection result is the occurrence of an abnormal event of a third category.
  • the apparatus further includes: an alarm part configured to send an alarm corresponding to the category of the abnormal event when the event detection result is the occurrence of at least one of the following abnormal events Information: the first category of abnormal events, the second category of abnormal events, the third category of abnormal events.
  • the abnormal events of the first category include retrograde events
  • the abnormal events of the second category include walking events
  • the abnormal events of the third category include running events.
  • the functions or included parts of the apparatus provided in the embodiments of the present disclosure may be configured to execute the methods described in the above method embodiments, and the specific implementation may refer to the descriptions in the above method embodiments. No longer.
  • Embodiments of the present disclosure further provide a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the foregoing method is implemented.
  • 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, comprising: a processor; a memory configured to store instructions executable by the processor; wherein the processor is configured to invoke the instructions stored in the memory to execute the above method.
  • Embodiments of the present disclosure also provide a computer program product, including computer-readable codes.
  • a processor in the device executes a method for implementing the event detection method provided by any of the above embodiments. instruction.
  • Embodiments of the present disclosure further provide another computer program product for storing computer-readable instructions, which, when executed, cause a computer to perform operations of the event detection method provided by any of the foregoing embodiments.
  • the electronic device may be provided as a terminal, server or other form of device.
  • FIG. 4 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
  • electronic device 800 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, fitness device, personal digital assistant, etc. terminal.
  • the electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814 , and the communication component 816 .
  • the processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations.
  • the processing component 802 can include one or more processors 820 to execute instructions to perform all or some of the steps of the methods described above.
  • processing component 802 may include one or more modules that facilitate interaction between processing component 802 and other components.
  • processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.
  • Memory 804 is configured to store various types of data to support operation at electronic device 800 . Examples of such data include instructions for any application or method operating on electronic device 800, contact data, phonebook data, messages, pictures, videos, and the like. Memory 804 may be implemented by any type of volatile or nonvolatile storage device or combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read only memory
  • EPROM erasable Programmable Read Only Memory
  • PROM Programmable Read Only Memory
  • ROM Read Only Memory
  • Magnetic Memory Flash Memory
  • Magnetic or Optical Disk Magnetic Disk
  • Power supply assembly 806 provides power to various components of electronic device 800 .
  • Power supply components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 800 .
  • Multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user.
  • 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 input signals from a user.
  • the touch panel includes one or more touch sensors to sense touch, swipe, and gestures on the touch panel. The touch sensor may not only sense the boundaries of a touch or swipe action, but also detect the duration and pressure associated with the touch or swipe action.
  • the multimedia component 808 includes a front-facing camera and/or a rear-facing camera. When the electronic device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each of the front and rear cameras can be a fixed optical lens system or have focal length and optical zoom capability.
  • Audio component 810 is configured to output and/or input audio signals.
  • audio component 810 includes a microphone (MIC) that is configured to receive external audio signals when electronic device 800 is in operating modes, such as calling mode, recording mode, and voice recognition mode.
  • the received audio signal may be further stored in memory 804 or transmitted via communication component 816 .
  • 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 a peripheral interface module, which may be a keyboard, a click wheel, a button, or the like. These buttons may include, but are not limited to: home button, volume buttons, start button, and lock button.
  • Sensor assembly 814 includes one or more sensors for providing status assessment of various aspects of electronic device 800 .
  • the sensor assembly 814 can detect the on/off state of the electronic device 800, the relative positioning of the components, such as the display and the keypad of the electronic device 800, the sensor assembly 814 can also detect the electronic device 800 or one of the electronic device 800 Changes in the position of components, presence or absence of user contact with the electronic device 800 , orientation or acceleration/deceleration of the electronic device 800 and changes in the temperature of the electronic device 800 .
  • Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact.
  • 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.
  • CMOS complementary metal oxide semiconductor
  • CCD charge coupled device
  • the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
  • Communication component 816 is configured to facilitate wired or wireless communication between electronic device 800 and other devices.
  • the electronic device 800 may access a wireless network based on a communication standard, such as wireless network (WiFi), second generation mobile communication technology (2G) or third generation mobile communication technology (3G), or a combination thereof.
  • the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel.
  • the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication.
  • 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.
  • RFID radio frequency identification
  • IrDA infrared data association
  • UWB ultra-wideband
  • Bluetooth Bluetooth
  • 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 A programmed gate array (FPGA), controller, microcontroller, microprocessor or other electronic component implementation is used to perform the above method.
  • ASICs application specific integrated circuits
  • DSPs digital signal processors
  • DSPDs digital signal processing devices
  • PLDs programmable logic devices
  • FPGA field programmable A programmed gate array
  • controller microcontroller, microprocessor or other electronic component implementation is used to perform the above method.
  • a non-volatile computer-readable storage medium such as a memory 804 comprising computer program instructions executable by the processor 820 of the electronic device 800 to perform the above method is also provided.
  • FIG. 5 shows a block diagram of another electronic device according to an embodiment of the present disclosure.
  • the electronic device 1900 may be provided as a server.
  • electronic device 1900 includes processing component 1922, which further includes one or more processors, and a memory resource represented by memory 1932 for storing instructions executable by processing component 1922, such as applications.
  • An application program stored in memory 1932 may include one or more modules, each corresponding to a set of instructions.
  • the processing component 1922 is configured to execute instructions to perform the above-described methods.
  • the electronic device 1900 may also include a power supply assembly 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 can operate based on an operating system stored in the memory 1932, such as a Microsoft server operating system (Windows Server TM ), a graphical user interface based operating system (Mac OS X TM ) introduced by Apple, a multi-user multi-process computer operating system (Unix TM ), Free and Open Source Unix-like Operating System (Linux TM ), Open Source Unix-like Operating System (FreeBSD TM ) or the like.
  • Microsoft server operating system Windows Server TM
  • Mac OS X TM graphical user interface based operating system
  • Uniix TM multi-user multi-process computer operating system
  • Free and Open Source Unix-like Operating System Linux TM
  • FreeBSD TM Open Source Unix-like Operating System
  • a non-volatile computer-readable storage medium such as memory 1932 comprising computer program instructions executable by processing component 1922 of electronic device 1900 to perform the above-described method.
  • the present disclosure may be a system, method and/or computer program product.
  • the computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of the present disclosure.
  • a computer-readable storage medium may be a tangible device that can hold and store instructions for use by the instruction execution device.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
  • Non-exhaustive list of computer readable storage media include: portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM) or flash memory), static random access memory (SRAM), portable compact disk read only memory (CD-ROM), digital versatile disk (DVD), memory sticks, floppy disks, mechanically coded devices, such as printers with instructions stored thereon Hole cards or raised structures in grooves, and any suitable combination of the above.
  • RAM random access memory
  • ROM read only memory
  • EPROM erasable programmable read only memory
  • flash memory static random access memory
  • SRAM static random access memory
  • CD-ROM compact disk read only memory
  • DVD digital versatile disk
  • memory sticks floppy disks
  • mechanically coded devices such as printers with instructions stored thereon Hole cards or raised structures in grooves, and any suitable combination of the above.
  • Computer-readable storage media are not to be construed as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (eg, light pulses through fiber optic cables), or through electrical wires transmitted electrical signals.
  • the computer readable program instructions described herein may be downloaded to various computing/processing devices from a computer readable storage medium, or to an external computer or external storage device over 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.
  • a network adapter card or network interface in each computing/processing device receives computer-readable program instructions from a network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
  • Computer program instructions for carrying out operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or instructions in one or more programming languages.
  • Source or object code written in any combination, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as the "C" 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 implement.
  • the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider through the Internet connect).
  • LAN local area network
  • WAN wide area network
  • custom electronic circuits such as programmable logic circuits, field programmable gate arrays (FPGAs), or programmable logic arrays (PLAs) can be personalized by utilizing state information of computer readable program instructions.
  • Computer readable program instructions are executed to implement various aspects of the present disclosure.
  • 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 that causes the instructions when executed by the processor of the computer or other programmable data processing apparatus , resulting in means for implementing the functions/acts specified in one or more blocks of the flowchart and/or block diagrams.
  • These computer readable program instructions can also be stored in a computer readable storage medium, these instructions cause a computer, programmable data processing apparatus and/or other equipment to operate in a specific manner, so that the computer readable medium on which the instructions are stored includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks of the flowchart and/or block diagrams.
  • Computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other equipment to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other equipment to produce a computer-implemented process , thereby causing instructions executing on a computer, other programmable data processing apparatus, or other device to implement the functions/acts specified in one or more blocks of the flowcharts and/or block diagrams.
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more functions for implementing the specified logical function(s) executable instructions.
  • the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks 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.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented in dedicated hardware-based systems that perform the specified functions or actions , or can be implemented in a combination of dedicated hardware and computer instructions.
  • the computer program product can be specifically implemented by hardware, software or a combination thereof.
  • the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK), etc. Wait.
  • a software development kit Software Development Kit, SDK
  • Embodiments of the present disclosure disclose an event detection method, device, electronic device, storage medium and program product, wherein the event detection method includes: acquiring a first video stream of an escalator; performing human body detection on the first video stream , determine the first area where the target object is located in the first video stream; according to the first image position of the target point of the first area in the video frame of the first video stream, determine the relationship between the target object and the target object. relative speed between the escalators; according to the relative speed, determine the event detection result of the target object.
  • the accuracy of event detection can be improved, thereby reducing the probability of an accident and reducing the cost of human detection.

Abstract

An event detection method and apparatus, and an electronic device, a storage medium and a program product. The method comprises: acquiring a first video stream of an escalator; performing human body detection on the first video stream to determine a first region, in the first video stream, in which a target object is located; determining a relative speed between the target object and the escalator according to a first image position of a target point of the first region in a video frame of the first video stream; and determining an event detection result for the target object according to the relative speed.

Description

事件检测方法、装置、电子设备、存储介质及程序产品Event detection method, apparatus, electronic device, storage medium and program product
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本专利申请要求2021年3月3日提交的中国专利申请号为202110236987.7,申请名称为“事件检测方法及装置、电子设备和存储介质”的优先权,该公开的全文以引用的方式并入本公开中。This patent application claims the priority of the Chinese patent application number 202110236987.7 filed on March 3, 2021, and the application name is "event detection method and device, electronic device and storage medium", the full text of which is incorporated herein by reference Public.
技术领域technical field
本公开涉及计算机视觉技术领域,尤其涉及一种事件检测方法、装置、电子设备、存储介质及程序产品。The present disclosure relates to the technical field of computer vision, and in particular, to an event detection method, apparatus, electronic device, storage medium and program product.
背景技术Background technique
随着经济的发展和基础设施建设的不断完善,电动扶梯在商场、写字楼、公共交通等场景的应用也越来越广泛。在电动扶梯给行人带来便利的同时,行人在扶梯上发生异常动作,例如跌倒、逆行、走跑、蹲坐等,可能引发的意外事故也越发引起人们的重视。如果不能及时检测到扶梯上发生异常动作,并及时告警停止扶梯的运行,则可能会对梯上行人的生命财产安全造成重大损失。With the development of the economy and the continuous improvement of infrastructure construction, the application of escalators in shopping malls, office buildings, public transportation and other scenarios is becoming more and more extensive. While the escalator brings convenience to pedestrians, pedestrians have abnormal actions on the escalator, such as falling, retrograde, walking, running, squatting, etc., which may cause accidents that have attracted more and more attention. If the abnormal movement on the escalator cannot be detected in time, and the escalator is stopped in time by an alarm, it may cause serious damage to the safety of life and property of the pedestrians on the escalator.
发明内容SUMMARY OF THE INVENTION
本公开提出了一种事件检测方法、装置、电子设备、存储介质及程序产品。The present disclosure provides an event detection method, apparatus, electronic device, storage medium and program product.
根据本公开的一方面,提供了一种事件检测方法,包括:获取电动扶梯的第一视频流;对所述第一视频流进行人体检测,确定所述第一视频流中目标对象所在的第一区域;根据所述第一区域的目标点在所述第一视频流的视频帧中的第一图像位置,确定所述目标对象与所述电动扶梯之间的相对速度;根据所述相对速度,确定所述目标对象的事件检测结果。According to an aspect of the present disclosure, an event detection method is provided, including: acquiring a first video stream of an escalator; performing human body detection on the first video stream, and determining the first video stream where a target object is located in the first video stream. an area; according to the first image position of the target point of the first area in the video frame of the first video stream, determine the relative speed between the target object and the escalator; according to the relative speed , and determine the event detection result of the target object.
在一种可能的实现方式中,所述根据所述第一区域的目标点在所述第一视频流的视频帧中的第一图像位置,确定所述目标对象与所述电动扶梯之间的相对速度,包括:根据所述第一图像位置,以及所述视频帧的图像坐标系与所述电动扶梯所在的平面坐标系之间的坐标对应关系,确定所述目标点在所述平面坐标系中的第一平面位置;根据所述第一视频流的多个视频帧中目标点的第一平面位置,确定所述目标对象的第一移动速度;根据所述第一移动速度与所述电动扶梯的第二移动速度之间的比值,确定所述相对速度。In a possible implementation manner, determining the distance between the target object and the escalator according to the first image position of the target point of the first area in the video frame of the first video stream The relative speed includes: according to the first image position and the coordinate correspondence between the image coordinate system of the video frame and the plane coordinate system where the escalator is located, determining that the target point is in the plane coordinate system according to the first plane position of the target point in the multiple video frames of the first video stream, determine the first moving speed of the target object; according to the first moving speed and the motor The ratio between the second moving speeds of the escalator determines the relative speed.
通过这种方式,可确定出目标对象与电动扶梯之间的相对速度,进而能够基于相对速度确定目标对象在电动扶梯上的行为事件,以便后续判定是否发生异常事件。In this way, the relative speed between the target object and the escalator can be determined, and then the behavior events of the target object on the escalator can be determined based on the relative speed, so as to determine whether an abnormal event occurs subsequently.
在一种可能的实现方式中,所述根据所述第一视频流的多个视频帧中目标点的第一平面位置,确定所述目标对象的第一移动速度,包括:根据多个第一平面位置在竖直方向上的坐标,通过最小二乘直线拟合方式确定所述目标对象在竖直方向上的第一移动速度。In a possible implementation manner, the determining the first moving speed of the target object according to the first plane position of the target point in multiple video frames of the first video stream includes: according to multiple first The coordinates of the plane position in the vertical direction are used to determine the first moving speed of the target object in the vertical direction by means of least squares straight line fitting.
通过这种方式,由于第一移动速度为目标对象在竖直方向上的移动速度,从而使得第一移动速度能够与手动扶梯的移动速度保持一致,进而能够使得确定的相对速度准确。In this way, since the first moving speed is the moving speed of the target object in the vertical direction, the first moving speed can be kept consistent with the moving speed of the escalator, thereby making the determined relative speed accurate.
在一种可能的实现方式中,所述方法还包括:获取所述电动扶梯的标定图像,所述标定图像的采集区域与所述第一视频流的采集区域相同;确定所述电动扶梯在所述标定图像中的第二区域;根据所述第二区域的多个顶点在所述标定图像中的第二图像位置,以及所述多个顶点在所述平面坐标系中的第二平面位置,确定所述坐标对应关系。In a possible implementation manner, the method further includes: acquiring a calibration image of the escalator, where the collection area of the calibration image is the same as the collection area of the first video stream; the second area in the calibration image; according to the second image positions of the plurality of vertices of the second area in the calibration image, and the second plane positions of the plurality of vertices in the plane coordinate system, The coordinate correspondence is determined.
通过这种方式,可确定图像坐标系与平面坐标系之间的坐标对应关系,以便在后续处理中对电动扶梯和对象的位置坐标进行变换,提高速度计算的便利性和准确性。In this way, the coordinate correspondence 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 accuracy of the speed calculation can be improved.
在一种可能的实现方式中,所述方法还包括:获取所述电动扶梯的第二视频流,所述第二视频流的采集区域与所述第一视频流的采集区域相同,所述电动扶梯上放置有标定物;对所述第二视频流进行目标检测,确定所述第二视频流中标定物所在的第三区域;根据所述第三区域的标定点在所述第二视频流的视频帧中的第三图像位置,以及所述坐标对应关系,确定所述标定点在所述平面坐标系中的第三平面位置;根据所述第二视频流的多个视频帧中标定点的第三平面位置,确定所述电动扶梯在竖直方向上的所述第二移动速度。In a possible implementation manner, the method further includes: acquiring a second video stream of the escalator, where the collection area of the second video stream is the same as the collection area of the first video stream, and the electric escalator A calibration object is placed on the escalator; target detection is performed on the second video stream to determine a third area where the calibration object is located in the second video stream; The third image position in the video frame of the second video stream, and the coordinate correspondence, determine the third plane position of the calibration point in the plane coordinate system; The third plane position determines the second moving speed of the escalator in the vertical direction.
通过这种方式,可预先标定电动扶梯的移动速度,以便在后续处理中确定相对速度。In this way, the moving speed of the escalator can be pre-calibrated so that the relative speed can be determined in subsequent processing.
在一种可能的实现方式中,所述根据所述相对速度,确定所述目标对象的事件检测结果,包括以下至少之一:在所述相对速度小于第一速度阈值的情况下,确定所述事件检测结果为发生第一类别的异常事件;在所述相对速度大于或等于所述第一速度阈值,且小于或等于第二速度阈值的情况下,确定所述事件检测结果为未发生异常事件,所述第二速度阈值大于所述第一速度阈值;在所述相对速度大于所述第二速度阈值,且小于或等于第三速度阈值的情况下,确定所述事件检测结果为发生第二类别的异常事件,所述第三速度阈值大于所述第二速度阈值;在所述相对速度大于所述第三速度阈值的情况下,确定所述事件检测结果为发生第三类别的异常事件。In a possible implementation manner, the determining the event detection result of the target object according to the relative speed includes at least one of the following: when the relative speed is less than a first speed threshold, determining the The event detection result is the occurrence of an abnormal event of the first category; when the relative speed is greater than or equal to the first speed threshold and less than or equal to the second speed threshold, it is determined that the event detection result is that no abnormal event has occurred , the second speed threshold is greater than the first speed threshold; when the relative speed is greater than the second speed threshold and less than or equal to the third speed threshold, determine that the event detection result is the occurrence of the second speed threshold category of abnormal events, the third speed threshold is greater than the second speed threshold; when the relative speed is greater than the third speed threshold, it is determined that the event detection result is the occurrence of a third category of abnormal events.
通过这种方式,能够实现逆行、行走及跑动的异常事件的判定,提高事件检测的准确率,减少人力检测的成本。In this way, abnormal events of retrograde, walking and running can be determined, the accuracy of event detection can be improved, and the cost of human detection can be reduced.
在一种可能的实现方式中,所述方法还包括:在所述事件检测结果为发 生以下至少之一的异常事件的情况下,发送与所述异常事件的类别对应的告警信息:所述第一类别的异常事件、第二类别的异常事件、所述第三类别的异常事件。In a possible implementation manner, the method further includes: when the event detection result is the occurrence of at least one of the following abnormal events, sending alarm information corresponding to the category of the abnormal event: the first A category of abnormal events, a second category of abnormal events, the third category of abnormal events.
通过这种方式,能够在判定出异常时及时告警,以便进行相应的处理,从而降低发生安全事故的风险。In this way, when an abnormality is determined, an alarm can be timely so that corresponding processing can be performed, thereby reducing the risk of a security accident.
在一种可能的实现方式中,所述第一类别的异常事件包括逆行事件,所述第二类别的异常事件包括行走事件,所述第三类别的异常事件包括跑动事件。In a possible implementation manner, the abnormal events of the first category include retrograde events, the abnormal events of the second category include walking events, and the abnormal events of the third category include running events.
根据本公开的一方面,提供了一种事件检测装置,包括:According to an aspect of the present disclosure, an event detection apparatus is provided, comprising:
第一视频流获取部分,配置为获取电动扶梯的第一视频流;第一区域确定部分,配置为对所述第一视频流进行人体检测,确定所述第一视频流中目标对象所在的第一区域;相对速度确定部分,配置为根据所述第一区域的目标点在所述第一视频流的视频帧中的第一图像位置,确定所述目标对象与所述电动扶梯之间的相对速度;事件检测部分,配置为根据所述相对速度,确定所述目标对象的事件检测结果。The first video stream acquisition part is configured to acquire the first video stream of the escalator; the first area determination part is configured to perform human body detection on the first video stream, and determine the first video stream where the target object is located. an area; a relative speed determination part configured to determine the relative speed between the target object and the escalator according to the first image position of the target point of the first area in the video frame of the first video stream The speed; the event detection part is configured to determine the event detection result of the target object according to the relative speed.
在一种可能的实现方式中,所述相对速度确定部分包括:位置确定子部分,配置为根据所述第一图像位置,以及所述视频帧的图像坐标系与所述电动扶梯所在的平面坐标系之间的坐标对应关系,确定所述目标点在所述平面坐标系中的第一平面位置;速度确定子部分,配置为根据所述第一视频流的多个视频帧中目标点的第一平面位置,确定所述目标对象的第一移动速度;相对速度确定子部分,配置为根据所述第一移动速度与所述电动扶梯的第二移动速度之间的比值,确定所述相对速度。In a possible implementation manner, the relative speed determination part includes: a position determination sub-part, configured according to the first image position, the image coordinate system of the video frame and the plane coordinates where the escalator is located The coordinate correspondence between the coordinate systems is used to determine the first plane position of the target point in the plane coordinate system; the speed determination sub-section is configured to be based on the first video frame of the first video stream. a plane position to determine a first moving speed of the target object; a relative speed determining subsection configured to determine the relative speed according to the ratio between the first moving speed and the second moving speed of the escalator .
在一种可能的实现方式中,所述速度确定子部分配置为:根据多个第一平面位置在竖直方向上的坐标,通过最小二乘直线拟合方式确定所述目标对象在竖直方向上的第一移动速度。In a possible implementation manner, the speed determination sub-section is configured to: determine the vertical direction of the target object by means of least squares straight line fitting according to the coordinates of the multiple first plane positions in the vertical direction the first movement speed on .
在一种可能的实现方式中,所述装置还包括:标定图像获取部分,配置为获取所述电动扶梯的标定图像,所述标定图像的采集区域与所述第一视频流的采集区域相同;第二区域确定部分,配置为确定所述电动扶梯在所述标定图像中的第二区域;坐标关系确定部分,配置为根据所述第二区域的多个顶点在所述标定图像中的第二图像位置,以及所述多个顶点在所述平面坐标系中的第二平面位置,确定所述坐标对应关系。In a possible implementation manner, the device further includes: a calibration image acquisition part, configured to acquire a calibration image of the escalator, where the collection area of the calibration image is the same as the collection area of the first video stream; The second area determination part is configured to determine the second area of the escalator in the calibration image; the coordinate relationship determination part is configured to determine the second area in the calibration image according to the plurality of vertices of the second area The image position, and the second plane position of the plurality of vertices in the plane coordinate system determine the coordinate correspondence.
在一种可能的实现方式中,所述装置还包括:第二视频流获取部分,配置为获取所述电动扶梯的第二视频流,所述第二视频流的采集区域与所述第一视频流的采集区域相同,所述电动扶梯上放置有标定物;第三区域确定部分,配置为对所述第二视频流进行目标检测,确定所述第二视频流中标定物所在的第三区域;位置确定部分,配置为根据所述第三区域的标定点在所述第二视频流的视频帧中的第三图像位置,以及所述坐标对应关系,确定所述 标定点在所述平面坐标系中的第三平面位置;速度确定部分,配置为根据所述第二视频流的多个视频帧中标定点的第三平面位置,确定所述电动扶梯在竖直方向上的所述第二移动速度。In a possible implementation manner, the apparatus further includes: a second video stream acquiring part, configured to acquire a second video stream of the escalator, the capture area of the second video stream being the same as the first video stream The collection area of the stream is the same, and a calibration object is placed on the escalator; the third area determination part is configured to perform target detection on the second video stream, and determine the third area where the calibration object is located in the second video stream The position determination part is configured to determine the calibration point in the plane coordinates according to the third image position of the calibration point of the third area in the video frame of the second video stream, and the coordinate correspondence a third plane position in the system; a speed determination part configured to determine the second movement of the escalator in the vertical direction according to the third plane position of the calibration point in the plurality of video frames of the second video stream speed.
在一种可能的实现方式中,所述事件检测部分还配置为以下至少之一:在所述相对速度小于第一速度阈值的情况下,确定所述事件检测结果为发生第一类别的异常事件;在所述相对速度大于或等于所述第一速度阈值,且小于或等于第二速度阈值的情况下,确定所述事件检测结果为未发生异常事件,所述第二速度阈值大于所述第一速度阈值;在所述相对速度大于所述第二速度阈值,且小于或等于第三速度阈值的情况下,确定所述事件检测结果为发生第二类别的异常事件,所述第三速度阈值大于所述第二速度阈值;在所述相对速度大于所述第三速度阈值的情况下,确定所述事件检测结果为发生第三类别的异常事件。In a possible implementation manner, the event detection part is further configured to at least one of the following: when the relative speed is less than a first speed threshold, determine that the event detection result is the occurrence of an abnormal event of the first category ; In the case that the relative speed is greater than or equal to the first speed threshold and less than or equal to the second speed threshold, determine that the event detection result is that no abnormal event has occurred, and the second speed threshold is greater than the first speed threshold a speed threshold; when the relative speed is greater than the second speed threshold and less than or equal to the third speed threshold, it is determined that the event detection result is the occurrence of a second category of abnormal events, and the third speed threshold is greater than the second speed threshold; when the relative speed is greater than the third speed threshold, it is determined that the event detection result is the occurrence of an abnormal event of a third category.
在一种可能的实现方式中,所述装置还包括:告警部分,配置为在所述事件检测结果为发生以下至少之一的异常事件的情况下,发送与所述异常事件的类别对应的告警信息:所述第一类别的异常事件、第二类别的异常事件、所述第三类别的异常事件。In a possible implementation manner, the apparatus further includes: an alarm part configured to send an alarm corresponding to the category of the abnormal event when the event detection result is the occurrence of at least one of the following abnormal events Information: the first category of abnormal events, the second category of abnormal events, the third category of abnormal events.
在一种可能的实现方式中,所述第一类别的异常事件包括逆行事件,所述第二类别的异常事件包括行走事件,所述第三类别的异常事件包括跑动事件。In a possible implementation manner, the abnormal events of the first category include retrograde events, the abnormal events of the second category include walking events, and the abnormal events of the third category include running events.
根据本公开的一方面,提供了一种电子设备,包括:处理器;配置为存储处理器可执行指令的存储器;其中,所述处理器被配置为调用所述存储器存储的指令,以执行上述方法。According to an aspect of the present disclosure, there is provided an electronic device, comprising: a processor; a memory configured to store instructions executable by the processor; wherein the processor is configured to invoke the instructions stored in the memory to execute the above method.
根据本公开的一方面,提供了一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。According to an aspect of the present disclosure, there is provided a computer-readable storage medium having computer program instructions stored thereon, the computer program instructions implementing the above method when executed by a processor.
根据本公开的一方面,提供了一种计算机程序产品,包括计算机可读代码,当计算机可读代码在设备上运行时,设备中的处理器执行用于实现上述的事件检测方法的指令。According to an aspect of the present disclosure, there is provided a computer program product comprising computer readable code, when the computer readable code is executed on a device, a processor in the device executes instructions for implementing the above event detection method.
根据本公开的实施例,能够检测出视频流中对象所在的区域;根据该区域的目标点的图像位置,确定对象与电动扶梯的之间的相对速度;根据相对速度确定事件检测结果,能够提高事件检测的准确率,从而降低发生意外事故的概率,减少人力检测的成本。According to the embodiments of the present disclosure, the area where the object is located in the video stream can be detected; the relative speed between the object and the escalator can be determined according to the image position of the target point in the area; the event detection result can be determined according to the relative speed, which can improve the The accuracy of event detection, thereby reducing the probability of accidents and reducing the cost of human detection.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开。根据下面参考附图对示例性实施例的详细说明,本公开的其它特征及方面将变得清楚。It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the accompanying drawings.
附图说明Description of drawings
为了更清楚地说明本公开实施例的技术方案,下面将对实施例中所需要 使用的附图作简单地介绍,此处的附图被并入说明书中并构成本说明书中的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。应当理解,以下附图仅示出了本公开的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to explain the technical solutions of the embodiments of the present disclosure more clearly, the following briefly introduces the accompanying drawings required in the embodiments, which are incorporated into the specification and constitute a part of the specification. The drawings illustrate embodiments consistent with the present disclosure, and together with the description serve to explain the technical solutions of the present disclosure. It should be understood that the following drawings only show some embodiments of the present disclosure, and therefore should not be regarded as limiting the scope. Other related figures are obtained from these figures.
图1示出根据本公开实施例的事件检测方法的流程图;1 shows a flowchart of an event detection method according to an embodiment of the present disclosure;
图2a示出平面坐标系下的电动扶梯的移动方向向上的情况下的示意图;Figure 2a shows a schematic diagram of the moving direction of the escalator in a plane coordinate system when the moving direction is upward;
图2b示出平面坐标系下的电动扶梯的移动方向向下的情况下的示意图;Fig. 2b shows a schematic diagram in the case where the moving direction of the escalator is downward in a plane coordinate system;
图2c为本公开实施例提供的一种事件检测方法的流程框架示意图;FIG. 2c is a schematic diagram of a process framework of an event detection method provided by an embodiment of the present disclosure;
图3示出根据本公开实施例的事件检测装置的框图;3 shows a block diagram of an event detection apparatus according to an embodiment of the present disclosure;
图4示出根据本公开实施例的一种电子设备的框图;FIG. 4 shows a block diagram of an electronic device according to an embodiment of the present disclosure;
图5示出根据本公开实施例的另一种电子设备的框图。FIG. 5 shows a block diagram of another electronic device according to an embodiment of the present disclosure.
具体实施方式Detailed ways
以下将参考附图详细说明本公开的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numbers in the figures denote elements that have the same or similar functions. While various aspects of the embodiments are shown in the drawings, the drawings are not necessarily drawn to scale unless otherwise 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.
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中术语“至少一种”表示多种中的任意一种或多种中的至少两种的任意组合,例如,包括A、B、C中的至少一种,可以表示包括从A、B和C构成的集合中选择的任意一个或多个元素。The term "and/or" in this article is only an association relationship to describe the associated objects, indicating that there can be three kinds of relationships, for example, A and/or B, it can mean that A exists alone, A and B exist at the same time, and A and B exist independently B these three cases. In addition, the term "at least one" herein refers to any combination of any one of the plurality or at least two of the plurality, for example, including at least one of A, B, and C, and may mean including from A, B, and C. Any one or more elements selected from the set of B and C.
另外,为了更好地说明本公开,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本公开同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本公开的主旨。In addition, in order to better illustrate the present disclosure, numerous specific details are set forth in the following detailed description. It will be understood by those skilled in the art that the present disclosure may be practiced without certain specific details. In some instances, methods, means, components and circuits well known to those skilled in the art have not been described in detail so as not to obscure the subject matter of the present disclosure.
根据本公开实施例的事件检测方法,可应用于商场、写字楼、公共交通等场景中,基于深度学习的方法,通过对场景中电动扶梯所在区域的视频流进行分析,估计对象(例如行人)的运动速度,与电梯速度进行比较,进而判断行人是否存在走跑或逆行等异常行为。在发生异常行为时,定位到扶梯上异常行为发生的区域并及时告警,以便进行相应的处理,例如停止扶梯的运行,从而降低发生安全事故的风险。The event detection method according to the embodiment of the present disclosure can be applied to scenes such as shopping malls, office buildings, and public transportation. Based on the deep learning method, by analyzing the video stream of the area where the escalator is located in the scene, it is estimated that the The speed of movement is compared with the speed of the elevator to determine whether pedestrians have abnormal behaviors such as walking, running or retrograde. When an abnormal behavior occurs, locate the area where the abnormal behavior occurs on the escalator and give an alarm in time for corresponding processing, such as stopping the operation of the escalator, thereby reducing the risk of safety accidents.
图1示出根据本公开实施例的事件检测方法的流程图,如图1所示,所述事件检测方法包括: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:
在步骤S11中,获取电动扶梯的第一视频流;In step S11, obtain the first video stream of the escalator;
在步骤S12中,对所述第一视频流进行人体检测,确定所述第一视频流 中目标对象所在的第一区域;In step S12, human body detection is carried out to the first video stream to determine the first area where the target object is located in the first video stream;
在步骤S13中,根据所述第一区域的目标点在所述第一视频流的视频帧中的第一图像位置,确定所述目标对象与所述电动扶梯之间的相对速度;In step S13, the relative speed between the target object and the escalator is determined according to the first image position of the target point of the first area in the video frame of the first video stream;
在步骤S14中,根据所述目标对象的相对速度,确定所述目标对象的事件检测结果。In step S14, the event detection result of the target object is determined according to the relative speed of the target object.
在一种可能的实现方式中,所述事件检测方法可以由终端设备或服务器等电子设备执行,终端设备可以为以下之一:手机(Mobile Phone)、平板电脑(Pad)、带无线收发功能的电脑、掌上电脑、台式计算机、个人数字助理、便捷式媒体播放器、智能音箱、导航装置、智能手表、智能眼镜、智能项链等可穿戴设备、计步器、数字TV、虚拟现实(VirtualReality,VR)终端设备、增强现实(Augmented Reality,AR)终端设备、工业控制(Industrial Control)中的无线终端、无人驾驶(Self Driving)中的无线终端、远程手术(Remote Medical Surgery)中的无线终端、智能电网(Smart Grid)中的无线终端、运输安全(Transportation Safety)中的无线终端、智慧城市(Smart City)中的无线终端、智慧家庭(Smart Home)中的无线终端、车联网系统中的车、车载设备、车载模块等等,所述方法可以通过处理器调用存储器中存储的计算机可读指令的方式来实现。或者,可通过服务器执行所述方法。In a possible implementation manner, the event detection method may be performed by an electronic device such as a terminal device or a server, and the terminal device may be one of the following: a mobile phone (Mobile Phone), a tablet computer (Pad), a wireless transceiver Computers, PDAs, desktop computers, personal digital assistants, portable media players, smart speakers, navigation devices, smart watches, smart glasses, smart necklaces and other wearable devices, pedometers, digital TVs, virtual reality (VR) ) terminal equipment, Augmented Reality (AR) terminal equipment, wireless terminals in Industrial Control, wireless terminals in Self Driving, wireless terminals in Remote Medical Surgery, Wireless terminal in Smart Grid, wireless terminal in Transportation Safety, wireless terminal in Smart City, wireless terminal in Smart Home, vehicle in Internet of Vehicles system , in-vehicle equipment, in-vehicle module, etc., the method can be implemented by the processor calling computer-readable instructions stored in the memory. Alternatively, the method may be performed by a server.
举例来说,可在待检测的电动扶梯所在的位置设置至少一个图像采集设备,例如设置朝向电动扶梯的至少一个摄像头,以便采集电动扶梯的视频流,并对视频流画面中搭乘电动扶梯的对象(例如行人)进行检测。本公开对图像采集装置的安装位置、视频流的采集方式及视频流对应的具体区域均不作限制。For example, at least one image acquisition device can be installed at the location where the escalator to be detected is located, for example, at least one camera facing the escalator can be installed, so as to collect the video stream of the escalator, and monitor the object riding on the escalator in the video stream. (eg pedestrians) for detection. The present disclosure does not limit the installation position of the image acquisition device, the acquisition method of the video stream, and the specific area corresponding to the video stream.
在一种可能的实现方式中,在步骤S11中,可获取电动扶梯的视频流(称为第一视频流),例如接收图像采集设备上传的第一视频流;并对采集到的第一视频流进行解码,得到解码后的第一视频流(也可称为图片流)。In a possible implementation manner, in step S11, a video stream of the escalator (referred to as the first video stream) may be acquired, for example, a first video stream uploaded by an image capture device may be received; The stream is decoded to obtain a decoded first video stream (also referred to as a picture stream).
在一种可能的实现方式中,在步骤S12中,可对解码后的第一视频流进行人体检测,确定视频流的各个视频帧中的人体框;并对各个视频帧中的人体框进行跟随,确定属于同一身份的行人(可称为目标对象)的人体框,也即,确定出第一视频流中目标对象所在的第一区域。In a possible implementation manner, in step S12, human body detection may be performed on the decoded first video stream to determine the human body frame in each video frame of the video stream; and follow the human body frame in each video frame , determine the body frame of a pedestrian (which may be called a target object) belonging to the same identity, that is, determine the first area where the target object is located in the first video stream.
其中,人体检测的方式可例如为人体关键点识别、人体轮廓检测等;人体跟随的方式可例如为,根据相邻视频帧中人体框的交并比,确定属于同一身份的对象。本领域技术人员应当理解,可采用相关技术中的任意方式实现人体检测及跟随,本公开对此不作限制。The method of human body detection may be, for example, human body key point recognition, human body contour detection, etc. The method of human body tracking may be, for example, determining objects belonging to the same identity according to the intersection ratio of human body frames in adjacent video frames. Those skilled in the art should understand that human body detection and follow-up may be implemented in any manner in the related art, which is not limited in the present disclosure.
在一种可能的实现方式中,可对第一视频流的每个视频帧进行人体检测及跟随;也可以一定的时间间隔对第一视频流进行采样,对采样的视频帧进行人体检测及跟随;还可以获取第一视频流中的关键帧,对关键帧进行人体检测及跟随。本公开对此不作限制。In a possible implementation manner, human body detection and follow-up may be performed on each video frame of the first video stream; the first video stream may also be sampled at a certain time interval, and human body detection and follow-up may be performed on the sampled video frames ; It can also obtain key frames in the first video stream, and perform human detection and follow-up on the key frames. This disclosure does not limit this.
在一种可能的实现方式中,在确定第一区域后,可从第一区域中确定出至少一个目标点,以便计算目标对象的移动速度。可例如将第一区域的顶点、 中心点,或区域边界上的点作为目标点,本公开对目标点的选取不作限制。In a possible implementation manner, after the first area is determined, at least one target point may be determined from the first area, so as to calculate the moving speed of the target object. For example, the vertex of the first region, the center point, or the point on the boundary of the region can be used as the target point, and the present disclosure does not limit the selection of the target point.
在一种可能的实现方式中,可在步骤S13中,根据目标点在多个视频帧中的第一图像位置,计算出目标对象的移动速度,例如,根据目标点的多个位置坐标,通过最小二乘直线拟合方式,计算出目标对象的移动速度;根据预先确定的电动扶梯的移动速度以及该目标对象的移动速度,即可确定出该目标对象与电动扶梯之间的相对速度。In a possible implementation manner, in step S13, the moving speed of the target object may be calculated according to the first image positions of the target point in multiple video frames, for example, according to the multiple position coordinates of the target point, by The least squares straight line fitting method is used to calculate the moving speed of the target object; 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.
在一种可能的实现方式中,可在步骤S14中,根据该相对速度,确定出该目标对象的事件检测结果。例如,可预设有多个速度阈值,根据该相对速度与各个速度阈值之间的关系,确定事件检测结果为发生异常事件或未发生异常事件。In a possible implementation manner, in step S14, the event detection result of the target object may be determined according to the relative speed. For example, multiple speed thresholds may be preset, and according to the relationship between the relative speed and each speed threshold, it is determined that the event detection result is an abnormal event or no abnormal event occurs.
在一种可能的实现方式中,电动扶梯上的对象可能发生逆行、行走、或跑动等异常行为,相应地,异常事件可包括多个类别。例如,第一类别的异常事件包括逆行事件,第二类别的异常事件包括行走事件,第三类别的异常事件包括跑动事件等。本公开对异常事件的具体类别不作限制。In a possible implementation manner, the object on the escalator may have abnormal behaviors such as retrograde, walking, or running, and accordingly, the abnormal event may include multiple categories. For example, the abnormal events in the first category include retrograde events, the abnormal events in the second category include walking events, and the abnormal events in the third category include running events. The present disclosure does not limit the specific categories of abnormal events.
在一种可能的实现方式中,如果事件检测结果为发生异常事件,则可生成并发送与异常事件的类别对应的告警信息。该告警信息可包括异常事件的提醒,还可包括发生异常事件的目标对象所在的区域,以便相关人员进行定位。本公开对该告警信息的具体内容不作限制。In a possible implementation manner, 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 sent. The alarm information may include a reminder of the abnormal event, and may also include the area where the target object where the abnormal event occurs, so that the relevant personnel can locate it. The present disclosure does not limit the specific content of the alarm information.
在一种可能的实现方式中,可例如将告警信息发送给电动扶梯的控制装置,以使控制装置停止扶梯的运行;也可将告警信息发送给负责电动扶梯运行的相关人员能够看到的设备(例如终端设备和/或屏显设备等),以使相关人员停止扶梯的运行,并前往电动扶梯进行救助等。本公开对告警信息的内容不作限制。In a possible implementation, for example, alarm information can be sent to the control device of the escalator, so that the control device can stop the operation of the escalator; the alarm information can also be sent to a device that can be seen by the relevant personnel responsible for the operation of the escalator (such as terminal equipment and/or screen display equipment, etc.), so that the relevant personnel can stop the operation of the escalator and go to the escalator for rescue, etc. The present disclosure does not limit the content of the alarm information.
根据本公开的实施例,能够检测出视频流中对象所在的区域;根据该区域的目标点的图像位置,确定对象与电动扶梯的之间的相对速度;根据相对速度确定事件检测结果,能够提高事件检测的准确率,从而降低发生意外事故的概率,减少人力检测的成本。According to the embodiments of the present disclosure, the area where the object is located in the video stream can be detected; the relative speed between the object and the escalator can be determined according to the image position of the target point in the area; the event detection result can be determined according to the relative speed, which can improve the The accuracy of event detection, thereby reducing the probability of accidents and reducing the cost of human detection.
下面对本公开的实施例的事件检测方法进行展开说明。The event detection method of the embodiment of the present disclosure will be described below.
如前所述,可通过摄像头采集电动扶梯所在区域的视频流,并将采集的视频流传输给本地的前置服务器或云端服务器等电子设备。电子设备可对接收到的视频流进行解码,得到解码后的视频流。As mentioned above, the video stream of the area where the escalator is located can be captured by the camera, and the captured video stream can be transmitted to electronic devices such as a local front-end server or a cloud server. The electronic device can decode the received video stream to obtain the decoded video stream.
在步骤S12中,可通过检测网络,对解码后的视频流进行人体检测及跟随,检测出视频流的各个视频帧中的人体框,并跟随属于同一身份的行人的人体框,得到视频流中目标对象所在的第一区域。该检测网络可以为卷积神经网络,本公开对检测网络的网络结构不作限制。In step S12, the human body detection and follow-up can be performed on the decoded video stream through the detection network, the human body frame in each video frame of the video stream is detected, and the human body frame of the pedestrian belonging to the same identity is followed to obtain the human body frame in the video stream. The first area where the target object is located. The detection network may be a convolutional neural network, and the present disclosure does not limit the network structure of the detection network.
在得到第一区域后,可确定该第一区域中的目标点的位置,以便计算目标对象的移动速度。After the first area is obtained, the position of the target point in the first area can be determined so as to calculate the moving speed of the target object.
由于在视频帧的图像坐标系下,存在透视变换效应(也即图像中的目标近大远小),导致电动扶梯各处的移动速度不同,不便于后续分析,因此可采 用电动扶梯所在平面的平面坐标系,以便于后续处理。在该情况下,可在进行事件检测之前,预先确定视频帧的图像坐标系与电动扶梯的平面坐标系之间的坐标对应关系。In the image coordinate system of the video frame, there is a perspective transformation effect (that is, the target in the image is near large and far small), resulting in different moving speeds of the escalator everywhere, which is not convenient for subsequent analysis. Therefore, the plane where the escalator is located can be used. Planar coordinate system for easy subsequent processing. 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 predetermined before the event detection.
在一种可能的实现方式中,根据本公开实施例的事件检测方法还可包括:In a 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, where the collection area of the calibration image is the same as the collection area of the first video stream;
确定所述电动扶梯在所述标定图像中的第二区域;determining a second area of the escalator in the calibration image;
根据所述第二区域的多个顶点在所述标定图像中的第二图像位置,以及所述多个顶点在所述平面坐标系中的第二平面位置,确定所述坐标对应关系。The coordinate correspondence is determined according to the second image positions of the plurality of vertices in the calibration image and the second plane positions of the plurality of vertices in the plane coordinate system.
举例来说,可在电动扶梯上没有行人或行人较少的情况下,通过摄像头采集电动扶梯的图像,作为标定图像;或者从电动扶梯的视频流中选取一个视频帧,作为标定图像。该标定图像的采集区域与第一视频流的采集区域相同。本公开对标定图像的获取方式不作限制。For example, when there are no pedestrians or there are few pedestrians on the escalator, the image of the escalator can be collected by the camera as the calibration image; or a video frame can be selected from the video stream of the escalator as the calibration image. The collection area of the calibration image is the same as the collection area of the first video stream. The present disclosure does not limit the acquisition method of the calibration image.
在一种可能的实现方式中,可确定电动扶梯在标定图像中的区域(可称为第二区域)。可人工标注出第二区域;也可通过已训练的区域检测网络,对标定图像进行区域检测,确定出电动扶梯在标定图像中第二区域。该区域检测网络可例如为卷积神经网络,本公开对区域检测网络的具体网络结构及训练方式均不作限制。In a possible implementation manner, an area (which may be referred to as a second area) of the escalator in the calibration image may be determined. The second area can be marked manually; the second area of the escalator in the calibration image can also be determined by performing area detection on the calibration image through the trained area detection network. The region detection network may be, for example, a convolutional neural network, and the present disclosure does not limit the specific network structure and training method of the region detection network.
在一种可能的实现方式中,可确定第二区域的多个顶点在标定图像中的位置坐标(可称为第二图像位置),例如确定第二区域的左上、右上、左下、右下四个顶点在图像坐标系下的位置坐标。In a possible implementation manner, the position coordinates of the multiple vertices of the second region in the calibration image (which may be referred to as the second image position) may be determined, for example, the upper left, upper right, lower left, and lower right of the second region may be determined. The position coordinates of a vertex in the image coordinate system.
在一种可能的实现方式中,可根据电动扶梯的移动方向,标出四个顶点p1、p2、p3、p4在图像坐标系下的位置坐标(x 1,y 1),(x 2,y 2),(x 3,y 3),(x 4,y 4),并设定这四个顶点p1、p2、p3、p4,在电动扶梯的平面坐标系中的第二平面位置分别为:(x′ 1,y′ 1)=(0,0),(x′ 2,y′ 2)=(w,0),(x′ 3,y′ 3)=(0,h),(x′ 4,y′ 4)=(w,h),其中w和h分别为平面坐标系下电梯的宽和高,可任意指定一个正实数。 In a possible implementation, according to the moving direction of the escalator, the position coordinates (x 1 , y 1 ), (x 2 , y of the four vertices p1 , p2 , p3 and p4 in the image coordinate system can be marked 2 ), (x 3 , y 3 ), (x 4 , y 4 ), and set the four vertices p1, p2, p3, p4, the second plane positions in the plane coordinate system of the escalator are: (x′ 1 ,y′ 1 )=(0,0),(x′ 2 ,y′ 2 )=(w,0),(x′ 3 ,y′ 3 )=(0,h),(x ′ 4 ,y′ 4 )=(w,h), where w and h are the width and height of the elevator in the plane coordinate system, respectively, and a positive real number can be arbitrarily specified.
图2a示出平面坐标系下的电动扶梯的移动方向向上的情况下的示意图,图2b示出平面坐标系下的电动扶梯的移动方向向下的情况下的示意图。Fig. 2a shows a schematic diagram in a case where the moving direction of the escalator in a plane coordinate system is upward, and Fig. 2b shows a schematic diagram in a case where the moving direction of the escalator in a plane coordinate system is downward.
如图2a和图2b所示,在一种可能的实现方式中,根据顶点p1、p2、p3、p4在图像坐标系中的第二图像位置,以及顶点p1、p2、p3、p4在平面坐标系中的第二平面位置,可计算出图像坐标系与平面坐标系之间的透视变换矩阵(称为H矩阵),也即图像坐标系与平面坐标系之间的坐标对应关系。透视变换矩阵具有8个未定的参数,通过四个顶点p1、p2、p3、p4可唯一确定该图像坐标系与平面坐标系之间的透视变换矩阵。As shown in Fig. 2a and Fig. 2b, in a possible implementation, according to the second image position of the vertices p1, p2, p3, p4 in the image coordinate system, and the vertices p1, p2, p3, p4 in the plane coordinate The second plane position in the system can be used to calculate the perspective transformation matrix (called the H matrix) between the image coordinate system and the plane coordinate system, that is, the coordinate correspondence between the image coordinate system and 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 the four vertices p1, p2, p3, and p4.
通过这种方式,可确定图像坐标系与平面坐标系之间的坐标对应关系,以便在后续处理中对电动扶梯和对象的位置坐标进行变换,提高速度计算的便利性和准确性。In this way, the coordinate correspondence 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 accuracy of the speed calculation can be improved.
在进行事件检测之前,还可预先标定电动扶梯的移动速度。Before the event detection, the moving speed of the escalator can also be pre-calibrated.
在一种可能的实现方式中,根据本公开实施例的事件检测方法还可包括:In a 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, where the collection area of the second video stream is the same as the collection area of the first video stream, and a calibration object is placed on the escalator;
对所述第二视频流进行目标检测,确定所述第二视频流中标定物所在的第三区域;Perform target detection on the second video stream, and determine the third area where the calibration object is located in the second video stream;
根据所述第三区域的标定点在所述第二视频流的视频帧中的第三图像位置,以及所述坐标对应关系,确定所述标定点在所述平面坐标系中的第三平面位置;According to the third image position of the calibration point of the third area in the video frame of the second video stream, and the coordinate correspondence, determine the third plane position of the calibration point in the plane coordinate system ;
根据所述第二视频流的多个视频帧中标定点的第三平面位置,确定所述电动扶梯在竖直方向上的第二移动速度。The second moving speed of the escalator in the vertical direction is determined according to the third plane position of the calibration point in the plurality of video frames of the second video stream.
举例来说,可在没有行人或行人较少的情况下,在电动扶梯上放置相对于电动扶梯静止的标定物,通过摄像头采集电动扶梯的视频流(可称为第二视频流)。其中,第二视频流的采集区域与第一视频流的采集区域相同。该标定物可例如为物品或工作人员等,本公开对此不作限制。For example, when there are no pedestrians or there are few pedestrians, a calibration object that is stationary relative to the escalator can be placed on the escalator, and a video stream of the escalator (which can be referred to as a second video stream) can be captured by a camera. The collection area of the second video stream is the same as the collection area of the first video stream. The calibration object can be, for example, an item or a staff member, which is not limited in the present disclosure.
在一种可能的实现方式中,也可从电动扶梯的第一视频流中,截取存在相对于电动扶梯静止的人员或物品的一段视频流,作为第二视频流;并将该人员或物品作为标定物。本公开对第二视频流的获取方式不作限制。In a possible implementation, a video stream in which a person or item is stationary relative to the escalator can also be intercepted from the first video stream of the escalator, as the second video stream; and the person or item is used as the second video stream. calibrator. The present disclosure does not limit the acquisition method of the second video stream.
在一种可能的实现方式中,可通过已训练的目标检测网络,对第二视频流的至少两个视频帧进行目标检测,确定出标定物在视频帧中的区域(可称为第三区域)。该目标检测网络可例如为卷积神经网络,本公开对目标检测网络的具体网络结构及训练方式均不作限制。In a possible implementation manner, the trained target detection network may be used to perform target detection on at least two video frames of the second video stream to determine the area of the calibration object in the video frame (which may be referred to as the third area). ). 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 method of the target detection network.
在一种可能的实现方式中,可确定第三区域中的标定点,该标定点可例如为第三区域的顶点、中心点,或区域边界上的点,本公开对标定点的选取不作限制。In a possible implementation manner, a calibration point in the third area may be determined, and the calibration point may be, for example, a vertex, a center point, or a point on the boundary of the third area, and the present disclosure does not limit the selection of the calibration point .
在一种可能的实现方式中,设该标定点在第二视频流的第i个视频帧和第j个视频帧中的图像坐标(称为第三图像位置),分别为(x i,y i)和(x j,y j)。根据上面确定的坐标对应关系(即H矩阵),可确定该标定点在平面坐标系中的位置坐标(称为第三平面位置)为(x′ i,y′ i)和(x′ j,y′ j)。 In a possible implementation, set the image coordinates (called the third image position) of the calibration point in the i-th video frame and the j-th video frame of the second video stream, respectively (x i , y i ) and (x j , y j ). According to the coordinate correspondence determined above (ie H matrix), the position coordinates (called the third plane position) of the calibration point in the plane coordinate system can be determined as (x′ i , y′ i ) and (x′ j , y'j ).
在一种可能的实现方式中,设电动扶梯的移动速度为匀速且速度恒定,则可根据第三平面位置(x′ i,y′ i)和(x′ j,y′ j)中的纵坐标,通过下面的公式(1)来确定电动扶梯在竖直方向上的第二移动速度v y0In a possible implementation, assuming that the moving speed of the escalator is constant and constant, then according to the vertical position in the third plane position (x′ i , y′ i ) and (x′ j , y′ j ) Coordinates, the second moving speed v y0 of the escalator in the vertical direction is determined by the following formula (1):
v y0=(y′ j-y′ i)/(j-i)         (1); v y0 =(y′ j -y′ i )/(ji) (1);
通过这种方式,可预先标定电动扶梯的移动速度,以便在后续处理中确定相对速度。In this way, the moving speed of the escalator can be pre-calibrated so that the relative speed can be determined in subsequent processing.
在步骤S12中得到第一区域后,可确定该第一区域中的目标点的位置,以便计算目标对象的移动速度。After the first area is obtained in step S12, the position of the target point in the first area can 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 changes; and the feet of the target object usually fall on the elevator plane, and the position is more accurate. Therefore, the midpoint of the bottom edge of the first area can be used as the target point to improve Accuracy of movement speed calculations.
在一种可能的实现方式中,设第一区域的左下顶点和右下顶点在图像坐标系下的坐标分别为(x bl,y bl)和(x br,y br),则目标点在图像坐标系下的坐标可表示为(x c,y c)=((x b1+x br)/2,(y bl+y br)/2),即第一图像位置。 In a possible implementation, set the coordinates of the lower left vertex and the lower right vertex of the first region in the image coordinate system to be (x bl , y bl ) and (x br , y br ) respectively, then the target point is in the image The coordinates in the coordinate system can be expressed as (x c , y c )=((x b1 +x br )/2, (y bl +y br )/2), that is, the first image position.
在一种可能的实现方式中,步骤S13可包括:In a possible implementation, step S13 may include:
根据所述第一图像位置,以及所述视频帧的图像坐标系与所述电动扶梯所在的平面坐标系之间的坐标对应关系,确定所述目标点在所述平面坐标系中的第一平面位置;Determine the first plane of the target point in the plane coordinate system according to the first image position and the coordinate correspondence between the image coordinate system of the video frame and the plane coordinate system where the escalator is located Location;
根据所述第一视频流的多个视频帧中目标点的第一平面位置,确定所述目标对象的第一移动速度;determining the first moving speed of the target object according to the first plane position of the target point in the multiple video frames of the first video stream;
根据所述第一移动速度与所述电动扶梯的第二移动速度之间的比值,确定所述相对速度。The relative speed is determined according to the ratio between the first moving speed and the second moving speed of the escalator.
举例来说,可根据视频帧的图像坐标系与电动扶梯所在的平面坐标系之间的坐标对应关系(即H矩阵),对目标点的第一图像位置(x c,y c)进行坐标变换,得到目标点在平面坐标系下的第一平面位置(x′ c,y′ c)。根据该目标对象的目标点在多个视频帧中的第一平面位置,可确定第一移动速度。 For example, coordinate transformation can be performed on the first image position (x c , y c ) of the target point according to the coordinate correspondence between the image coordinate system of the video frame and the plane coordinate system where the escalator is located (ie, the H matrix). , obtain the first plane position (x′ c , y′ c ) of the target point in the plane coordinate system. The first moving speed may be determined according to the first plane position of the target point of the target object in the plurality of video frames.
通过这种方式,可确定出目标对象与电动扶梯之间的相对速度,进而能够基于相对速度确定目标对象在电动扶梯上的行为事件,以便后续判定是否发生异常事件。In this way, the relative speed between the target object and the escalator can be determined, and then the behavior events of the target object on the escalator can be determined based on the relative speed, so as to determine whether an abnormal event occurs subsequently.
在一种可能的实现方式中,根据所述第一视频流的多个视频帧中目标点的第一平面位置,确定所述目标对象的第一移动速度的步骤,可包括:In a possible implementation manner, the step of determining the first moving speed of the target object according to the first plane position of the target point in multiple video frames of the first video stream may include:
根据多个第一平面位置在竖直方向上的坐标,通过最小二乘直线拟合方式确定所述目标对象在竖直方向上的第一移动速度。According to the coordinates of a plurality of first plane positions in the vertical direction, the first moving speed of the target object in the vertical direction is determined by means of least squares straight line fitting.
也就是说,可根据目标点在当前时刻的视频帧以及当前时刻之前的多个视频帧(例如30个视频帧)中的第一图像位置,分别进行坐标变换,得到多个第一平面位置;根据多个第一平面位置的纵坐标y′ c,可采用最小二乘直线拟合的方式,估计出该目标对象当前时刻在竖直方向上的第一移动速度v y。通过这种方式,可提高速度计算的准确性。 That is to say, coordinate transformation can be performed respectively according to the first image position of the target point in the video frame at the current moment and the multiple video frames (for example, 30 video frames) before the current moment to obtain a plurality of first plane positions; According to the ordinates y′ c of the multiple first plane positions, the first moving speed vy of the target object in the vertical direction at the current moment can be estimated by means of least squares straight line fitting. In this way, the accuracy of the velocity calculation can be improved.
应当理解,也可采用其他方式估计第一移动速度,本公开对此不作限制。It should be understood that the first moving speed may also be estimated in other manners, which is not limited in the present disclosure.
在一种可能的实现方式中,根据第一移动速度与电动扶梯的第二移动速度之间的比值,确定目标对象与电动扶梯之间的相对速度v rIn a possible implementation manner, the relative speed v r between the target object and the escalator is determined according to the ratio between the first moving speed and the second moving speed of the escalator.
Figure PCTCN2021107285-appb-000001
Figure PCTCN2021107285-appb-000001
由于第一移动速度与第二移动速度均为相对的数值,因此采用速度比值的方式,能够提高后续判定的准确性。应当理解,也可采用其他方式确定目标对象与电动扶梯之间的相对速度,本公开对此不作限制。Since both the first moving speed and the second moving speed are relative values, the speed ratio method can improve the accuracy of subsequent determination. It should be understood that the relative speed between the target object and the escalator may also be determined in other manners, which is not limited in the present disclosure.
通过这种方式,由于第一移动速度为目标对象在竖直方向上的移动速度,从而使得第一移动速度能够与手动扶梯的移动速度保持一致,进而能够使得确定的相对速度准确。In this way, since the first moving speed is the moving speed of the target object in the vertical direction, the first moving speed can be kept consistent with the moving speed of the escalator, thereby making the determined relative speed accurate.
在一种可能的实现方式中,在步骤S14中根据所述相对速度,确定所述目标对象的事件检测结果,包括以下至少之一:In a possible implementation manner, in step S14, the event detection result of the target object is determined according to the relative speed, including at least one of the following:
在所述相对速度小于第一速度阈值的情况下,确定所述事件检测结果为发生第一类别的异常事件;In the case that the relative speed is less than the first speed threshold, determining that the event detection result is the occurrence of an abnormal event of the first category;
在所述相对速度大于或等于所述第一速度阈值,且小于或等于第二速度阈值的情况下,确定所述事件检测结果为未发生异常事件,所述第二速度阈值大于所述第一速度阈值;When the relative speed is greater than or equal to the first speed threshold and less than or equal to a second speed threshold, it is determined that the event detection result is that no abnormal event has occurred, and the second speed threshold is greater than the first speed threshold speed threshold;
在所述相对速度大于所述第二速度阈值,且小于或等于第三速度阈值的情况下,确定所述事件检测结果为发生第二类别的异常事件,所述第三速度阈值大于所述第二速度阈值;In the case where the relative speed is greater than the second speed threshold and less than or equal to a third speed threshold, determine that the event detection result is the occurrence of a second category of abnormal events, the third speed threshold being greater than the third speed threshold Two speed thresholds;
在所述相对速度大于所述第三速度阈值的情况下,确定所述事件检测结果为发生第三类别的异常事件。In the case that the relative speed is greater than the third speed threshold, it is determined that the event detection result is the occurrence of an abnormal event of a third category.
举例来说,针对电动扶梯上的对象可能发生的逆行、行走、或跑动等异常行为,可设定第一类别的异常事件包括逆行事件,第二类别的异常事件包括行走事件,第三类别的异常事件包括跑动事件等。本公开对异常事件的具体类别不作限制。For example, for the abnormal behaviors such as retrograde, walking, or running that may occur to objects on the escalator, it can be set that the abnormal events of the first category include retrograde events, the abnormal events of the second category include walking events, and the third category of abnormal events can be set. The abnormal events include running events, etc. The present disclosure does not limit the specific categories of abnormal events.
在一种可能的实现方式中,根据异常事件的多个类别,可分别设定多个速度阈值,根据相对速度与各个速度阈值之间的关系,确定事件检测结果。例如,可设定有第一速度阈值Thresh back、第二速度阈值Thresh walk及第三速度阈值Thresh run,第二速度阈值大于第一速度阈值,第三速度阈值大于第二速度阈值。 In a possible implementation manner, according to multiple categories of abnormal events, multiple speed thresholds may be set respectively, 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 back , a second speed threshold Thresh walk and a third speed threshold Thresh run may be set. The second speed threshold is greater than the first speed threshold and the third speed threshold is greater than the second speed threshold.
其中,第一速度阈值可例如取值为-0.9,第二速度阈值可例如取值为0.9,第三速度阈值可例如取值为1.8。本公开对各个速度阈值的具体取值不作限制。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 does not limit the specific value of each speed threshold.
表1示出了相对速度与判定结果之间的对应关系。Table 1 shows the correspondence between the relative speed and the determination result.
表1Table 1
相对速度Relative velocity 判定结果judgement result
v r<Thresh back v r <Thresh back 逆行retrograde
Thresh back≤v r≤Thresh walk Thresh back ≤v r ≤Thresh walk 静止still
Thresh walk<v r≤Thresh run Thresh walk <v r ≤Thresh run 行走walk
Thresh run<v r Thresh run <v r 跑动run
在一种可能的实现方式中,如表1所示,如果相对速度v r小于第一速度阈值Thresh back,则可认为目标对象的移动方向与电动扶梯相反,且反向速度较大。该情况下,可判定目标对象发生逆行行为,确定事件检测结果为发生逆行事件。 In a possible implementation, as shown in Table 1, if the relative speed v r is less than the first speed threshold Thresh back , it can be considered that the moving direction of the target object is opposite to that of the escalator, and the reverse speed is relatively large. In this case, it can be determined that the target object has retrograde behavior, and the event detection result is determined to be a retrograde event.
在一种可能的实现方式中,如表1所示,如果相对速度v r大于或等于第一速度阈值Thresh back,且小于或等于第二速度阈值Thresh walk,则可认为目标 对象相对于电动扶梯的速度较小。该情况下,可判定目标对象在电动扶梯上静止,确定事件检测结果为未发生异常事件。 In a possible implementation manner, as shown in Table 1, if the relative speed v r is greater than or equal to the first speed threshold Thresh back and less than or equal to the second speed threshold Thresh walk , it can be considered that the target object is relative to the escalator speed is smaller. In this case, it can be determined that the target object is stationary on the escalator, and it can be determined that the event detection result is that no abnormal event has occurred.
在一种可能的实现方式中,如表1所示,如果相对速度v r大于第二速度阈值Thresh walk,且小于或等于第三速度阈值Thresh run,则可认为目标对象在电动扶梯上正向行走。该情况下,确定事件检测结果为发生行走事件。 In a possible implementation manner, as shown in Table 1, if the relative speed v r is greater than the second speed threshold Thresh walk and less than or equal to the third speed threshold Thresh run , it can be considered that the target object is moving forward on the escalator walk. In this case, it is determined that the event detection result is the occurrence of a walking event.
在一种可能的实现方式中,如表1所示,如果相对速度v r大于第三速度阈值Thresh run,则可认为目标对象在电动扶梯上正向跑动。该情况下,确定事件检测结果为发生跑动事件。 In a possible implementation manner, as shown in Table 1, if the relative speed v r is greater than the third speed threshold Thresh run , it can be considered that the target object is running forward on the escalator. In this case, it is determined that the event detection result is the occurrence of a running event.
在一种可能的实现方式中,也可在相对速度处于相应的阈值区间内,且持续一定时长时,确定为发生异常事件,从而避免单次相对速度判定时可能发生的误检。本公开对具体的判定方式不作限制。In a possible implementation manner, when the relative velocity is within the corresponding threshold interval and lasts for a certain period of time, it can be determined that an abnormal event has occurred, so as to avoid possible false detections during a single relative velocity determination. The present disclosure does not limit the specific determination method.
通过这种方式,能够实现逆行、行走及跑动的异常事件的判定,提高事件检测的准确率,减少人力检测的成本。In this way, abnormal events of retrograde, walking and running can be determined, the accuracy of event detection can be improved, and the cost of human detection can be reduced.
在一种可能的实现方式中,在步骤S14中确定事件检测结果之后,根据本公开实施例的事件检测方法还可包括:In a possible implementation manner, after the event detection result is determined in step S14, the event detection method according to the embodiment of the present disclosure may further include:
在所述事件检测结果为发生以下至少之一的异常事件的情况下,发送与所述异常事件的类别对应的告警信息:所述第一类别的异常事件、第二类别的异常事件、所述第三类别的异常事件。When the event detection result is that an abnormal event of at least one of the following occurs, alarm information corresponding to the category of the abnormal event is sent: the abnormal event of the first category, the abnormal event of the second category, the A third category of abnormal events.
也就是说,如果事件检测结果为发生异常事件,则可生成并发送与异常事件的类别对应的告警信息,即与逆行事件、行走事件或跑动事件对应的告警信息。That is, if the event detection result is that an abnormal event occurs, alarm information corresponding to the category of the abnormal event, that is, alarm information corresponding to a retrograde event, a walking event, or a running event may be generated and sent.
在一种可能的实现方式中,也可在发生部分类别的异常事件时,生成并发送告警信息。例如,仅在发生逆行事件时,发送告警信息;或者,在发生逆行事件或跑动事件时,发送告警信息。本公开对告警信息的发送条件不作限制。In a possible implementation manner, alarm information may also be generated and sent when some types of abnormal events occur. For example, only when a retrograde event occurs, the alarm information is sent; or, when a retrograde event or a running event occurs, the alarm information is sent. The present disclosure does not limit the sending conditions of the alarm information.
在一种可能的实现方式中,该告警信息可包括异常事件的提醒,还可包括发生异常事件的目标对象所在的区域,以便相关人员进行定位。本公开对该告警信息的具体内容不作限制。In a possible implementation manner, the alarm information may include a reminder of an abnormal event, and may also include an area where the target object where the abnormal event occurs, so that relevant personnel can locate. The present disclosure does not limit the specific content of the alarm information.
在一种可能的实现方式中,可例如将告警信息发送给电动扶梯的控制装置,以使控制装置停止扶梯的运行;也可将告警信息发送给负责电动扶梯运行的相关人员能够看到的设备(例如终端设备和/或屏显设备等),以使相关人员停止扶梯的运行,并前往电动扶梯进行救助等。本公开对告警信息的内容不作限制。In a possible implementation, for example, alarm information can be sent to the control device of the escalator, so that the control device can stop the operation of the escalator; the alarm information can also be sent to a device that can be seen by the relevant personnel responsible for the operation of the escalator (such as terminal equipment and/or screen display equipment, etc.), so that the relevant personnel can stop the operation of the escalator and go to the escalator for rescue, etc. The present disclosure does not limit the content of the alarm information.
通过这种方式,能够在判定出异常时及时告警,以便进行相应的处理,从而降低发生安全事故的风险。In this way, when an abnormality is determined, an alarm can be timely so that corresponding processing can be performed, thereby reducing the risk of a security accident.
图2c为本公开实施例提供的一种事件检测方法的流程框架示意图,如图2c所示,该流程框架包括行人检测和跟随模块、走跑逆行识别模块以及蹲坐识别模块。FIG. 2c is a schematic diagram of a process framework of an event detection method provided by an embodiment of the present disclosure. As shown in FIG. 2c, the process framework includes a pedestrian detection and following module, a walking and running retrograde recognition module, and a squatting recognition module.
输入视频流经过解码后,输入到行人检测和跟随模块,得到每个行人的 第一区域(表示为每个行人检测框左上角和右下角顶点坐标(x 1,y 1),(x 2,y 2),以及对应行人的跟随ID)。行人检测框可以为矩形框。其中,行人检测通常由深度神经网络实现,行人跟随算法包括基于深度学习的算法、基于IoU匹配的算法等,本公开实施例不限定使用何种检测和跟随算法。 After the input video stream is decoded, it is input to the pedestrian detection and follow-up module, and the first area of each pedestrian is obtained (represented as the vertex coordinates of the upper left corner and the lower right corner of each pedestrian detection frame (x 1 , y 1 ), (x 2 , y 2 ), and the follower ID of the corresponding pedestrian). The pedestrian detection frame can be a rectangular frame. Wherein, pedestrian detection is usually implemented by a deep neural network, and pedestrian following algorithms include algorithms based on deep learning, algorithms based on IoU matching, etc. The embodiments of the present disclosure do not limit which detection and following algorithms are used.
可以通过已训练的姿态识别网络对第一区域对应的第一区域图像进行姿态识别,得到所述目标对象的姿态识别结果,即通过该姿态识别网络输出姿态识别结果。例如,姿态识别网络可以为蹲坐识别模块,从而通过蹲坐识别模块输出蹲坐事件。The posture recognition result of the target object can be obtained by performing posture recognition on the image of the first area corresponding to the first area through the trained posture recognition network, that is, the posture recognition result is output through the posture recognition network. For example, the gesture recognition network may be a squatting recognition module, so that the squatting event is output through the squatting recognition module.
本公开实施例可以走跑逆行识别模块可以采用视频流分析行人运动速度,与电梯速度进行比较,进而判断行人是否存在走跑或逆行行为,例如输出走跑、逆行事件。走跑逆行识别模块可以用于实现步骤S13和S14:根据所述第一区域的目标点在所述第一视频流的视频帧中的第一图像位置,确定所述目标对象与所述电动扶梯之间的相对速度;根据所述相对速度,确定所述目标对象的事件检测结果。In this embodiment of the present disclosure, the walking-running retrograde recognition module can use video streams to analyze pedestrian movement speed, compare it with the elevator speed, and then determine whether the pedestrian has running or retrograde behavior, such as outputting running and retrograde events. The walking and running retrograde recognition module can be used to realize steps S13 and S14: according to the first image position of the target point of the first area in the video frame of the first video stream, determine the target object and the escalator The relative speed between the two; according to the relative speed, the event detection result of the target object is determined.
根据本公开实施例的事件检测方法,能够检测出视频流中对象所在的区域,实现该区域的点在视频帧的图像坐标系与电梯平面坐标系之间的变换,对电梯平面坐标系下的行人速度进行估计,从而判断是否存在行人逆行、行走、跑动等危险动作,并及时告警,能够提高事件检测的准确率,降低发生安全事故的风险。According to the event detection method of the embodiment of the present disclosure, the area where the object is located in the video stream can be detected, and the transformation of the point in the area between the image coordinate system of the video frame and the elevator plane coordinate system can be realized. The speed of pedestrians is estimated to determine whether there are dangerous actions such as pedestrians retrograde, walking, running, etc., and timely warning can improve the accuracy of event detection and reduce the risk of safety accidents.
根据本公开实施例的事件检测方法,仅使用单目摄像头,而不需要其他传感器(如红外传感器等),就能够实现事件检测;并且,采用行人相对于电梯的相对速度的处理方式,不需要额外严格标定,可以适配各种不同速度配置的扶梯电梯设备,有效提高了事件检测的效率。According to the event detection method of the embodiment of the present disclosure, event detection can be realized only by using a monocular camera without other sensors (such as infrared sensors, etc.); Additional strict calibration can be adapted to escalator elevator equipment with different speed configurations, which effectively improves the efficiency of event detection.
根据本公开实施例的事件检测方法,能够应用于安防监控领域,应用于自动扶梯行人危险行为检测告警相关产品,例如部署于大型商场超市、地铁站、写字楼等应用场景的电动扶梯自助监控系统中,实现在电梯上的行人逆行、行走、跑动等危险行为自动检测和告警,以便采取减速电梯或停梯措施,减少人力监控的成本。The event detection method according to the embodiment of the present disclosure can be applied to the field of security monitoring, and can be applied to escalator pedestrian dangerous behavior detection and alarm related products, for example, escalator self-service monitoring systems deployed in large shopping malls, supermarkets, subway stations, office buildings and other application scenarios , to realize automatic detection and alarm of dangerous behaviors such as pedestrians retrograde, walking, running, etc. on the elevator, so as to take measures to slow down the elevator or stop the elevator, and reduce the cost of human monitoring.
可以理解,本公开提及的上述各个方法实施例,在不违背原理逻辑的情况下,均可以彼此相互结合形成结合后的实施例,限于篇幅,本公开不再赘述。本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。It can be understood that the above-mentioned method embodiments mentioned in the present disclosure can be combined with each other to form a combined embodiment without violating the principle and logic. Those skilled in the art can understand that, in the above method of the specific embodiment, the specific execution order of each step should be determined by its function and possible internal logic.
此外,本公开还提供了事件检测装置、电子设备、计算机可读存储介质、程序,上述均可用来实现本公开提供的任一种事件检测方法,相应技术方案和描述和参见方法部分的相应记载,不再赘述。In addition, the present disclosure also provides an event detection device, an electronic device, a computer-readable storage medium, and a program, all of which can be used to implement any event detection method provided by the present disclosure. For the corresponding technical solutions and descriptions, refer to the corresponding records in the Methods section. ,No longer.
图3示出根据本公开实施例的事件检测装置的框图,如图3所示,所述装置包括:FIG. 3 shows a block diagram of an event detection apparatus according to an embodiment of the present disclosure. As shown in FIG. 3 , the apparatus includes:
第一视频流获取部分31,配置为获取电动扶梯的第一视频流;The first video stream acquiring part 31 is configured to acquire the first video stream of the escalator;
第一区域确定部分32,配置为对所述第一视频流进行人体检测,确定所 述第一视频流中目标对象所在的第一区域;The first area determination part 32 is configured to perform human body detection on the first video stream, and determine the first area where the target object is located in the first video stream;
相对速度确定部分33,配置为根据所述第一区域的目标点在所述第一视频流的视频帧中的第一图像位置,确定所述目标对象与所述电动扶梯之间的相对速度;a relative speed determination part 33, configured to determine the relative speed between the target object and the escalator according to the first image position of the target point of the first area in the video frame of the first video stream;
事件检测部分34,配置为根据所述相对速度,确定所述目标对象的事件检测结果。The event detection part 34 is configured to determine the event detection result of the target object according to the relative speed.
在一种可能的实现方式中,所述相对速度确定部分包括:位置确定子部分,配置为根据所述第一图像位置,以及所述视频帧的图像坐标系与所述电动扶梯所在的平面坐标系之间的坐标对应关系,确定所述目标点在所述平面坐标系中的第一平面位置;速度确定子部分,配置为根据所述第一视频流的多个视频帧中目标点的第一平面位置,确定所述目标对象的第一移动速度;相对速度确定子部分,配置为根据所述第一移动速度与所述电动扶梯的第二移动速度之间的比值,确定所述相对速度。In a possible implementation manner, the relative speed determination part includes: a position determination sub-part, configured according to the first image position, the image coordinate system of the video frame and the plane coordinates where the escalator is located The coordinate correspondence between the coordinate systems is used to determine the first plane position of the target point in the plane coordinate system; the speed determination sub-section is configured to be based on the first video frame of the first video stream. a plane position to determine a first moving speed of the target object; a relative speed determining subsection configured to determine the relative speed according to the ratio between the first moving speed and the second moving speed of the escalator .
在一种可能的实现方式中,所述速度确定子部分,配置为:根据多个第一平面位置在竖直方向上的坐标,通过最小二乘直线拟合方式确定所述目标对象在竖直方向上的第一移动速度。In a possible implementation manner, the velocity determination sub-section is configured to: determine the vertical direction of the target object by a least squares line fitting method according to the coordinates of a plurality of first plane positions in the vertical direction. The first movement speed in the direction.
在一种可能的实现方式中,所述装置还包括:标定图像获取部分,配置为获取所述电动扶梯的标定图像,所述标定图像的采集区域与所述第一视频流的采集区域相同;第二区域确定部分,配置为确定所述电动扶梯在所述标定图像中的第二区域;坐标关系确定部分,配置为根据所述第二区域的多个顶点在所述标定图像中的第二图像位置,以及所述多个顶点在所述平面坐标系中的第二平面位置,确定所述坐标对应关系。In a possible implementation manner, the device further includes: a calibration image acquisition part, configured to acquire a calibration image of the escalator, where the collection area of the calibration image is the same as the collection area of the first video stream; The second area determination part is configured to determine the second area of the escalator in the calibration image; the coordinate relationship determination part is configured to determine the second area in the calibration image according to the plurality of vertices of the second area The image position, and the second plane position of the plurality of vertices in the plane coordinate system determine the coordinate correspondence.
在一种可能的实现方式中,所述装置还包括:第二视频流获取部分,配置为获取所述电动扶梯的第二视频流,所述第二视频流的采集区域与所述第一视频流的采集区域相同,所述电动扶梯上放置有标定物;第三区域确定部分,配置为对所述第二视频流进行目标检测,确定所述第二视频流中标定物所在的第三区域;位置确定部分,配置为根据所述第三区域的标定点在所述第二视频流的视频帧中的第三图像位置,以及所述坐标对应关系,确定所述标定点在所述平面坐标系中的第三平面位置;速度确定部分,配置为根据所述第二视频流的多个视频帧中标定点的第三平面位置,确定所述电动扶梯在竖直方向上的所述第二移动速度。In a possible implementation manner, the apparatus further includes: a second video stream acquiring part, configured to acquire a second video stream of the escalator, the capture area of the second video stream being the same as the first video stream The collection area of the stream is the same, and a calibration object is placed on the escalator; the third area determination part is configured to perform target detection on the second video stream, and determine the third area where the calibration object is located in the second video stream The position determination part is configured to determine the calibration point in the plane coordinates according to the third image position of the calibration point of the third area in the video frame of the second video stream, and the coordinate correspondence a third plane position in the system; a speed determination part configured to determine the second movement of the escalator in the vertical direction according to the third plane position of the calibration point in the plurality of video frames of the second video stream speed.
在一种可能的实现方式中,所述事件检测部分还配置为以下至少之一:在所述相对速度小于第一速度阈值的情况下,确定所述事件检测结果为发生第一类别的异常事件;在所述相对速度大于或等于所述第一速度阈值,且小于或等于第二速度阈值的情况下,确定所述事件检测结果为未发生异常事件,所述第二速度阈值大于所述第一速度阈值;在所述相对速度大于所述第二速度阈值,且小于或等于第三速度阈值的情况下,确定所述事件检测结果为发生第二类别的异常事件,所述第三速度阈值大于所述第二速度阈值;在所述相对速度大于所述第三速度阈值的情况下,确定所述事件检测结果为发生第 三类别的异常事件。In a possible implementation manner, the event detection part is further configured to at least one of the following: when the relative speed is less than a first speed threshold, determine that the event detection result is the occurrence of an abnormal event of the first category ; In the case that the relative speed is greater than or equal to the first speed threshold and less than or equal to the second speed threshold, determine that the event detection result is that no abnormal event has occurred, and the second speed threshold is greater than the first speed threshold a speed threshold; when the relative speed is greater than the second speed threshold and less than or equal to the third speed threshold, it is determined that the event detection result is the occurrence of a second category of abnormal events, and the third speed threshold is greater than the second speed threshold; when the relative speed is greater than the third speed threshold, it is determined that the event detection result is the occurrence of an abnormal event of a third category.
在一种可能的实现方式中,所述装置还包括:告警部分,配置为在所述事件检测结果为发生以下至少之一的异常事件的情况下,发送与所述异常事件的类别对应的告警信息:所述第一类别的异常事件、第二类别的异常事件、所述第三类别的异常事件。In a possible implementation manner, the apparatus further includes: an alarm part configured to send an alarm corresponding to the category of the abnormal event when the event detection result is the occurrence of at least one of the following abnormal events Information: the first category of abnormal events, the second category of abnormal events, the third category of abnormal events.
在一种可能的实现方式中,所述第一类别的异常事件包括逆行事件,所述第二类别的异常事件包括行走事件,所述第三类别的异常事件包括跑动事件。In a possible implementation manner, the abnormal events of the first category include retrograde events, the abnormal events of the second category include walking events, and the abnormal events of the third category include running events.
在一些实施例中,本公开实施例提供的装置具有的功能或包含的部分可以配置为执行上文方法实施例描述的方法,其具体实现可以参照上文方法实施例的描述,为了简洁,这里不再赘述。In some embodiments, the functions or included parts of the apparatus provided in the embodiments of the present disclosure may be configured to execute the methods described in the above method embodiments, and the specific implementation may refer to the descriptions in the above method embodiments. No longer.
本公开实施例还提出一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。计算机可读存储介质可以是非易失性计算机可读存储介质。Embodiments of the present disclosure further provide a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the foregoing method is implemented. 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, comprising: a processor; a memory configured to store instructions executable by the processor; wherein the processor is configured to invoke the instructions stored in the memory to execute the above method.
本公开实施例还提供了一种计算机程序产品,包括计算机可读代码,当计算机可读代码在设备上运行时,设备中的处理器执行用于实现如上任一实施例提供的事件检测方法的指令。Embodiments of the present disclosure also provide a computer program product, including computer-readable codes. When the computer-readable codes are run on a device, a processor in the device executes a method for implementing the event detection method provided by any of the above embodiments. instruction.
本公开实施例还提供了另一种计算机程序产品,用于存储计算机可读指令,指令被执行时使得计算机执行上述任一实施例提供的事件检测方法的操作。Embodiments of the present disclosure further provide another computer program product for storing computer-readable instructions, which, when executed, cause a computer to perform operations of the event detection method provided by any of the foregoing embodiments.
电子设备可以被提供为终端、服务器或其它形态的设备。The electronic device may be provided as a terminal, server or other form of device.
图4示出根据本公开实施例的一种电子设备的框图。例如,电子设备800可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等终端。FIG. 4 shows a block diagram of an electronic device according to an embodiment of the present disclosure. For example, electronic device 800 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, fitness device, personal digital assistant, etc. terminal.
参照图4,电子设备800可以包括以下一个或多个组件:处理组件802,存储器804,电源组件806,多媒体组件808,音频组件810,输入/输出(I/O)的接口812,传感器组件814,以及通信组件816。4, the electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814 , and the communication component 816 .
处理组件802通常控制电子设备800的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件802可以包括一个或多个处理器820来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件802可以包括一个或多个模块,便于处理组件802和其他组件之间的交互。例如,处理组件802可以包括多媒体模块,以方便多媒体组件808和处理组件802之间的交互。The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 can include one or more processors 820 to execute instructions to perform all or some of the steps of the methods described above. Additionally, processing component 802 may include one or more modules that facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.
存储器804被配置为存储各种类型的数据以支持在电子设备800的操作。这些数据的示例包括用于在电子设备800上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器804可以由任 何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。 Memory 804 is configured to store various types of data to support operation at electronic device 800 . Examples of such data include instructions for any application or method operating on electronic device 800, contact data, phonebook data, messages, pictures, videos, and the like. Memory 804 may be implemented by any type of volatile or nonvolatile storage device or combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.
电源组件806为电子设备800的各种组件提供电力。电源组件806可以包括电源管理系统,一个或多个电源,及其他与为电子设备800生成、管理和分配电力相关联的组件。 Power supply assembly 806 provides power to various components of electronic device 800 . Power supply components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 800 .
多媒体组件808包括在所述电子设备800和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件808包括一个前置摄像头和/或后置摄像头。当电子设备800处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。 Multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, swipe, and gestures on the touch panel. The touch sensor may not only sense the boundaries of a touch or swipe action, but also detect the duration and pressure associated with the touch or swipe action. In some embodiments, the multimedia component 808 includes a front-facing camera and/or a rear-facing camera. When the electronic device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each of the front and rear cameras can be a fixed optical lens system or have focal length and optical zoom capability.
音频组件810被配置为输出和/或输入音频信号。例如,音频组件810包括一个麦克风(MIC),当电子设备800处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器804或经由通信组件816发送。在一些实施例中,音频组件810还包括一个扬声器,用于输出音频信号。 Audio component 810 is configured to output and/or input audio signals. For example, audio component 810 includes a microphone (MIC) that is configured to receive external audio signals when electronic device 800 is in operating modes, such as calling mode, recording mode, and voice recognition mode. The received audio signal may be further stored in memory 804 or transmitted via communication component 816 . In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
I/O接口812为处理组件802和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。The I/O interface 812 provides an interface between the processing component 802 and a peripheral interface module, which may be a keyboard, a click wheel, a button, or the like. These buttons may include, but are not limited to: home button, volume buttons, start button, and lock button.
传感器组件814包括一个或多个传感器,用于为电子设备800提供各个方面的状态评估。例如,传感器组件814可以检测到电子设备800的打开/关闭状态,组件的相对定位,例如所述组件为电子设备800的显示器和小键盘,传感器组件814还可以检测电子设备800或电子设备800一个组件的位置改变,用户与电子设备800接触的存在或不存在,电子设备800方位或加速/减速和电子设备800的温度变化。传感器组件814可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件814还可以包括光传感器,如互补金属氧化物半导体(CMOS)或电荷耦合装置(CCD)图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件814还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。 Sensor assembly 814 includes one or more sensors for providing status assessment of various aspects of electronic device 800 . For example, the sensor assembly 814 can detect the on/off state of the electronic device 800, the relative positioning of the components, such as the display and the keypad of the electronic device 800, the sensor assembly 814 can also detect the electronic device 800 or one of the electronic device 800 Changes in the position of components, presence or absence of user contact with the electronic device 800 , orientation or acceleration/deceleration of the electronic device 800 and changes in the temperature of the electronic device 800 . Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. 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.
通信组件816被配置为便于电子设备800和其他设备之间有线或无线方式的通信。电子设备800可以接入基于通信标准的无线网络,如无线网络(WiFi),第二代移动通信技术(2G)或第三代移动通信技术(3G),或它们 的组合。在一个示例性实施例中,通信组件816经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件816还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。 Communication component 816 is configured to facilitate wired or wireless communication between electronic device 800 and other devices. The electronic device 800 may access a wireless network based on a communication standard, such as wireless network (WiFi), second generation mobile communication technology (2G) or third generation mobile communication technology (3G), or a combination thereof. In one exemplary embodiment, the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module 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.
在示例性实施例中,电子设备800可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In an exemplary embodiment, 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 A programmed gate array (FPGA), controller, microcontroller, microprocessor or other electronic component implementation is used to perform the above method.
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器804,上述计算机程序指令可由电子设备800的处理器820执行以完成上述方法。In an exemplary embodiment, a non-volatile computer-readable storage medium, such as a memory 804 comprising computer program instructions executable by the processor 820 of the electronic device 800 to perform the above method is also provided.
图5示出根据本公开实施例的另一种电子设备的框图。例如,电子设备1900可以被提供为一服务器。参照图5,电子设备1900包括处理组件1922,其进一步包括一个或多个处理器,以及由存储器1932所代表的存储器资源,用于存储可由处理组件1922的执行的指令,例如应用程序。存储器1932中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件1922被配置为执行指令,以执行上述方法。FIG. 5 shows a block diagram of another electronic device according to an embodiment of the present disclosure. For example, the electronic device 1900 may be provided as a server. 5, electronic device 1900 includes processing component 1922, which further includes one or more processors, and a memory resource represented by memory 1932 for storing instructions executable by processing component 1922, such as applications. An application program stored in memory 1932 may include one or more modules, each corresponding to a set of instructions. Additionally, the processing component 1922 is configured to execute instructions to perform the above-described methods.
电子设备1900还可以包括一个电源组件1926被配置为执行电子设备1900的电源管理,一个有线或无线网络接口1950被配置为将电子设备1900连接到网络,和一个输入输出(I/O)接口1958。电子设备1900可以操作基于存储在存储器1932的操作系统,例如微软服务器操作系统(Windows Server TM),苹果公司推出的基于图形用户界面操作系统(Mac OS X TM),多用户多进程的计算机操作系统(Unix TM),自由和开放原代码的类Unix操作系统(Linux TM),开放原代码的类Unix操作系统(FreeBSD TM)或类似。 The electronic device 1900 may also include a power supply assembly 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 can operate based on an operating system stored in the memory 1932, such as a Microsoft server operating system (Windows Server ), a graphical user interface based operating system (Mac OS X ) introduced by Apple, a multi-user multi-process computer operating system (Unix ), Free and Open Source Unix-like Operating System (Linux ), Open Source Unix-like Operating System (FreeBSD ) or the like.
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器1932,上述计算机程序指令可由电子设备1900的处理组件1922执行以完成上述方法。In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as memory 1932 comprising computer program instructions executable by processing component 1922 of electronic device 1900 to perform the above-described method.
本公开可以是系统、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本公开的各个方面的计算机可读程序指令。The present disclosure may be a system, method and/or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of the present disclosure.
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是(但不限于)电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述 的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。A computer-readable storage medium may be a tangible device that can hold and store instructions for use by the instruction execution device. The computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (non-exhaustive list) of computer readable storage media include: portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM) or flash memory), static random access memory (SRAM), portable compact disk read only memory (CD-ROM), digital versatile disk (DVD), memory sticks, floppy disks, mechanically coded devices, such as printers with instructions stored thereon Hole cards or raised structures in grooves, and any suitable combination of the above. Computer-readable storage media, as used herein, are not to be construed as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (eg, light pulses through fiber optic cables), or through electrical wires transmitted electrical signals.
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。The computer readable program instructions described herein may be downloaded to various computing/processing devices from a computer readable storage medium, or to an external computer or external storage device over 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. A network adapter card or network interface in each computing/processing device receives computer-readable program instructions from a network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的各个方面。Computer program instructions for carrying out operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or instructions in one or more programming languages. Source or object code, written in any combination, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as the "C" 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 implement. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider through the Internet connect). In some embodiments, custom electronic circuits, such as programmable logic circuits, field programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), can be personalized by utilizing state information of computer readable program instructions. Computer readable program instructions are executed to implement various aspects of the present disclosure.
这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。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 that causes the instructions when executed by the processor of the computer or other programmable data processing apparatus , resulting in means for implementing the functions/acts specified in one or more blocks of the flowchart and/or block diagrams. These computer readable program instructions can also be stored in a computer readable storage medium, these instructions cause a computer, programmable data processing apparatus and/or other equipment to operate in a specific manner, so that the computer readable medium on which the instructions are stored includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks of the flowchart and/or block diagrams.
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编 程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。Computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other equipment to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other equipment to produce a computer-implemented process , thereby causing instructions executing on a computer, other programmable data processing apparatus, or other device to implement the functions/acts specified in one or more blocks of the flowcharts and/or block diagrams.
附图中的流程图和框图显示了根据本公开的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。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 functions for implementing the specified logical function(s) executable instructions. In some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks 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 is also noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented in dedicated hardware-based systems that perform the specified functions or actions , or can be implemented in a combination of dedicated hardware and computer instructions.
该计算机程序产品可以具体通过硬件、软件或其结合的方式实现。在一个可选实施例中,所述计算机程序产品具体体现为计算机存储介质,在另一个可选实施例中,计算机程序产品具体体现为软件产品,例如软件开发包(Software Development Kit,SDK)等等。The computer program product can be specifically implemented by hardware, software or a combination thereof. In an optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK), etc. Wait.
以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。Various embodiments of the present disclosure have been described above, and the foregoing descriptions are exemplary, not exhaustive, and not limiting of the disclosed embodiments. Numerous 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 was chosen to best explain the principles of the various embodiments, the practical application or improvement over the technology in the marketplace, or to enable others of ordinary skill in the art to understand the various embodiments disclosed herein.
工业实用性Industrial Applicability
本公开实施例公开了一种事件检测方法、装置、电子设备、存储介质及程序产品,其中,事件检测方法,包括:获取电动扶梯的第一视频流;对所述第一视频流进行人体检测,确定所述第一视频流中目标对象所在的第一区域;根据所述第一区域的目标点在所述第一视频流的视频帧中的第一图像位置,确定所述目标对象与所述电动扶梯之间的相对速度;根据所述相对速度,确定所述目标对象的事件检测结果。通过该方法,能够提高事件检测的准确率,从而降低发生意外事故的概率,减少人力检测的成本。Embodiments of the present disclosure disclose an event detection method, device, electronic device, storage medium and program product, wherein the event detection method includes: acquiring a first video stream of an escalator; performing human body detection on the first video stream , determine the first area where the target object is located in the first video stream; according to the first image position of the target point of the first area in the video frame of the first video stream, determine the relationship between the target object and the target object. relative speed between the escalators; according to the relative speed, determine the event detection result of the target object. Through this method, the accuracy of event detection can be improved, thereby reducing the probability of an accident and reducing the cost of human detection.

Claims (19)

  1. 一种事件检测方法,包括:An event detection method comprising:
    获取电动扶梯的第一视频流;Get the first video stream of the escalator;
    对所述第一视频流进行人体检测,确定所述第一视频流中目标对象所在的第一区域;Perform human body detection on the first video stream, and determine the first area where the target object is located in the first video stream;
    根据所述第一区域的目标点在所述第一视频流的视频帧中的第一图像位置,确定所述目标对象与所述电动扶梯之间的相对速度;determining the relative speed between the target object and the escalator according to the first image position of the target point of the first area in the video frame of the first video stream;
    根据所述相对速度,确定所述目标对象的事件检测结果。According to the relative speed, an event detection result of the target object is determined.
  2. 根据权利要求1所述的方法,其中,所述根据所述第一区域的目标点在所述第一视频流的视频帧中的第一图像位置,确定所述目标对象与所述电动扶梯之间的相对速度,包括:The method according to claim 1, wherein the determination of the relationship between the target object and the escalator is performed according to the first image position of the target point of the first area in the video frame of the first video stream. relative velocities between , including:
    根据所述第一图像位置,以及所述视频帧的图像坐标系与所述电动扶梯所在的平面坐标系之间的坐标对应关系,确定所述目标点在所述平面坐标系中的第一平面位置;Determine the first plane of the target point in the plane coordinate system according to the first image position and the coordinate correspondence between the image coordinate system of the video frame and the plane coordinate system where the escalator is located Location;
    根据所述第一视频流的多个视频帧中目标点的第一平面位置,确定所述目标对象的第一移动速度;determining the first moving speed of the target object according to the first plane position of the target point in the multiple video frames of the first video stream;
    根据所述第一移动速度与所述电动扶梯的第二移动速度之间的比值,确定所述相对速度。The relative speed is determined according to the ratio between the first moving speed and the second moving speed of the escalator.
  3. 根据权利要求2所述的方法,其中,所述根据所述第一视频流的多个视频帧中目标点的第一平面位置,确定所述目标对象的第一移动速度,包括:The method according to claim 2, wherein the determining the first moving speed of the target object according to the first plane position of the target point in multiple video frames of the first video stream comprises:
    根据多个第一平面位置在竖直方向上的坐标,通过最小二乘直线拟合方式确定所述目标对象在竖直方向上的第一移动速度。According to the coordinates of a plurality of first plane positions in the vertical direction, the first moving speed of the target object in the vertical direction is determined by means of least squares straight line fitting.
  4. 根据权利要求2或3所述的方法,其中,所述方法还包括:The method according to claim 2 or 3, wherein the method further comprises:
    获取所述电动扶梯的标定图像,所述标定图像的采集区域与所述第一视频流的采集区域相同;acquiring a calibration image of the escalator, where the collection area of the calibration image is the same as the collection area of the first video stream;
    确定所述电动扶梯在所述标定图像中的第二区域;determining a second area of the escalator in the calibration image;
    根据所述第二区域的多个顶点在所述标定图像中的第二图像位置,以及所述多个顶点在所述平面坐标系中的第二平面位置,确定所述坐标对应关系。The coordinate correspondence is determined according to the second image positions of the plurality of vertices in the calibration image and the second plane positions of the plurality of vertices in the plane coordinate system.
  5. 根据权利要求2-4中任意一项所述的方法,其中,所述方法还包括:The method according to any one of claims 2-4, wherein the method further comprises:
    获取所述电动扶梯的第二视频流,所述第二视频流的采集区域与所述第一视频流的采集区域相同,所述电动扶梯上放置有标定物;acquiring a second video stream of the escalator, where the collection area of the second video stream is the same as the collection area of the first video stream, and a calibration object is placed on the escalator;
    对所述第二视频流进行目标检测,确定所述第二视频流中所述标定物所在的第三区域;performing target detection on the second video stream to determine the third area where the calibration object is located in the second video stream;
    根据所述第三区域的标定点在所述第二视频流的视频帧中的第三图像位置,以及所述坐标对应关系,确定所述标定点在所述平面坐标系中的第三平面位置;According to the third image position of the calibration point of the third area in the video frame of the second video stream, and the coordinate correspondence, determine the third plane position of the calibration point in the plane coordinate system ;
    根据所述第二视频流的多个视频帧中标定点的第三平面位置,确定所述 电动扶梯在竖直方向上的所述第二移动速度。The second moving speed of the escalator in the vertical direction is determined according to the third plane position of the calibration point in the plurality of video frames of the second video stream.
  6. 根据权利要求1-5中任意一项所述的方法,其中,所述根据所述相对速度,确定所述目标对象的事件检测结果,包括以下至少之一:The method according to any one of claims 1-5, wherein the determining the event detection result of the target object according to the relative speed includes at least one of the following:
    在所述相对速度小于第一速度阈值的情况下,确定所述事件检测结果为发生第一类别的异常事件;In the case that the relative speed is less than the first speed threshold, determining that the event detection result is the occurrence of an abnormal event of the first category;
    在所述相对速度大于或等于所述第一速度阈值,且小于或等于第二速度阈值的情况下,确定所述事件检测结果为未发生异常事件,所述第二速度阈值大于所述第一速度阈值;When the relative speed is greater than or equal to the first speed threshold and less than or equal to a second speed threshold, it is determined that the event detection result is that no abnormal event has occurred, and the second speed threshold is greater than the first speed threshold speed threshold;
    在所述相对速度大于所述第二速度阈值,且小于或等于第三速度阈值的情况下,确定所述事件检测结果为发生第二类别的异常事件,所述第三速度阈值大于所述第二速度阈值;In the case where the relative speed is greater than the second speed threshold and less than or equal to a third speed threshold, determine that the event detection result is the occurrence of a second category of abnormal events, the third speed threshold being greater than the third speed threshold Two speed thresholds;
    在所述相对速度大于所述第三速度阈值的情况下,确定所述事件检测结果为发生第三类别的异常事件。In the case that the relative speed is greater than the third speed threshold, it is determined that the event detection result is the occurrence of an abnormal event of a third category.
  7. 根据权利要求6所述的方法,其中,所述方法还包括:The method of claim 6, wherein the method further comprises:
    在所述事件检测结果为发生以下至少之一的异常事件的情况下,发送与所述异常事件的类别对应的告警信息:所述第一类别的异常事件、第二类别的异常事件、所述第三类别的异常事件。When the event detection result is that an abnormal event of at least one of the following occurs, alarm information corresponding to the category of the abnormal event is sent: the abnormal event of the first category, the abnormal event of the second category, the A third category of abnormal events.
  8. 根据权利要求6或7所述的方法,其中,所述第一类别的异常事件包括逆行事件,所述第二类别的异常事件包括行走事件,所述第三类别的异常事件包括跑动事件。7. The method of claim 6 or 7, wherein 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.
  9. 一种事件检测装置,包括:An event detection device, comprising:
    第一视频流获取部分,配置为获取电动扶梯的第一视频流;a first video stream acquiring part, configured to acquire the first video stream of the escalator;
    第一区域确定部分,配置为对所述第一视频流进行人体检测,确定所述第一视频流中目标对象所在的第一区域;a first area determination part, configured to perform human body detection on the first video stream, and determine the first area where the target object is located in the first video stream;
    相对速度确定部分,配置为根据所述第一区域的目标点在所述第一视频流的视频帧中的第一图像位置,确定所述目标对象与所述电动扶梯之间的相对速度;a relative speed determination part, configured to determine the relative speed between the target object and the escalator according to the first image position of the target point of the first area in the video frame of the first video stream;
    事件检测部分,配置为根据所述相对速度,确定所述目标对象的事件检测结果。The event detection part is configured to determine the event detection result of the target object according to the relative speed.
  10. 根据权利要求9所述的装置,其中,所述相对速度确定部分包括:10. The apparatus of claim 9, wherein the relative velocity determination section comprises:
    位置确定子部分,配置为根据所述第一图像位置,以及所述视频帧的图像坐标系与所述电动扶梯所在的平面坐标系之间的坐标对应关系,确定所述目标点在所述平面坐标系中的第一平面位置;a position determination sub-section, configured to determine the target point on the plane according to the first image position and the coordinate correspondence between the image coordinate system of the video frame and the plane coordinate system where the escalator is located the position of the first plane in the coordinate system;
    速度确定子部分,配置为根据所述第一视频流的多个视频帧中目标点的第一平面位置,确定所述目标对象的第一移动速度;a speed determination subsection, configured to determine the first moving speed of the target object according to the first plane position of the target point in the multiple video frames of the first video stream;
    相对速度确定子部分,配置为根据所述第一移动速度与所述电动扶梯的第二移动速度之间的比值,确定所述相对速度。A relative speed determination subsection is configured to determine the relative speed according to a ratio between the first moving speed and the second moving speed of the escalator.
  11. 根据权利要求10所述的装置,其中,所述速度确定子部分配置为:根据多个第一平面位置在竖直方向上的坐标,通过最小二乘直线拟合方式确 定所述目标对象在竖直方向上的第一移动速度。The device according to claim 10, wherein the speed determination sub-section is configured to: determine the vertical position of the target object by means of least squares straight line fitting according to the coordinates of the plurality of first plane positions in the vertical direction. The first movement speed in the straight direction.
  12. 根据权利要求10或11所述的装置,其中,所述装置还包括:The apparatus of claim 10 or 11, wherein the apparatus further comprises:
    标定图像获取部分,配置为获取所述电动扶梯的标定图像,所述标定图像的采集区域与所述第一视频流的采集区域相同;a calibration image acquisition part, configured to acquire a calibration image of the escalator, and the collection area of the calibration image is the same as the collection area of the first video stream;
    第二区域确定部分,配置为确定所述电动扶梯在所述标定图像中的第二区域;A second area determination part configured to determine a second area of the escalator in the calibration image;
    坐标关系确定部分,配置为根据所述第二区域的多个顶点在所述标定图像中的第二图像位置,以及所述多个顶点在所述平面坐标系中的第二平面位置,确定所述坐标对应关系。The coordinate relationship determining part is configured to determine the second image position of the plurality of vertices in the calibration image according to the second image position of the plurality of vertices in the second region and the second plane position of the plurality of vertices in the plane coordinate system The coordinate relationship described above.
  13. 根据权利要求10-12任意一项所述的装置,其中,所述装置还包括:The apparatus according to any one of claims 10-12, wherein the apparatus further comprises:
    第二视频流获取部分,配置为获取所述电动扶梯的第二视频流,所述第二视频流的采集区域与所述第一视频流的采集区域相同,所述电动扶梯上放置有标定物;The second video stream acquisition part is configured to acquire a second video stream of the escalator, the collection area of the second video stream is the same as the collection area of the first video stream, and a calibration object is placed on the escalator ;
    第三区域确定部分,配置为对所述第二视频流进行目标检测,确定所述第二视频流中标定物所在的第三区域;A third area determining part, configured to perform object detection on the second video stream, and determine a third area where the calibration object is located in the second video stream;
    位置确定部分,配置为根据所述第三区域的标定点在所述第二视频流的视频帧中的第三图像位置,以及所述坐标对应关系,确定所述标定点在所述平面坐标系中的第三平面位置;a position determination part, configured to determine that the calibration point is in the plane coordinate system according to the third image position of the calibration point of the third region in the video frame of the second video stream and the coordinate correspondence the third plane position in ;
    速度确定部分,配置为根据所述第二视频流的多个视频帧中标定点的第三平面位置,确定所述电动扶梯在竖直方向上的所述第二移动速度。The speed determination part is configured to determine the second moving speed of the electric escalator in the vertical direction according to the third plane position of the calibration point in the plurality of video frames of the second video stream.
  14. 根据权利要求9-13任意一项所述的装置,其中,所述事件检测部分还配置为以下至少之一:The device according to any one of claims 9-13, wherein the event detection part is further configured as at least one of the following:
    在所述相对速度小于第一速度阈值的情况下,确定所述事件检测结果为发生第一类别的异常事件;In the case that the relative speed is less than the first speed threshold, determining that the event detection result is the occurrence of an abnormal event of the first category;
    在所述相对速度大于或等于所述第一速度阈值,且小于或等于第二速度阈值的情况下,确定所述事件检测结果为未发生异常事件,所述第二速度阈值大于所述第一速度阈值;When the relative speed is greater than or equal to the first speed threshold and less than or equal to a second speed threshold, it is determined that the event detection result is that no abnormal event has occurred, and the second speed threshold is greater than the first speed threshold speed threshold;
    在所述相对速度大于所述第二速度阈值,且小于或等于第三速度阈值的情况下,确定所述事件检测结果为发生第二类别的异常事件,所述第三速度阈值大于所述第二速度阈值;In the case where the relative speed is greater than the second speed threshold and less than or equal to a third speed threshold, determine that the event detection result is the occurrence of a second category of abnormal events, the third speed threshold being greater than the third speed threshold Two speed thresholds;
    在所述相对速度大于所述第三速度阈值的情况下,确定所述事件检测结果为发生第三类别的异常事件。In the case that the relative speed is greater than the third speed threshold, it is determined that the event detection result is the occurrence of an abnormal event of a third category.
  15. 根据权利要求14所述的装置,其中,所述装置还包括:The apparatus of claim 14, wherein the apparatus further comprises:
    告警部分,配置为在所述事件检测结果为发生以下至少之一的异常事件的情况下,发送与所述异常事件的类别对应的告警信息:所述第一类别的异常事件、第二类别的异常事件、所述第三类别的异常事件。The alarm part is configured to send alarm information corresponding to the category of the abnormal event when the event detection result is an abnormal event of at least one of the following: the abnormal event of the first category, the abnormal event of the second category Anomalies, anomalies of the third category.
  16. 根据权利要求14或15所述的装置,其中,所述第一类别的异常事件包括逆行事件,所述第二类别的异常事件包括行走事件,所述第三类别的异常事件包括跑动事件。15. The apparatus of claim 14 or 15, wherein 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.
  17. 一种电子设备,包括:An electronic device comprising:
    处理器;processor;
    配置为存储处理器可执行指令的存储器;memory configured to store processor executable instructions;
    其中,所述处理器被配置为调用所述存储器存储的指令,以执行权利要求1至8中任意一项所述的方法。wherein the processor is configured to invoke the memory-stored instructions to perform the method of any one of claims 1-8.
  18. 一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现权利要求1至8中任意一项所述的方法。A computer-readable storage medium having computer program instructions stored thereon, the computer program instructions implementing the method of any one of claims 1 to 8 when executed by a processor.
  19. 一种计算机程序产品,包括计算机可读代码,当计算机可读代码在设备上运行时,设备中的处理器执行用于实现权利要求1至8中任意一项所述的事件检测方法的指令。A computer program product comprising computer readable code, when the computer readable code is run on a device, a processor in the device executes instructions for implementing the event detection method of any one of claims 1 to 8.
PCT/CN2021/107285 2021-03-03 2021-07-20 Event detection method and apparatus, and electronic device, storage medium and program product WO2022183663A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110236987.7A CN113011291A (en) 2021-03-03 2021-03-03 Event detection method and device, electronic equipment and storage medium
CN202110236987.7 2021-03-03

Publications (1)

Publication Number Publication Date
WO2022183663A1 true WO2022183663A1 (en) 2022-09-09

Family

ID=76404355

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/107285 WO2022183663A1 (en) 2021-03-03 2021-07-20 Event detection method and apparatus, and electronic device, storage medium and program product

Country Status (2)

Country Link
CN (1) CN113011291A (en)
WO (1) WO2022183663A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113011291A (en) * 2021-03-03 2021-06-22 上海商汤智能科技有限公司 Event detection method and device, electronic equipment and storage medium
CN114882393B (en) * 2022-03-29 2023-04-07 华南理工大学 Road reverse running and traffic accident event detection method based on target detection

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009067533A (en) * 2007-09-13 2009-04-02 Mitsubishi Electric Corp Safety device for escalator
CN107786837A (en) * 2016-08-24 2018-03-09 杭州海康威视数字技术股份有限公司 Staircase precarious position detection method and device
CN110188644A (en) * 2019-05-22 2019-08-30 广东寰球智能科技有限公司 A kind of staircase passenger's hazardous act monitoring system and method for view-based access control model analysis
CN111924695A (en) * 2020-07-09 2020-11-13 上海市隧道工程轨道交通设计研究院 Intelligent safety protection system for subway escalator and working method of intelligent safety protection system
CN113011291A (en) * 2021-03-03 2021-06-22 上海商汤智能科技有限公司 Event detection method and device, electronic equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101607668B (en) * 2008-06-17 2012-06-27 上海阿艾依智控系统有限公司 Embedded computer vision escalator pedestrian flow supervision and alarm device
JP4753320B2 (en) * 2008-09-09 2011-08-24 東芝エレベータ株式会社 Escalator monitoring system
CN105654060A (en) * 2016-01-04 2016-06-08 中海网络科技股份有限公司 Method for acquiring vehicle speed from road monitoring video
CN111797759B (en) * 2020-07-03 2023-11-07 重庆市特种设备检测研究院 Active intervention monitoring method for dangerous elevator riding behavior of escalator

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009067533A (en) * 2007-09-13 2009-04-02 Mitsubishi Electric Corp Safety device for escalator
CN107786837A (en) * 2016-08-24 2018-03-09 杭州海康威视数字技术股份有限公司 Staircase precarious position detection method and device
CN110188644A (en) * 2019-05-22 2019-08-30 广东寰球智能科技有限公司 A kind of staircase passenger's hazardous act monitoring system and method for view-based access control model analysis
CN111924695A (en) * 2020-07-09 2020-11-13 上海市隧道工程轨道交通设计研究院 Intelligent safety protection system for subway escalator and working method of intelligent safety protection system
CN113011291A (en) * 2021-03-03 2021-06-22 上海商汤智能科技有限公司 Event detection method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113011291A (en) 2021-06-22

Similar Documents

Publication Publication Date Title
WO2022183661A1 (en) Event detection method and apparatus, electronic device, storage medium, and program product
US20200317190A1 (en) Collision Control Method, Electronic Device and Storage Medium
EP3163498B1 (en) Alarming method and device
WO2019206270A1 (en) Distance measurement method, intelligent control method and apparatus, electronic device and storage medium
US20210133468A1 (en) Action Recognition Method, Electronic Device, and Storage Medium
US11321575B2 (en) Method, apparatus and system for liveness detection, electronic device, and storage medium
US8963831B2 (en) Method and device for controlling an apparatus as a function of detecting persons in the vicinity of the apparatus
US20170300503A1 (en) Method and apparatus for managing video data, terminal, and server
US20190035104A1 (en) Object detection and tracking
WO2022183663A1 (en) Event detection method and apparatus, and electronic device, storage medium and program product
TWI757756B (en) Pedestrian event detection method and detection device, electronic device and computer-readable storage medium
WO2022160569A1 (en) Method and apparatus for detecting security check anomaly event, electronic device, and storage medium
WO2022134388A1 (en) Method and device for rider fare evasion detection, electronic device, storage medium, and computer program product
WO2022160616A1 (en) Passage detection method and apparatus, electronic device, and computer readable storage medium
WO2023071174A1 (en) Occupancy detection method and apparatus, electronic device, and storage medium
WO2022134504A9 (en) Image detection method and apparatus, electronic device, and storage medium
CN112070052A (en) Interval monitoring method, device and system and storage medium
WO2023173616A1 (en) Crowd counting method and apparatus, electronic device and storage medium
Liu et al. Infrasee: An unobtrusive alertness system for pedestrian mobile phone users
CN111435422B (en) Action recognition method, control method and device, electronic equipment and storage medium
CN112464898A (en) Event detection method and device, electronic equipment and storage medium
CN113060144A (en) Distraction reminding method and device, electronic equipment and storage medium
CN110543928B (en) Method and device for detecting number of people on trackless rubber-tyred vehicle
CN110910281A (en) Hotel room-returning handling method and device based on robot
WO2022257306A1 (en) Identity identification method and apparatus, electronic device, and storage medium

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2022530913

Country of ref document: JP

Kind code of ref document: A

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

Ref document number: 21928741

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21928741

Country of ref document: EP

Kind code of ref document: A1