Subway tramcar pedestrian flow prediction method based on deep learning

文档序号:8774 发布日期:2021-09-17 浏览:68次 中文

1. A subway tramcar pedestrian flow prediction method based on deep learning is characterized by comprising the following steps: it comprises the following steps:

1) at least three groups of cameras are arranged, the first group of cameras are used for shooting subway channels (the subway channels enter a station and exit the station, and the subway channels can be sensed by one group of cameras because the subway channels actually enter and exit the station through the same channel), the second group of cameras are used for shooting gate machines (including the gate machines), and the third group of cameras are used for shooting platforms (which are bidirectional and can be respectively arranged);

2) identifying pedestrians and counting by a pedestrian identification method;

3) identifying the speed of people flow by a visual speed measuring method;

4) and predicting the future people flow through deep learning.

2. The method for predicting the pedestrian flow of the metro tram based on the deep learning according to the claim 1, characterized in that:

wherein the step 2 comprises the following steps:

s11, acquiring video images, specifically acquiring video images of the same camera in different time;

s12, determining a video change region by comparing two adjacent frames of video images, specifically, comparing the two adjacent frames of video images, and judging whether a discrimination region exists or not, if so, indicating that a moving object exists in the video images;

s13 identifies the moving object, learns and identifies the image of the moving object if the moving speed of the moving object matches the moving speed of the pedestrian, determines whether the moving object is a pedestrian, specifically, determines a certain speed of the moving object first, determines whether the moving speed of the moving object matches the moving speed of the pedestrian, if yes, the moving object may be a pedestrian, learns and identifies the video image, and further determines whether the moving object is a pedestrian.

3. The method for predicting the pedestrian flow of the metro tram based on the deep learning as claimed in claim 2, wherein the method comprises the following steps: the step 3 comprises the following steps:

s21, receiving and storing the first frame of video image;

s22, receiving and storing the second frame of video image; the first frame video image and the second frame video image refer to two adjacent frame video images;

s23, comparing the second frame video image with the first frame video image, judging whether there is a changed area, if not, executing step S24, if yes, executing step S25;

s24, discarding the first frame of video image, namely discarding the previous frame of video image in the two adjacent frames of video images, and not executing subsequent operation;

s25 determining a moving pixel distance of the pedestrian; namely comparing the positions of the pedestrians in the two frames of video images to determine the moving pixel distance of the pedestrians;

s26, determining the real moving distance of the pedestrian based on the scale parameter, namely determining the real moving distance corresponding to the moving pixel distance according to the scale;

s27 determining the moving speed of the pedestrian based on the moving real distance of the pedestrian, that is, determining the moving speed of the pedestrian according to the moving real distance and the time interval between two frames of video images;

s28 obtains the average speed of all the pedestrians entering the station and the average speed of all the pedestrians leaving the station in unit time as the human flow speed.

4. The method for predicting the pedestrian flow of the metro tram based on the deep learning as claimed in claim 2, wherein the method comprises the following steps:

the step 3 comprises the following steps:

s31, two parallel transverse lines are set on the video image, wherein a and b are respectively, a → b is the direction of entering the station, and b → a is the direction of exiting the station, and the pedestrian must pass through the two transverse lines because the flow of people only enters and exits in two opposite directions;

s32, calculating the speed of each pedestrian according to the time of each pedestrian passing through the line a and the line b;

s33 calculates the average speed of the pedestrian as the speed of the human flow.

5. The method for predicting the pedestrian flow of the subway tram based on the deep learning as claimed in any one of claims 3 or 4, wherein: wherein the step 4 comprises the following steps:

constructing a GLAT model, taking a Seq2Seq model as a model base, introducing a time attention mechanism to pay attention to a hidden layer vector of each moment of an encoder, inputting the people flow speed of each camera group of a station at a previous period into the GLAT model, and outputting the predicted people flow speed of a future period by calculation.

Background

In the prior art, two ways of monitoring subway people flow are provided, wherein one way is to sense a human body in an active way such as infrared or microwave, so as to realize counting; the other method is to realize counting by sensing human body through a mobile phone, a card swiping and other passive modes. However, the above methods have the disadvantage that only the number of people entering and exiting the gate can be determined. It is easy to understand that the stream of people capable of entering and exiting the gate does not impact the management of the subway, and what really impacts the management is the people who rush in at high speed in rush hours, limited by the throughput of the gate, and they can only wait in line. For example: 10 persons enter and 10 persons go out through the gate in a certain station; 100 persons enter the subway passage and 10 persons go out; 10 persons get on the train and 100 persons get off the train. According to the prediction of the prior art, the flow of people entering and exiting the station is kept smooth, however, the actual entering and exiting stations are about to form small peaks, and congestion can be caused if no intervention is carried out. In addition, the crowd is not a robot, the walking speeds of the crowd are very different, and some people even stay in the subway station, so that the whole flow speed of the crowd cannot be predicted in the prior art.

Disclosure of Invention

Aiming at the defects of the prior art, the invention provides a method for predicting subway people flow through pedestrian recognition, which can sense the inflow and outflow quantity and the inflow and outflow velocity of the subway channel people flow and predict the people flow change in a certain time in the future.

The technical scheme of the invention is as follows:

a subway tramcar pedestrian flow prediction method based on deep learning is characterized by comprising the following steps: it comprises the following steps:

1) at least three groups of cameras are arranged, the first group of cameras are used for shooting subway channels (the subway channels enter a station and exit the station, and the subway channels can be sensed by one group of cameras because the subway channels actually enter and exit the station through the same channel), the second group of cameras are used for shooting gate machines (including the gate machines), and the third group of cameras are used for shooting platforms (which are bidirectional and can be respectively arranged);

2) identifying pedestrians and counting by a pedestrian identification method;

3) identifying the speed of people flow by a visual speed measuring method;

4) and predicting the future people flow through deep learning.

Wherein the step 2 comprises the following steps:

s11, acquiring video images, specifically acquiring video images of the same camera in different time;

s12, determining a video change region by comparing two adjacent frames of video images, specifically, comparing the two adjacent frames of video images, and judging whether a discrimination region exists or not, if so, indicating that a moving object exists in the video images;

s13 identifies the moving object, learns and identifies the image of the moving object if the moving speed of the moving object matches the moving speed of the pedestrian, determines whether the moving object is a pedestrian, specifically, determines a certain speed of the moving object first, determines whether the moving speed of the moving object matches the moving speed of the pedestrian, if yes, the moving object may be a pedestrian, learns and identifies the video image, and further determines whether the moving object is a pedestrian.

In one embodiment, step 3 comprises the following steps:

s21, receiving and storing the first frame of video image;

s22, receiving and storing the second frame of video image; the first frame video image and the second frame video image refer to two adjacent frame video images;

s23, comparing the second frame video image with the first frame video image, judging whether there is a changed area, if not, executing step S24, if yes, executing step S25;

s24, discarding the first frame of video image, namely discarding the previous frame of video image in the two adjacent frames of video images, and not executing subsequent operation;

s25 determining a moving pixel distance of the pedestrian; namely comparing the positions of the pedestrians in the two frames of video images to determine the moving pixel distance of the pedestrians;

s26, determining the real moving distance of the pedestrian based on the scale parameter, namely determining the real moving distance corresponding to the moving pixel distance according to the scale;

s27 determining the moving speed of the pedestrian based on the moving real distance of the pedestrian, that is, determining the moving speed of the pedestrian according to the moving real distance and the time interval between two frames of video images;

s28 obtains the average speed of all the pedestrians entering the station and the average speed of all the pedestrians leaving the station in unit time as the human flow speed.

In another embodiment, step 3 comprises the steps of:

s31, two parallel transverse lines are set on the video image, wherein a and b are respectively, a → b is the direction of entering the station, and b → a is the direction of exiting the station, and the pedestrian must pass through the two transverse lines because the flow of people only enters and exits in two opposite directions;

s32, calculating the speed of each pedestrian according to the time of each pedestrian passing through the line a and the line b;

s33 calculates the average speed of the pedestrian as the speed of the human flow.

Wherein the step 4 comprises the following steps:

a GLAT model is constructed, a Seq2Seq model is used as a model base, a time attention mechanism is introduced to pay attention to a hidden layer vector of each moment of an encoder, the people flow speed of each camera group of a station at a previous period is input into the GLAT model, the predicted people flow speed of a future period is output through calculation, and a decision maker can select whether to open a train, whether to shorten the interval time between shifts, whether to open a gate and the like according to the people flow speed of a certain time in the future.

The invention has the beneficial effects that: all data come from the camera, and because the subway channel, gate, platform and the like of each station are provided with the camera, the hardware burden of a subway operator does not need to be additionally increased; the sensing comprises the pedestrian flow change of subway channels, gates and platforms, real and comprehensive data are provided for decision makers, and the decision makers can give an effective rail transit management and control mode conveniently.

Detailed Description

The following is further described in conjunction with the detailed description:

example 1

A subway tramcar pedestrian flow prediction method based on deep learning is characterized by comprising the following steps: it comprises the following steps:

1) at least three groups of cameras are arranged, the first group of cameras are used for shooting subway channels (the subway channels enter a station and exit the station, and the subway channels can be sensed by one group of cameras because the subway channels actually enter and exit the station through the same channel), the second group of cameras are used for shooting gate machines (including the gate machines), and the third group of cameras are used for shooting platforms (which are bidirectional and can be respectively arranged);

2) identifying pedestrians and counting by a pedestrian identification method;

3) identifying the speed of people flow by a visual speed measuring method;

4) and predicting the future people flow through deep learning.

Wherein the step 2 comprises the following steps:

s11, acquiring video images, specifically acquiring video images of the same camera in different time;

s12, determining a video change region by comparing two adjacent frames of video images, specifically, comparing the two adjacent frames of video images, and judging whether a discrimination region exists or not, if so, indicating that a moving object exists in the video images;

s13 identifies the moving object, learns and identifies the image of the moving object if the moving speed of the moving object matches the moving speed of the pedestrian, determines whether the moving object is a pedestrian, specifically, determines a certain speed of the moving object first, determines whether the moving speed of the moving object matches the moving speed of the pedestrian, if yes, the moving object may be a pedestrian, learns and identifies the video image, and further determines whether the moving object is a pedestrian.

The step 3 comprises the following steps:

s21, receiving and storing the first frame of video image;

s22, receiving and storing the second frame of video image; the first frame video image and the second frame video image refer to two adjacent frame video images;

s23, comparing the second frame video image with the first frame video image, judging whether there is a changed area, if not, executing step S24, if yes, executing step S25;

s24, discarding the first frame of video image, namely discarding the previous frame of video image in the two adjacent frames of video images, and not executing subsequent operation;

s25 determining a moving pixel distance of the pedestrian; namely comparing the positions of the pedestrians in the two frames of video images to determine the moving pixel distance of the pedestrians;

s26, determining the real moving distance of the pedestrian based on the scale parameter, namely determining the real moving distance corresponding to the moving pixel distance according to the scale;

s27 determining the moving speed of the pedestrian based on the moving real distance of the pedestrian, that is, determining the moving speed of the pedestrian according to the moving real distance and the time interval between two frames of video images;

s28 obtains the average speed of all the pedestrians entering the station and the average speed of all the pedestrians leaving the station in unit time as the human flow speed.

Wherein the step 4 comprises the following steps:

a GLAT model is constructed, a Seq2Seq model is used as a model base, a time attention mechanism is introduced to pay attention to a hidden layer vector of each moment of an encoder, the people flow speed of each camera group of a station at a previous period is input into the GLAT model, the predicted people flow speed of a future period is output through calculation, and a decision maker can select whether to open a train, whether to shorten the interval time between shifts, whether to open a gate and the like according to the people flow speed of a certain time in the future.

Example 2

A subway tramcar pedestrian flow prediction method based on deep learning is characterized by comprising the following steps: it comprises the following steps:

1) at least three groups of cameras are arranged, the first group of cameras are used for shooting subway channels (the subway channels enter a station and exit the station, and the subway channels can be sensed by one group of cameras because the subway channels actually enter and exit the station through the same channel), the second group of cameras are used for shooting gate machines (including the gate machines), and the third group of cameras are used for shooting platforms (which are bidirectional and can be respectively arranged);

2) identifying pedestrians and counting by a pedestrian identification method;

3) identifying the speed of people flow by a visual speed measuring method;

4) and predicting the future people flow through deep learning.

Wherein the step 2 comprises the following steps:

s11, acquiring video images, specifically acquiring video images of the same camera in different time;

s12, determining a video change region by comparing two adjacent frames of video images, specifically, comparing the two adjacent frames of video images, and judging whether a discrimination region exists or not, if so, indicating that a moving object exists in the video images;

s13 identifies the moving object, learns and identifies the image of the moving object if the moving speed of the moving object matches the moving speed of the pedestrian, determines whether the moving object is a pedestrian, specifically, determines a certain speed of the moving object first, determines whether the moving speed of the moving object matches the moving speed of the pedestrian, if yes, the moving object may be a pedestrian, learns and identifies the video image, and further determines whether the moving object is a pedestrian.

The step 3 comprises the following steps:

s31, two parallel transverse lines are set on the video image, wherein a and b are respectively, a → b is the direction of entering the station, and b → a is the direction of exiting the station, and the pedestrian must pass through the two transverse lines because the flow of people only enters and exits in two opposite directions;

s32, calculating the speed of each pedestrian according to the time of each pedestrian passing through the line a and the line b;

s33 calculates the average speed of the pedestrian as the speed of the human flow.

Wherein the step 4 comprises the following steps:

a GLAT model is constructed, a Seq2Seq model is used as a model base, a time attention mechanism is introduced to pay attention to a hidden layer vector of each moment of an encoder, the people flow speed of each camera group of a station at a previous period is input into the GLAT model, the predicted people flow speed of a future period is output through calculation, and a decision maker can select whether to open a train, whether to shorten the interval time between shifts, whether to open a gate and the like according to the people flow speed of a certain time in the future.

The foregoing embodiments and description have been presented only to illustrate the principles and preferred embodiments of the invention, and various changes and modifications may be made therein without departing from the spirit and scope of the invention as hereinafter claimed.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:运输车充电调度控制方法及装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!