CN115171220A - Abnormal traffic early warning method and device and electronic equipment - Google Patents

Abnormal traffic early warning method and device and electronic equipment Download PDF

Info

Publication number
CN115171220A
CN115171220A CN202210951140.1A CN202210951140A CN115171220A CN 115171220 A CN115171220 A CN 115171220A CN 202210951140 A CN202210951140 A CN 202210951140A CN 115171220 A CN115171220 A CN 115171220A
Authority
CN
China
Prior art keywords
passenger
passed
abnormal
target
detection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210951140.1A
Other languages
Chinese (zh)
Inventor
李丹
闾凡兵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Changsha Hisense Intelligent System Research Institute Co ltd
Original Assignee
Changsha Hisense Intelligent System Research Institute Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Changsha Hisense Intelligent System Research Institute Co ltd filed Critical Changsha Hisense Intelligent System Research Institute Co ltd
Priority to CN202210951140.1A priority Critical patent/CN115171220A/en
Publication of CN115171220A publication Critical patent/CN115171220A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/20Movements or behaviour, e.g. gesture recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/62Extraction of image or video features relating to a temporal dimension, e.g. time-based feature extraction; Pattern tracking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/52Surveillance or monitoring of activities, e.g. for recognising suspicious objects
    • G06V20/53Recognition of crowd images, e.g. recognition of crowd congestion
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/20Individual registration on entry or exit involving the use of a pass
    • GPHYSICS
    • G08SIGNALLING
    • G08BSIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
    • G08B13/00Burglar, theft or intruder alarms
    • G08B13/18Actuation by interference with heat, light, or radiation of shorter wavelength; Actuation by intruding sources of heat, light, or radiation of shorter wavelength
    • G08B13/189Actuation by interference with heat, light, or radiation of shorter wavelength; Actuation by intruding sources of heat, light, or radiation of shorter wavelength using passive radiation detection systems
    • G08B13/194Actuation by interference with heat, light, or radiation of shorter wavelength; Actuation by intruding sources of heat, light, or radiation of shorter wavelength using passive radiation detection systems using image scanning and comparing systems
    • G08B13/196Actuation by interference with heat, light, or radiation of shorter wavelength; Actuation by intruding sources of heat, light, or radiation of shorter wavelength using passive radiation detection systems using image scanning and comparing systems using television cameras
    • G08B13/19602Image analysis to detect motion of the intruder, e.g. by frame subtraction
    • G08B13/19608Tracking movement of a target, e.g. by detecting an object predefined as a target, using target direction and or velocity to predict its new position
    • GPHYSICS
    • G08SIGNALLING
    • G08BSIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
    • G08B13/00Burglar, theft or intruder alarms
    • G08B13/18Actuation by interference with heat, light, or radiation of shorter wavelength; Actuation by intruding sources of heat, light, or radiation of shorter wavelength
    • G08B13/189Actuation by interference with heat, light, or radiation of shorter wavelength; Actuation by intruding sources of heat, light, or radiation of shorter wavelength using passive radiation detection systems
    • G08B13/194Actuation by interference with heat, light, or radiation of shorter wavelength; Actuation by intruding sources of heat, light, or radiation of shorter wavelength using passive radiation detection systems using image scanning and comparing systems
    • G08B13/196Actuation by interference with heat, light, or radiation of shorter wavelength; Actuation by intruding sources of heat, light, or radiation of shorter wavelength using passive radiation detection systems using image scanning and comparing systems using television cameras
    • G08B13/19602Image analysis to detect motion of the intruder, e.g. by frame subtraction
    • G08B13/19613Recognition of a predetermined image pattern or behaviour pattern indicating theft or intrusion

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Psychiatry (AREA)
  • Social Psychology (AREA)
  • Human Computer Interaction (AREA)
  • Image Analysis (AREA)

Abstract

The invention provides an abnormal traffic early warning method and device and electronic equipment. The method comprises the following steps: a gate area is defined through the target area frame, and when the specified position of the detection frame of the target object falls into the gate area, the target object is determined to be a passenger to pass through; cutting out small pictures of the detection frames of all the passengers to be passed, and removing partial hand images of the passengers to be passed to obtain small picture images of the passengers to be passed; inputting the small image of the passenger to be passed into a preset abnormal passage detection model, and judging whether the passenger to be passed has abnormal passage; when the passenger to be passed abnormally passes, the passenger to be passed abnormally passes through the gate, IOU tracking is carried out on the passenger to be passed abnormally, abnormal alarming is carried out when the behavior of the passenger to be passed abnormally reaches the preset early warning condition, the passenger passing through the gate abnormally can be accurately detected, warning is given out, and various different behaviors of passing through the gate abnormally, such as single-leg crossing, double-leg jumping and crouching, are supported.

Description

Abnormal traffic early warning method and device and electronic equipment
Technical Field
The invention relates to the technical field of image recognition, in particular to an abnormal traffic early warning method and device and electronic equipment.
Background
With the rapid economic growth and the rapid advance of urbanization in China, the urban traffic jam problem is increasingly serious, rail transit is the fastest traffic mode in cities at present, the urban rail transit industry in China is rapidly developed, the lengths of operation lines, passenger capacity and construction lines are frequently created, and the urban rail transit industry has a wide prospect. In recent years, the pace of technological progress and technological innovation has been increasing, and smart city rails using intelligent, highly reliable, and lightweight technologies have been steadily advancing.
The subway automatic ticket checking machine realizes the self-service and intelligentization of ticket checking for passengers to get in and out of the station, reduces the manpower consumption of personnel due to manual ticket checking, and improves the efficiency of getting in and out of the station. However, ticket evasion behaviors such as illegal ticket passing machines such as single-leg crossing, double-leg jumping, squatting and drilling also occur occasionally, the defects of manpower consumption and missed check exist only by checking the illegal ticket evasion behaviors of the ticket passing machines by virtue of ticket auditors, and how to ensure ticket income and maintain subway civilization by utilizing an advanced intelligent technology becomes a current urgent need.
Disclosure of Invention
The invention aims to provide an abnormal traffic early warning method, an abnormal traffic early warning device and electronic equipment, which can accurately detect passengers who abnormally pass through a gate and send out a warning, and support various different behaviors of single-leg crossing, double-leg jumping and crouching to abnormally pass through the gate.
In order to achieve the purpose, the invention provides an abnormal traffic early warning method, which comprises the following steps:
s1, acquiring an image to be detected, and inputting the image to be detected into a preset target recognition model to obtain a detection frame of each target object;
s2, setting a target area frame, defining a gate area through the target area frame, and determining a target object as a passenger to pass through when the specified position of the detection frame of the target object falls into the gate area;
s3, cutting small pictures of the detection frames of all passengers to be passed, removing partial hand images of the passengers to be passed and obtaining small picture images of the passengers to be passed;
s4, inputting the small picture image of the passenger to be passed into a preset abnormal passage detection model, and judging whether the passenger to be passed has abnormal passage;
and S5, when the passenger to be passed abnormally passes, carrying out IOU tracking on the passenger passing abnormally, and carrying out abnormal alarm when the behavior of the passenger passing abnormally reaches a preset early warning condition.
Optionally, in the step S2, the rectangular frames of all gates are selected as target area frames by using the frames, so as to define a gate area; and when the lower left corner or the lower right corner of the detection frame of the target object falls into the gate area, determining that the target object is a passenger to be passed.
Optionally, the step S3 specifically includes:
respectively expanding the length and the width of the detection frames of all passengers to be passed by a first proportion;
and cutting the detection frames of all the passengers to be passed after the outward expansion, so that the aspect ratio of the detection frames after cutting reaches a second proportion, and removing the partial images of the hands of the passengers to be passed.
Optionally, the step S3 specifically includes: the first proportion is 5% -15%; the second proportion is 45% -55%.
Optionally, the step S5 specifically includes:
determining the abnormal passing passenger as a tracking target;
obtaining each passenger to be passed in the current frame picture, and calculating an IOU value between each passenger to be passed and a tracking target;
judging whether the maximum value of the IOU values between each passenger to be passed and the tracking target is larger than a preset IOU threshold value or not;
if the current frame is smaller than the target, judging that the tracking target is not found in the current frame;
if the number of the candidate passengers is larger than the preset number, determining that the passenger to be passed with the largest IOU value between the candidate passengers and the tracking target is the candidate passenger, judging whether the lower left corner coordinate of the detection frame of the candidate passenger is smaller than or equal to the lower left corner coordinate of the detection frame of the tracking target, if so, judging that the current frame does not find the passenger to be tracked, otherwise, taking the candidate passenger as the latest track of the tracking target, and judging whether the candidate passenger passes abnormally;
and when M frames of the tracked target are tracked to have abnormal traffic in the continuous N frames, performing abnormal alarm, wherein N is greater than or equal to M.
Optionally, the abnormal traffic in step S4 at least includes a behavior of crossing over the gate with one leg, a behavior of jumping over the gate with two legs, and a behavior of drilling through the gate with squatting.
Optionally, when the behaviors of the abnormally passed passengers reach preset early warning conditions, tripping detection is further performed on the abnormally passed passengers, abnormal alarm is performed only when the tripping detection is met, and otherwise, no alarm is performed;
the tripwire detection comprises:
arranging an early warning line at one side of the gate outlet in the gate area;
when the passenger to be passed has abnormal passing, extracting two adjacent frames of images at the moment when the passenger to be passed passes through the gate;
establishing a connection line of a corner of a detection frame of the passenger to be passed close to the gate area in the two adjacent frames of images;
and judging whether the connecting line and the early warning line intersect, if so, meeting tripwire detection, and otherwise, not meeting tripwire detection.
Optionally, the step S5 further includes: setting the alarm value of the tracking target to be positive before the tracking target performs first abnormal alarm, and setting the alarm value of the tracking target to be negative after the tracking target performs first abnormal alarm; before abnormal alarm is carried out each time, the alarm value according to the target is required to be positive.
The invention also provides an abnormal traffic early warning device, which comprises:
the acquisition unit is used for acquiring an image to be detected and inputting the image to be detected into a preset target recognition model to obtain a detection frame of each target object;
the target detection unit is used for setting a target area frame, defining a gate area through the target area frame, and determining the target object as a passenger to be passed when the specified position of the detection frame of the target object falls into the gate area;
the cutting unit is used for carrying out minimap cutting processing on the detection frames of all passengers to be passed, removing partial hand images of the passengers to be passed and obtaining minimap images of the passengers to be passed;
the passage detection unit is used for inputting the small image of the passenger to be passed into a preset abnormal passage detection model and judging whether the passenger to be passed has abnormal passage or not;
and the early warning unit is used for tracking the IOU of the passenger who passes the abnormal traffic when the passenger who passes the abnormal traffic has the abnormal traffic, and giving an abnormal warning when the behavior of the passenger who passes the abnormal traffic reaches a preset early warning condition.
The present invention also provides an electronic device, comprising: a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the steps of the above method.
The invention has the beneficial effects that: the invention provides an abnormal traffic early warning method and device and electronic equipment. The method comprises the following steps: s1, acquiring an image to be detected, and inputting the image to be detected into a preset target recognition model to obtain a detection frame of each target object; s2, setting a target area frame, defining a gate area through the target area frame, and determining a target object as a passenger to pass through when the specified position of the detection frame of the target object falls into the gate area; s3, cutting out small pictures of the detection frames of all the passengers to be passed, removing partial hand images of the passengers to be passed, and obtaining small picture images of the passengers to be passed; s4, inputting the small image of the passenger to be passed into a preset abnormal passage detection model, and judging whether the passenger to be passed passes abnormally; and S5, when the passenger to pass abnormally passes, IOU tracking is carried out on the passenger passing abnormally, abnormal alarming is carried out when the behavior of the passenger passing abnormally reaches a preset early warning condition, the passenger passing abnormally can be accurately detected, a warning is given out, and various different behaviors of passing abnormally through the gate, such as single-leg crossing, double-leg jumping and squatting, are supported.
Drawings
For a better understanding of the nature and technical aspects of the present invention, reference should be made to the following detailed description of the invention, taken in conjunction with the accompanying drawings, which are provided for purposes of illustration and description and are not intended to limit the invention.
In the drawings, there is shown in the drawings,
FIG. 1 is a flow chart of an abnormal traffic early warning method according to the present invention;
fig. 2 is a schematic diagram of step S1 of the abnormal traffic early warning method according to the present invention;
fig. 3 is a schematic diagram of step S2 of the abnormal traffic early warning method according to the present invention;
fig. 4 and 5 are schematic diagrams of step S3 of the abnormal traffic early warning method according to the present invention;
fig. 6 is a schematic diagram of step S5 of the abnormal traffic early warning method according to the present invention;
FIG. 7 is a comparison diagram of the screen of the maintenance cleaner performing cleaning maintenance on the gate and the passenger crossing the gate with one leg in the abnormal traffic early warning method of the present invention;
FIG. 8 is a schematic diagram of tripwire detection in the abnormal traffic early warning method of the present invention;
fig. 9 is a flowchart of step S3 of the abnormal passage warning method according to the present invention;
FIG. 10 is a flowchart of step S5 of the abnormal traffic warning method of the present invention;
FIG. 11 is a schematic view of the abnormal passage apparatus of the present invention;
fig. 12 is a schematic diagram of an electronic device of the present invention.
Detailed Description
To further illustrate the technical means and effects of the present invention, the following detailed description is given with reference to the preferred embodiments of the present invention and the accompanying drawings.
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the description of the present application, it is to be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. indicate orientations or positional relationships based on those shown in the drawings, merely for convenience of description and simplicity of description, and do not indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be considered limiting of the present application. Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or to implicitly indicate the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more features. In the description of the present application, "a plurality" means two or more unless specifically limited otherwise.
In this application, the word "exemplary" is used to mean "serving as an example, instance, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments. The following description is presented to enable any person skilled in the art to make and use the application. In the following description, details are set forth for the purpose of explanation. It will be apparent to one of ordinary skill in the art that the present application may be practiced without these specific details. In other instances, well-known structures and processes are not set forth in detail in order to avoid obscuring the description of the present application with unnecessary detail. Thus, the present application is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed herein.
Referring to fig. 1 to 10, the present invention provides an abnormal traffic early warning method, which includes the following steps:
step S1, referring to the figure 2, obtaining an image to be detected, inputting the image to be detected into a preset target recognition model, and obtaining a detection frame of each target object.
Specifically, as shown in fig. 2, the step S1 mainly serves as target detection to find out a pedestrian target in an image to be detected, and when in actual application, the method mainly includes the following steps:
accessing a real-time video, wherein the real-time video can be obtained by shooting through a monitoring camera in the area where the gate is located;
acquiring a video frame in a real-time video, wherein the video frame can be obtained by frame extraction of the real-time video according to a preset frame extraction frequency;
preprocessing the video frame, wherein the preprocessing comprises the adjustment of parameters such as the size, the brightness, the contrast ratio and the like of the video frame to obtain an image to be detected which meets the requirement of target detection;
inputting the image to be detected into a preset target recognition model to obtain the detection frame of each pedestrian, and screening through NMS (non maximum suppression) to obtain the detection frame of the target object required by the invention.
Preferably, the target recognition model is yolov5s target recognition model.
And S2, referring to the figure 3, setting a target area frame, defining a gate area through the target area frame, and determining the target object as a passenger to pass through when the specified position of the detection frame of the target object falls into the gate area.
Specifically, in the step S2, rectangular frames of all gates are selected as target area frames by using frames, so as to define a gate area; and when the lower left corner or the lower right corner of the detection frame of the target object falls into the gate area, determining the target object as a passenger to be passed.
Furthermore, passengers with different heights in the gate area can be selected through the processing of the step S2, and the interference of people in front of, behind and at the side of the gate area on the passing behavior detection is eliminated, so that the passengers to be passed can be accurately and comprehensively selected.
And S3, referring to the images in the figures 4, 5 and 9, performing thumbnail cutting processing on the detection frames of all the passengers to be passed, and removing partial hand images of the passengers to be passed to obtain thumbnail images of the passengers to be passed.
Specifically, the step S3 specifically includes: respectively expanding the length and the width of the detection frames of all passengers to be passed by a first proportion;
and cutting the detection frames of all the passengers to be passed after the outward expansion, so that the aspect ratio of the detection frames after cutting reaches a second proportion, and removing the partial images of the hands of the passengers to be passed.
Preferably, the first proportion is 5% -15%; the second proportion is 45% -55%.
In some embodiments of the present invention, the step S3 specifically includes: respectively expanding the length and the width of the detection frames of all passengers to be passed by 10 percent to ensure that the small images intercepted in the next classification step have sufficient background information; and for the behavior of double-hand brake and double-leg jump, false alarm of double-hand brake but no jump easily occurs, and early alarm is caused, in this case, because the aspect ratio of the detection frame of the passenger is generally close to 1.
And S4, inputting the small image of the passenger to be passed into a preset abnormal passage detection model, and judging whether the passenger to be passed passes abnormally.
Specifically, the abnormal passage in the step S4 is a behavior of abnormally passing through the gate by various methods for the purpose of avoiding ticket checking, and the abnormal passage at least includes a behavior of crossing the gate with one leg, a behavior of jumping over the gate with two legs, and various abnormal passage behaviors such as crouching and passing through the gate, so that the coverage of behavior detection is wide, and the detection accuracy is high.
Preferably, the abnormal traffic detection model is an image classification network, such as resnet18.
Step S5, please refer to fig. 6, when the passenger to pass has abnormal passage, the passenger who passes the abnormal passage is subjected to IOU tracking, and an abnormal alarm is given when the behavior of the passenger who passes the abnormal passage reaches a preset early warning condition.
As shown in fig. 10, the step S5 specifically includes:
determining the abnormal passing passenger as a tracking target;
obtaining each passenger to be passed in the current frame picture, and calculating an IOU value between each passenger to be passed and a tracking target;
judging whether the maximum value of the IOU values between each passenger to be passed and the tracking target is larger than a preset IOU threshold value or not;
if the current frame is smaller than the target, judging that the tracking target is not found in the current frame;
if the number of the candidate passengers is larger than the preset number, determining that the passenger to be passed with the largest IOU value between the candidate passengers and the tracking target is the candidate passenger, judging whether the lower left corner coordinate of the detection frame of the candidate passenger is smaller than or equal to the lower left corner coordinate of the detection frame of the tracking target, if so, judging that the current frame does not find the passenger to be tracked, otherwise, taking the candidate passenger as the latest track of the tracking target, and judging whether the candidate passenger passes abnormally;
and when M frames of the tracked target are tracked to have abnormal traffic in the continuous N frames, performing abnormal alarm, wherein N is greater than or equal to M.
Preferably, M =0.6N.
Further, in some embodiments of the present invention, the step S5 further includes: setting the alarm value of the tracking target to be positive before the tracking target performs first abnormal alarm, and setting the alarm value of the tracking target to be negative after the tracking target performs first abnormal alarm; before abnormal alarm is carried out each time, the alarm value according to the target is required to be positive.
Specifically, in some embodiments of the present invention, a specific implementation process of the step S5 includes:
firstly, initializing a tracking parameter, specifically including initializing a tracking time window to be an x frame, a tracking loss time window to be a y frame, a tracking iou threshold to be iou _ threshold and an abnormal behavior confidence threshold to be score _ threshold;
then, starting tracking, when the confidence coefficient of the abnormal behavior of the passenger to be passed is greater than a tracking confidence threshold score-threshold, determining the passenger to be passed as a tracking target, establishing a confidence queue of the tracking target, wherein the length of the confidence queue is 5 frames, and simultaneously setting the first _ alarm value of the tracking target as true (positive);
then, obtaining each passenger to be passed in the current frame picture, and calculating an IOU value between each passenger to be passed and the tracking target;
judging whether the maximum value of the IOU values between each passenger to be passed and the tracking target is larger than a preset IOU threshold value or not, and if so, judging that the tracking target is not found in the current frame;
if the IOU value is larger than the threshold value, determining the passenger to be passed with the largest IOU value between the passenger and the tracking target as a candidate passenger;
judging the movement direction of the candidate passenger to determine whether the candidate passenger passes through the gate, wherein the specific method comprises the steps of judging whether the lower left corner coordinate of the detection frame of the candidate passenger is smaller than or equal to the lower left corner coordinate of the detection frame of the tracking target, if so, judging that the current frame does not find the passenger to be tracked, otherwise, taking the candidate passenger as the latest track of the tracking target, and judging whether the candidate passenger has abnormal traffic;
and when the tracking target is tracked and 3 frames of continuous 5 frames have abnormal traffic, performing abnormal alarm.
In addition, when the frame number of a tracking target lost exceeds y frames, marking the tracking target as tracking loss;
it should be noted that, in the same frame, the track of the same passenger is updated only once, the detection frame of one passenger to pass can only be updated once, and at most, only the track of one tracking target can be updated.
In practical application, as shown in fig. 7, when a maintenance cleaner performs cleaning and maintenance on a gate, a picture is very close to an abnormal passing picture of a single-leg crossing gate, so that false alarm often occurs, in order to avoid such false alarm, when the behavior of an abnormally passing passenger is found to reach a preset early warning condition, the invention also performs tripwire detection on the abnormally passing passenger, and abnormal alarm is performed when the detection meets the tripwire detection condition, otherwise no alarm is performed, the tripwire detection is mainly used for detecting whether the abnormally passing passenger actually passes the gate or only moves on one side of the gate, wherein the passenger moving on one side of the gate can be regarded as the maintenance cleaner, and does not need to alarm, and the passenger passing the gate can be regarded as the abnormally passing passenger and needs to alarm.
Further, as shown in fig. 8, the trip wire detection comprises:
an early warning line 101 is arranged on one side of the gate outlet of the gate area;
when the passenger to be passed has abnormal passing, extracting two adjacent frames of images at the moment when the passenger to be passed passes through the gate;
establishing a connection line of one corner (such as the lower left corner) of the detection frame of the passenger to be passed close to the gate area in the two adjacent frames of images;
and judging whether the connecting line is intersected with the early warning line 101, if so, meeting tripwire detection, and otherwise, not meeting tripwire detection.
It is worth mentioning that the abnormal behavior detection method can be used for detecting various abnormal traffic behaviors such as single-leg crossing, double-leg jumping and crouching, algorithm definition of the method is simple, identification and real-time alarm of the abnormal traffic behaviors can be achieved by using target detection, small graph classification and cross-over ratio (IoU) tracking, low-delay performance is achieved, the method effectively avoids the situations of early alarm and false alarm through combination of three means of small graph cutting, defining an IoU tracking area and judging the track movement direction, high-precision performance is achieved, finally, data sources of the method are all from a single common camera, data sources such as a sensor, a gate ticket swiping and a binocular camera are not relied on, and data access and maintenance cost is low.
Referring to fig. 11, the present invention provides an abnormal traffic early warning device, including:
the acquiring unit 10 is configured to acquire an image to be detected, input the image to be detected into a preset target recognition model, and obtain a detection frame of each target object;
the target detection unit 20 is used for setting a target area frame, defining a gate area through the target area frame, and determining the target object as a passenger to be passed when the specified position of the detection frame of the target object falls into the gate area;
the cutting unit 30 is used for performing thumbnail cutting processing on the detection frames of all passengers to be passed, removing partial hand images of the passengers to be passed and obtaining thumbnail images of the passengers to be passed;
the passage detection unit 40 is used for inputting the small image of the passenger to be passed into a preset abnormal passage detection model and judging whether the passenger to be passed has abnormal passage;
and the early warning unit 50 is used for carrying out IOU tracking on the passenger who abnormally passes when the passenger to pass has abnormal passing, and carrying out abnormal warning when the behavior of the passenger who abnormally passes reaches a preset early warning condition.
Referring to fig. 12, the present invention provides an electronic device, including: a memory 200 and a processor 100, the memory 200 storing a computer program which, when executed by the processor 100, causes the processor 100 to perform the steps of the method as described above.
In summary, the present invention provides an abnormal traffic early warning method and apparatus, and an electronic device. The method comprises the following steps: s1, acquiring an image to be detected, and inputting the image to be detected into a preset target recognition model to obtain a detection frame of each target object; s2, setting a target area frame, defining a gate area through the target area frame, and determining a target object as a passenger to be passed when the specified position of the detection frame of the target object falls into the gate area; s3, cutting out small pictures of the detection frames of all the passengers to be passed, removing partial hand images of the passengers to be passed, and obtaining small picture images of the passengers to be passed; s4, inputting the small image of the passenger to be passed into a preset abnormal passage detection model, and judging whether the passenger to be passed passes abnormally; and S5, when the passenger to pass abnormally passes, IOU tracking is carried out on the passenger passing abnormally, abnormal alarming is carried out when the behavior of the passenger passing abnormally reaches a preset early warning condition, the passenger passing abnormally can be accurately detected, a warning is given out, and various different behaviors of passing abnormally through the gate, such as single-leg crossing, double-leg jumping and squatting, are supported.
As described above, it will be apparent to those skilled in the art that other various changes and modifications may be made based on the technical solution and concept of the present invention, and all such changes and modifications are intended to fall within the scope of the appended claims.

Claims (10)

1. An abnormal traffic early warning method is characterized by comprising the following steps:
s1, acquiring an image to be detected, and inputting the image to be detected into a preset target recognition model to obtain a detection frame of each target object;
s2, setting a target area frame, defining a gate area through the target area frame, and determining a target object as a passenger to be passed when the specified position of the detection frame of the target object falls into the gate area;
s3, cutting out small pictures of the detection frames of all the passengers to be passed, removing partial hand images of the passengers to be passed, and obtaining small picture images of the passengers to be passed;
s4, inputting the small image of the passenger to be passed into a preset abnormal passage detection model, and judging whether the passenger to be passed passes abnormally;
and S5, when the passenger to be passed abnormally passes, carrying out IOU tracking on the passenger passing abnormally, and carrying out abnormal alarm when the behavior of the passenger passing abnormally reaches a preset early warning condition.
2. The abnormal traffic early warning method according to claim 1, wherein in the step S2, rectangular frames of all gates are selected as target area frames by using frames to define gate areas; when the detection frame of the target object falls into the gate area near one corner of the gate area, the target object is determined as a passenger to be passed.
3. The abnormal traffic early warning method according to claim 1, wherein the step S3 specifically comprises:
respectively expanding the length and the width of the detection frames of all passengers to be passed by a first proportion;
and cutting the detection frames of all the passengers to be passed after the outward expansion, so that the aspect ratio of the detection frames after cutting reaches a second proportion, and removing the partial images of the hands of the passengers to be passed.
4. The abnormal traffic early warning method according to claim 3, wherein the step S3 specifically comprises: the first proportion is 5% -15%; the second proportion is 45% -55%.
5. The abnormal traffic early warning method according to claim 1, wherein the step S5 specifically comprises:
determining the abnormal passing passenger as a tracking target;
obtaining each passenger to be passed in the current frame picture, and calculating an IOU value between each passenger to be passed and a tracking target;
judging whether the maximum value of the IOU values between each passenger to be passed and the tracking target is larger than a preset IOU threshold value or not;
if the current frame is smaller than the target, judging that the tracking target is not found in the current frame;
if the number of the candidate passengers is larger than the preset number, determining that the passenger to be passed with the largest IOU value between the candidate passengers and the tracking target is the candidate passenger, judging whether the lower left corner coordinate of the detection frame of the candidate passenger is smaller than or equal to the lower left corner coordinate of the detection frame of the tracking target, if so, judging that the current frame does not find the passenger to be tracked, otherwise, taking the candidate passenger as the latest track of the tracking target, and judging whether the candidate passenger passes abnormally;
and when M frames of the tracked target are tracked to have abnormal traffic in the continuous N frames, performing abnormal alarm, wherein N is greater than or equal to M.
6. The abnormal traffic early warning method according to claim 1, wherein the abnormal traffic in step S4 at least includes a behavior of crossing the gate with one leg, a behavior of jumping the gate with two legs, and a behavior of passing the gate with a squat.
7. The abnormal traffic early warning method according to claim 1, wherein when the behavior of the abnormal traffic passenger reaches a preset early warning condition, the abnormal traffic passenger is also subjected to tripwire detection, and an abnormal alarm is given only when the detection of the tripwire is met, otherwise, the alarm is not given;
the tripwire detection comprises:
arranging an early warning line at one side of the gate outlet in the gate area;
when the passenger to be passed abnormally passes, extracting two adjacent frames of images at the moment when the passenger to be passed passes through the gate;
establishing a connection line of a corner of a detection frame of the passenger to be passed close to the gate area in the two adjacent frames of images;
and judging whether the connecting line and the early warning line intersect, if so, meeting tripwire detection, and otherwise, not meeting tripwire detection.
8. The abnormal traffic early warning method according to claim 6, wherein the step S5 further comprises: setting the alarm value of the tracking target to be positive before the tracking target is subjected to first abnormal alarm, and setting the alarm value of the tracking target to be negative after the tracking target is subjected to first abnormal alarm; before abnormal alarm is carried out each time, the alarm value according to the target is required to be positive.
9. An abnormal passage early warning device, comprising:
the acquisition unit is used for acquiring an image to be detected, inputting the image to be detected into a preset target recognition model and obtaining a detection frame of each target object;
the target detection unit is used for setting a target area frame, defining a gate area through the target area frame, and determining the target object as a passenger to be passed when the specified position of the detection frame of the target object falls into the gate area;
the cutting unit is used for carrying out small image cutting processing on the detection frames of all the passengers to be passed, removing partial hand images of the passengers to be passed and obtaining small image images of the passengers to be passed;
the passage detection unit is used for inputting the small image of the passenger to be passed into a preset abnormal passage detection model and judging whether the passenger to be passed has abnormal passage or not;
and the early warning unit is used for tracking the IOU of the passenger who passes the abnormal traffic when the passenger who passes the abnormal traffic has the abnormal traffic, and giving an abnormal warning when the behavior of the passenger who passes the abnormal traffic reaches a preset early warning condition.
10. An electronic device, comprising: a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method of any of claims 1-8.
CN202210951140.1A 2022-08-09 2022-08-09 Abnormal traffic early warning method and device and electronic equipment Pending CN115171220A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210951140.1A CN115171220A (en) 2022-08-09 2022-08-09 Abnormal traffic early warning method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210951140.1A CN115171220A (en) 2022-08-09 2022-08-09 Abnormal traffic early warning method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN115171220A true CN115171220A (en) 2022-10-11

Family

ID=83478486

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210951140.1A Pending CN115171220A (en) 2022-08-09 2022-08-09 Abnormal traffic early warning method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN115171220A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117315592A (en) * 2023-11-27 2023-12-29 四川省医学科学院·四川省人民医院 Identification early warning system based on robot end real-time monitoring camera shooting

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117315592A (en) * 2023-11-27 2023-12-29 四川省医学科学院·四川省人民医院 Identification early warning system based on robot end real-time monitoring camera shooting
CN117315592B (en) * 2023-11-27 2024-01-30 四川省医学科学院·四川省人民医院 Identification early warning system based on robot end real-time monitoring camera shooting

Similar Documents

Publication Publication Date Title
CN105744232B (en) A kind of method of the transmission line of electricity video external force damage prevention of Behavior-based control analytical technology
US8655078B2 (en) Situation determining apparatus, situation determining method, situation determining program, abnormality determining apparatus, abnormality determining method, abnormality determining program, and congestion estimating apparatus
CN111784857A (en) Parking space management method and device and computer storage medium
US8712149B2 (en) Apparatus and method for foreground detection
CN111242108B (en) Belt transfer point coal blockage identification method based on target detection
CN103196372B (en) A kind of optical imagery detection method of electrification railway contact net supportive device
US20230005176A1 (en) Throwing position acquisition method and apparatus, computer device and storage medium
CN110796819B (en) Detection method and system for platform yellow line invasion border crossing personnel
CN106559647B (en) Door opening and closing detection device and method, people flow detection system and vehicle
CN110255318B (en) Method for detecting idle articles in elevator car based on image semantic segmentation
CN114495011A (en) Non-motor vehicle and pedestrian illegal intrusion identification method based on target detection, storage medium and computer equipment
CN116153086B (en) Multi-path traffic accident and congestion detection method and system based on deep learning
CN112270253A (en) High-altitude parabolic detection method and device
CN115171220A (en) Abnormal traffic early warning method and device and electronic equipment
CN114758414A (en) Pedestrian behavior detection method, device, equipment and computer storage medium
CN112329671B (en) Pedestrian running behavior detection method based on deep learning and related components
CN111425256B (en) Coal mine tunnel monitoring method and device and computer storage medium
CN104392201A (en) Human fall identification method based on omnidirectional visual sense
CN112509338A (en) Method for detecting traffic jam event through silent low-point video monitoring
CN111862023A (en) Pantograph structure abnormity detection method based on computer vision
CN116311166A (en) Traffic obstacle recognition method and device and electronic equipment
JP3100471B2 (en) Dangerous traffic event detection method
CN113569730B (en) Protection state detection method and device and electronic equipment
CN114699702A (en) Fire fighting equipment detection method and related device
CN114663479A (en) Intelligent monitoring and early warning method and system based on computer vision

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination