CN113963310A - People flow detection method and device for bus station and electronic equipment - Google Patents

People flow detection method and device for bus station and electronic equipment Download PDF

Info

Publication number
CN113963310A
CN113963310A CN202111143638.7A CN202111143638A CN113963310A CN 113963310 A CN113963310 A CN 113963310A CN 202111143638 A CN202111143638 A CN 202111143638A CN 113963310 A CN113963310 A CN 113963310A
Authority
CN
China
Prior art keywords
human head
head detection
frame
real
video image
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
CN202111143638.7A
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.)
Qingdao Turing Technology Co ltd
Original Assignee
Qingdao Turing Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Turing Technology Co ltd filed Critical Qingdao Turing Technology Co ltd
Priority to CN202111143638.7A priority Critical patent/CN113963310A/en
Publication of CN113963310A publication Critical patent/CN113963310A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent

Abstract

The invention provides a people flow detection method and device for a bus station and electronic equipment, which are used for acquiring a real-time video image shot by a camera erected on the bus station; dividing the real-time video image according to the position of the waiting area in the video picture to obtain the real-time video image of the waiting area; carrying out human head detection on the real-time video image of the waiting area by utilizing a human head detection network which is trained in advance and is based on an anchor free algorithm to obtain an initial human head detection frame; the human head detection network takes a MobileNet network added with a channel attention module as a backbone network; removing the false-detected human head detection frame in the initial human head detection frame according to a preset duplication removing rule to obtain a final human head detection frame; and determining the people flow information of the waiting area of the bus station according to the number of the final people head detection frames. The scheme of the invention realizes real-time detection of the passenger flow of the bus station, provides data support for bus scheduling, and improves the accuracy of head detection and the bus scheduling efficiency.

Description

People flow detection method and device for bus station and electronic equipment
Technical Field
The invention relates to the technical field of intelligent traffic, in particular to a people flow detection method and device for a bus station and electronic equipment.
Background
With the development of urbanization, a large number of foreign people are gushed in cities, great pressure is brought to urban public transport, and buses play an important role in normal operation of the cities as the main force of the urban public transport.
In order to improve the bus informatization level, an advanced bus dispatching system is introduced into the urban bus system. The bus dispatching system takes the traffic passenger flow as the basis of bus operation dispatching, the current determined traffic passenger flow mainly depends on experience, the passenger flow of each bus line is determined by counting the passenger flow of the previous buses in operation, and then the bus shift is set according to the passenger flow of each bus line.
However, the method can only guide the operation of the bus according to the preset bus shift, cannot know the real-time traffic passenger flow and automatically adjust the bus shift, and has low bus dispatching efficiency.
Disclosure of Invention
The invention provides a method and a device for detecting the pedestrian flow of a bus station and electronic equipment.
In a first aspect, the present invention provides a people flow rate detection method for a bus station, including:
acquiring a real-time video image shot by a camera erected at a bus station;
dividing the real-time video image according to the position of the waiting area in the video picture to obtain the real-time video image of the waiting area;
carrying out human head detection on the real-time video image of the waiting area by utilizing a human head detection network which is trained in advance and is based on an anchor free algorithm to obtain an initial human head detection frame; the human head detection network based on the anchor free algorithm takes a MobileNet network added with a channel attention module as a backbone network;
removing the false-detected human head detection frame in the initial human head detection frame according to a preset duplication removing rule to obtain a final human head detection frame;
and determining the people flow information of the waiting area of the bus station according to the number of the final people head detection frames.
In an optional embodiment, the segmenting the real-time video image according to the position of the waiting area in the video picture to obtain the real-time video image of the waiting area includes:
configuring image segmentation parameters according to the position of a waiting area in a video picture;
and segmenting the real-time video image according to the image segmentation parameters to obtain a real-time video image of a waiting area.
In an optional embodiment, the removing the false-detection human head detection frame in the initial human head detection frame according to a preset duplication-removing rule to obtain a final human head detection frame includes:
removing the overlapped human head detection frames in the initial human head detection frames by adopting a non-maximum value inhibition method to obtain the screened human head detection frames;
classifying the screened human head detection frames according to the height information of the human head detection frames in the image to obtain human head detection frame lists with different heights, and calculating the average area of the human head detection frames in the human head detection frame lists with different heights;
calculating the ratio of the absolute value of the difference between the area of each human head detection frame and the average area of the human head detection frames in the human head detection frame list with different heights to the average area of the human head detection frames;
judging whether the ratio of the absolute value of the difference between the area of each human head detection frame and the average area of the human head detection frames in the human head detection frame lists with different heights to the average area of the human head detection frames is larger than a preset threshold value or not;
and if so, deleting the corresponding human head detection frame.
Further, before acquiring the real-time video image shot by the camera erected at the bus station, the method further comprises:
acquiring human head sample data and human head marking data;
processing the human head sample data by using a mosaic data enhancement method to obtain human head training data;
and training the constructed human head detection network by using the human head training data and the human head marking data to obtain the trained human head detection network.
Further, the process of training the constructed human head detection network by using the human head training data includes the following rules: when the anchor frame anchor is matched, calculating the distance between the center point of the anchor frame anchor and the center point of the mark frame ground-route and the intersection ratio IOU of the anchor frame anchor and the mark frame ground-route, and determining the positive sample and the negative sample of the anchor frame anchor according to the preset hyperparameter, the distance between the center point of the anchor frame anchor and the center point of the mark frame ground-route and the intersection ratio IOU of the anchor frame anchor and the mark frame ground-route.
In an optional embodiment, the method further comprises:
and sending the people flow information to a bus management platform to schedule the bus number in real time.
In a second aspect, the present invention provides a people flow rate detecting device for a bus station, including:
the acquisition module is used for acquiring a real-time video image shot by a camera erected at a bus station;
the segmentation module is used for segmenting the real-time video image according to the position of the waiting area in the video image to obtain the real-time video image of the waiting area;
the detection module is used for carrying out human head detection on the real-time video image of the waiting area by utilizing a human head detection network which is trained in advance and based on an anchor free algorithm to obtain an initial human head detection frame; the human head detection network based on the anchor free algorithm takes a MobileNet network added with a channel attention module as a backbone network;
the screening module is used for removing the false-detected human head detection frame according to the initial human head detection frame and a preset de-weight rule to obtain a final human head detection frame;
and the determining module is used for determining the people flow information of the waiting area of the bus station according to the number of the final people head detecting frames.
In an optional embodiment, the apparatus further comprises: a sending module;
and the system is used for sending the people flow information to a bus management platform so as to schedule the bus number in real time.
In a third aspect, the present invention provides an electronic device comprising: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executes computer-executable instructions stored in the memory to cause the at least one processor to perform the human traffic detection method of any one of the first aspects.
The invention provides a people flow detection method, a people flow detection device and electronic equipment for a bus station, which are used for acquiring a real-time video image shot by a camera erected on the bus station; dividing the real-time video image according to the position of the waiting area in the video picture to obtain the real-time video image of the waiting area; carrying out human head detection on the real-time video image of the waiting area by utilizing a human head detection network which is trained in advance and is based on an anchor free algorithm to obtain an initial human head detection frame; the human head detection network based on the anchor free algorithm takes a MobileNet network added with a channel attention module as a backbone network; removing the false-detection human head detection frame according to the initial human head detection frame and a preset duplication-removal rule to obtain a final human head detection frame; and determining the people flow information of the waiting area of the bus station according to the number of the final people head detection frames. Compared with the prior art, the pedestrian video of the waiting area is shot through the camera arranged at the bus stop, the pedestrian quantity of the waiting area is determined by carrying out pedestrian detection on the waiting area in the video through improving the pedestrian detection network, the pedestrian flow of the bus stop can be determined in real time, data support is provided for bus scheduling, and the accuracy of pedestrian detection and the bus scheduling efficiency are improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a schematic diagram of a scenario architecture upon which the present disclosure is based;
fig. 2 is a schematic flow chart illustrating a passenger flow rate detection method for a bus station according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of a human head detection network training method according to an embodiment of the present disclosure;
fig. 4 is a schematic flow chart illustrating another people flow detecting method for a bus station according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a passenger flow rate detection device of a bus station according to a second embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device according to a third embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, 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 invention.
Urban public transport scheduling is realized based on traffic flow, and at present, the traffic flow is determined mainly by counting the flow of people in the previous bus operation to determine the flow of people in each bus line, and then the bus shift is set according to the flow of people in each bus line. The method can only set the bus shift according to the pedestrian flow of the past bus route, cannot acquire the real-time traffic pedestrian flow to automatically adjust the bus shift, and has low bus dispatching efficiency.
In recent years, with the rapid development of computer vision, particularly in the field of deep learning, the method of big data and deep learning is utilized to automatically detect the bus station and acquire the number of people at the bus station. The people flow detection technology based on the people head detection can realize the real-time automatic detection of the people flow of the bus station, and therefore has important significance for improving the bus dispatching efficiency.
Fig. 1 is a schematic diagram of a scene architecture based on the present disclosure, and as shown in fig. 1, the scene architecture based on the present disclosure may include a people flow rate detection device 1 and a camera 2.
The human traffic detection device 1 is hardware or software that can interact with the camera 2 through a network, and can be used to execute the human traffic detection method described in each embodiment described below.
When the human flow rate detecting device 1 is hardware, it may be an electronic device having an arithmetic function. When the traffic flow rate detection device 1 is software, it may be installed in an electronic device having an arithmetic function. Including but not limited to servers, notebook and desktop computers, and the like.
The camera 2 may be a hardware device having a shooting function, such as a gun camera or a dome camera.
In an actual scene, the people flow detection device 1 can be integrated or installed at a server on the camera 2, the people flow detection device 1 can run on the camera 2, the traffic flow detection device 1 can also be integrated or installed in a server for processing vehicle videos, traffic flow detection service is provided for a bus dispatching system, and at the moment, the camera 2 can be equipment which comprises a gun camera, a ball machine and the like and can communicate with the people flow detection device 1 through a network and perform data interaction. The camera 2 can send the real-time video stream of the bus station to the people flow rate detection device 1, so that the people flow rate detection device 1 can detect the people flow rate of the real-time video stream of the bus station by adopting the method shown in the following.
The following further describes a method, an apparatus, and an electronic device for detecting a pedestrian flow at a bus station, provided by the present application:
example one
Fig. 2 is a schematic flow chart of a passenger flow rate detection method for a bus station according to an embodiment of the present disclosure. As shown in fig. 2, a method for detecting a pedestrian volume at a bus station according to an embodiment of the present disclosure includes:
and S21, acquiring a real-time video image shot by a camera erected at the bus station.
Wherein, the camera can shoot the waiting area of bus station.
In this embodiment, the real-time video stream may be accessed based on the RTSP, and the video decoding API may be invoked to decode the original image data from the real-time video stream data.
And S22, segmenting the real-time video image according to the position of the waiting area in the video image to obtain the real-time video image of the waiting area.
In this embodiment, for the situation that the passengers taking the bus are mainly concentrated in the waiting area, when the real-time video image is preprocessed, only the waiting area part can be reserved, and the real-time video image is divided according to the position of the waiting area in the video picture, so that the advantage of processing is that other invalid areas are prevented from interfering with head detection, and only the flow of people in the target area is concerned.
S23, carrying out human head detection on the real-time video image of the waiting area by utilizing a human head detection network based on an anchor free algorithm which is trained in advance to obtain an initial human head detection frame; the human head detection network based on the Anchor free algorithm takes a MobileNet network added with a channel attention module as a backbone network.
In the embodiment, the constructed human head detection network is constructed based on an anchor free algorithm, the anchor frame generation mode of the anchor free does not need to use kmean clustering to generate the size of the anchor frame, so the generalization is stronger, in order to take account of the accuracy and the real-time performance of human head detection, the human head detection network takes a MobileNet network added with a channel attention module as a main network, mainly the realization of adding an attention mechanism on the basis of the MobileNet, the advantages of the two are combined, the inference time is greatly reduced, and the accuracy is improved by paying attention to the effective area of feature map. The MobileNet can greatly reduce the calculated amount under the condition of neglecting the network precision loss, and improve the network reasoning time. The key of the MobileNet is that a depth separable convolution is designed, the depth separable convolution is composed of depth convolution and point-by-point convolution, and the calculated amount of the depth convolution is DF, DC, CiThe point-by-point convolution is a standard convolution with a convolution kernel of 1 × 1 and the calculated quantity is Ci*CoDF. And the calculated amount of standard convolution DF DC Ci*CoThus, the ratio of the depth-separable convolution to the standard convolution is
Figure BDA0003284919860000061
Where DF is the size of the feature map, DC is the size of the convolution kernel, CiAnd CoThe number of input and output channels respectively. Assuming that the size of the convolution kernel is 3 × 3, i.e. DC is 3, the computation amount of the depth separable convolution is reduced by more than 9 times, and the corresponding inference speed can be increased by about 9 times.
And S24, removing the false-detected human head detection frame in the initial human head detection frame according to a preset duplication-removing rule to obtain a final human head detection frame.
In this embodiment, for a human head detection frame that may have false detection in the initial human head detection frame, the false detection may be removed according to a preset deduplication rule, where the preset deduplication rule is set according to areas of human head detection frames with different heights, and the human head detection frame with a large difference between the area of the human head detection frame and the average value of the areas of the human head detection frames with corresponding heights is removed.
And S25, determining the people flow information of the waiting area of the bus station according to the number of the final people head detection frames.
In this embodiment, the number of the final human head detection frames at the current moment is counted to obtain the human flow information of the waiting area of the bus station.
The embodiment provides a people flow detection method for a bus station, which comprises the steps of acquiring a real-time video image shot by a camera erected on the bus station; dividing the real-time video image according to the position of the waiting area in the video picture to obtain the real-time video image of the waiting area; carrying out human head detection on the real-time video image of the waiting area by utilizing a human head detection network which is trained in advance and is based on an anchor free algorithm to obtain an initial human head detection frame; the human head detection network based on the anchor free algorithm takes a MobileNet network added with a channel attention module as a backbone network; removing the false-detected human head detection frame in the initial human head detection frame according to a preset duplication removing rule to obtain a final human head detection frame; and determining the people flow information of the waiting area of the bus station according to the number of the final people head detection frames. By adopting the technical scheme provided by the disclosure, the real-time detection of the passenger flow of the bus station is realized, data support is provided for bus scheduling, and the accuracy of passenger head detection and the bus scheduling efficiency are improved.
On the basis of the embodiment shown in fig. 2, the embodiment of the present disclosure provides a specific method for segmenting a real-time video image, which further explains the step S22 in the foregoing embodiment, and S22 includes:
s221, configuring image segmentation parameters according to the position of the waiting area in the video picture;
s232, segmenting the real-time video image according to the image segmentation parameters to obtain a real-time video image of a waiting area.
In this embodiment, for the situation that the waiting area is located at different positions of the video picture due to different positions of the cameras erected at different bus stations, corresponding image segmentation parameters can be configured for the different cameras, so that only the waiting area image is reserved in the segmented real-time video image, for example, in the video picture shot by the camera at the bus station 6, the waiting area is located on the left side of the whole video picture, the real-time video image is segmented from the middle position, and the left half part of the real-time video image is reserved and is the real-time video image of the waiting area at the bus station 6; in the video picture shot by the camera of the bus station 8, the waiting area is positioned at one third of the right side of the whole video picture, then the real-time video image is divided from the one third of the right side, and the real-time video image of the left one third of the right side is reserved, namely the real-time video image of the waiting area of the bus station 8.
This technical scheme provides a concrete image segmentation mode on above-mentioned technical scheme's basis, and the benefit that this embodiment set up like this can avoid other invalid areas to produce the interference to the people head detection, only pays close attention to the flow of people in the target area, is favorable to detecting the flow of people of bus station more fast accurately.
On the basis of the embodiment shown in fig. 2, the embodiment of the present disclosure provides a specific method for removing the false detection frame, which further explains the step S24 in the foregoing embodiment, where S24 includes:
s241, removing the overlapped human head detection frames in the initial human head detection frames by adopting a non-maximum value inhibition method to obtain the screened human head detection frames;
s242, classifying the screened human head detection frames according to height information of the human head detection frames in the image to obtain human head detection frame lists with different heights, and calculating average areas of the human head detection frames in the human head detection frame lists with different heights; .
S243, calculating the ratio of the absolute value of the difference between the area of each human head detection frame and the average area of the human head detection frames in the human head detection frame list with different heights to the average area of the human head detection frames;
s244, judging whether the ratio of the absolute value of the difference between the area of each human head detection frame and the average area of the human head detection frames in the human head detection frame list with different heights to the average area of the human head detection frames is larger than a preset threshold value or not;
and S245, if so, deleting the corresponding human head detection frame.
In this embodiment, for a situation that a false-detected human head detection frame exists in an initial human head detection frame, a non-maximum value suppression method may be first used to remove the overlapped human head detection frames, then the human head detection frames detected in the video are classified according to the height information of the human head detection frames in the image, the human head detection frames with the same height are placed in the same list, the average area of the human head detection frames is calculated for the human head detection frames in the same list, an absolute value is obtained after the area of each human head detection frame is differentiated from the average area, the ratio of each absolute value to the average area of the human head detection frames is calculated, if the ratio of the absolute value to the average area of the human head detection frames is greater than a preset threshold, the human head detection frame corresponding to the absolute value is the false-detected human head detection frame, and the above operations are repeated until the calculation of all lists is completed.
This technical scheme provides a concrete mode of getting rid of false retrieval people head and detecting the frame on above-mentioned technical scheme's basis, and the benefit that this embodiment set up like this can get rid of the people head that the false retrieval detected and detect the frame for the flow of people who calculates according to people head detection frame is more accurate.
On the basis of the foregoing embodiment, fig. 3 is a schematic flowchart of a method for training a human head detection network according to an embodiment of the present disclosure, where before the step S21 of acquiring a real-time video image captured by a camera installed at a bus station, the method further includes a training stage of the human head detection network, and as shown in fig. 3, the method includes:
and S31, acquiring the head sample data and the head marking data.
In this embodiment, the human head sample data is human head image data at different shooting angles, and the corresponding human head annotation data is human head frame annotation data corresponding to the human head image data at different shooting angles.
And S32, processing the human head sample data by using a mosaic data enhancement method to obtain human head training data.
In the embodiment, 4 training pictures are combined into one picture by using a mosaic data enhancement method for rich background information, so that the number of the combined image positive samples is greatly increased, the background is also greatly rich, and in the training stage, each back propagation is equivalent to the training of four picture data, so that the training time is greatly reduced, and the detection accuracy is improved.
And S33, training the constructed human head detection network by using the human head training data and the human head marking data to obtain the trained human head detection network.
In the embodiment, the human head training data is input into the human head detection network to be trained, and the human head training data is processed through the human head detection network to be trained to obtain output human head detection frame information; calculating a loss function value according to the output human head detection frame information and human head frame marking data, and reversely transmitting the loss function value to each layer of the human head detection network so as to update weight parameters of each layer according to the loss function value; and repeating the training steps until the human head detection network converges.
When network training is carried out, the matching strategy of the positive and negative samples of the anchor frame anchor can also have important influence on the detection result, a new anchor frame anchor matching rule is designed, the intersection and ratio IOU of the anchor frame anchor and the marking frame ground-truth are used as the basis for matching the anchor frame anchor, the distance between the center point of the anchor frame and the center point of the marking frame ground-truth is also considered as the basis for matching the anchor frame anchor, and the matching rule is specifically as follows: when the anchor frame anchor is matched, calculating the distance between the center point of the anchor frame anchor and the center point of the mark frame ground-route and the intersection ratio IOU of the anchor frame anchor and the mark frame ground-route, and determining the positive sample and the negative sample of the anchor frame anchor according to the preset hyperparameter, the distance between the center point of the anchor frame anchor and the center point of the mark frame ground-route and the intersection ratio IOU of the anchor frame anchor and the mark frame ground-route.
After the people flow information of the waiting area of the bus station is determined, bus times can be scheduled according to the people flow of the bus station, and on the basis of the above embodiment, fig. 4 is a schematic flow chart of another people flow detection method of the bus station provided in the first embodiment of the present disclosure, where the method further includes:
and S26, sending the people flow information to a bus management platform to schedule the bus number in real time.
In this embodiment, the people flow information can be sent to the bus management platform in real time through the network, so that the bus management platform adjusts the bus shift according to the people flow information, and bus scheduling is realized.
Example two
Fig. 5 is a schematic structural diagram of a people flow rate detection device of a bus station according to a second embodiment of the present disclosure, corresponding to the people flow rate detection method of the bus station according to the first embodiment. For ease of illustration, only portions that are relevant to embodiments of the present disclosure are shown. Referring to fig. 5, the passenger flow rate detecting apparatus for a bus station includes:
an obtaining module 51, configured to obtain a real-time video image captured by a camera erected at a bus station;
the segmentation module 52 is configured to segment the real-time video image according to the position of the waiting area in the video picture to obtain a real-time video image of the waiting area;
the detection module 53 is used for performing human head detection on the real-time video image of the waiting area by using a human head detection network based on an anchor free algorithm after being trained in advance to obtain an initial human head detection frame; the human head detection network based on the anchor free algorithm takes a MobileNet network added with a channel attention module as a backbone network;
a screening module 54, configured to remove the false-detection human head detection frame according to the initial human head detection frame and a preset duplication-removal rule, so as to obtain a final human head detection frame;
and the determining module 55 is configured to determine traffic information of the waiting area of the bus station according to the number of the final head detection frames.
The embodiment provides a people flow detection device of a bus station, which is characterized in that a real-time video image shot by a camera erected at the bus station is obtained through an obtaining module; the real-time video image is segmented through a segmentation module according to the position of the waiting area in the video picture to obtain the real-time video image of the waiting area; carrying out human head detection on the real-time video image of the waiting area by using a human head detection network based on an anchor free algorithm which is trained in advance through a detection module to obtain an initial human head detection frame; the human head detection network based on the anchor free algorithm takes a MobileNet network added with a channel attention module as a backbone network; removing the false-detected human head detection frame in the initial human head detection frame through a screening module according to a preset duplication-removing rule to obtain a final human head detection frame; and determining the people flow information of the waiting area of the bus station according to the number of the final people head detection frames by a determination module. By adopting the technical scheme provided by the disclosure, the real-time detection of the passenger flow of the bus station is realized, data support is provided for bus scheduling, and the accuracy of passenger head detection and the bus scheduling efficiency are improved.
Optionally, the segmentation module 52 is specifically configured to:
configuring image segmentation parameters according to the position of a waiting area in a video picture;
and segmenting the real-time video image according to the image segmentation parameters to obtain a real-time video image of a waiting area.
Optionally, the screening module 54 is specifically configured to:
removing the overlapped human head detection frames in the initial human head detection frames by adopting a non-maximum value inhibition method to obtain the screened human head detection frames;
classifying the screened human head detection frames according to the height information of the human head detection frames in the image to obtain human head detection frame lists with different heights, and calculating the average area of the human head detection frames in the human head detection frame lists with different heights; .
Calculating the ratio of the absolute value of the difference between the area of each human head detection frame and the average area of the human head detection frames in the human head detection frame list with different heights to the average area of the human head detection frames;
judging whether the ratio of the absolute value of the difference between the area of each human head detection frame and the average area of the human head detection frames in the human head detection frame lists with different heights to the average area of the human head detection frames is larger than a preset threshold value or not;
and if so, deleting the corresponding human head detection frame.
Optionally, the apparatus further comprises: a network training module 56;
the network training module 56 is specifically configured to obtain human head sample data and human head labeling data; processing the human head sample data by using a mosaic data enhancement method to obtain human head training data; and training the constructed human head detection network by using the human head training data and the human head marking data to obtain the trained human head detection network.
Optionally, the process of training the constructed human head detection network by using the human head training data includes the following rules: when the anchor frame anchor is matched, calculating the distance between the center point of the anchor frame anchor and the center point of the mark frame ground-route and the intersection ratio IOU of the anchor frame anchor and the mark frame ground-route, and determining the positive sample and the negative sample of the anchor frame anchor according to the distance between the center point of the anchor frame anchor and the center point of the mark frame ground-route and the intersection ratio IOU of the anchor frame anchor and the mark frame ground-route according to the preset hyper-parameter.
Optionally, the apparatus further comprises: a sending module 57;
and the sending module 57 is configured to send the people flow information to a bus management platform so as to schedule the bus number in real time.
The product can execute the method provided by any embodiment of the disclosure, and has corresponding functional modules and beneficial effects of the execution method.
EXAMPLE III
Fig. 6 is a schematic structural diagram of an electronic device provided in a third embodiment of the present disclosure, and as shown in fig. 6, an electronic device 60 of this embodiment may include: memory 61, processor 62.
A memory 61 for storing a computer program (such as an application program, a functional module, and the like that implement the pedestrian volume detection method of one of the bus stations described above), computer instructions, and the like;
the computer programs, computer instructions, etc. described above may be stored in one or more memories 61 in partitions. And the computer program, computer instructions, etc. described above may be invoked by the processor 62.
A processor 62 for executing the computer program stored in the memory 61 to implement the steps of the method according to the above embodiments.
Reference may be made in particular to the description relating to the preceding method embodiment.
The memory 61 and the processor 62 may be separate structures or may be an integrated structure integrated together. When the memory 61 and the processor 62 are separate structures, the memory 61 and the processor 62 may be coupled by a bus 63.
The electronic device of this embodiment may execute the technical solution in the method of the first embodiment, and for specific implementation processes and technical principles, reference is made to relevant descriptions in the method of the first embodiment, and details are not described here again.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention. It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some ports, and may be in an electrical, mechanical or other form. Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment. In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims of the present invention.

Claims (9)

1. A people flow detection method of a bus station is characterized by comprising the following steps:
acquiring a real-time video image shot by a camera erected at a bus station;
dividing the real-time video image according to the position of the waiting area in the video picture to obtain the real-time video image of the waiting area;
carrying out human head detection on the real-time video image of the waiting area by utilizing a human head detection network which is trained in advance and is based on an anchor-free algorithm to obtain an initial human head detection frame; the human head detection network based on the anchor-free algorithm takes a MobileNet network added with a channel attention module as a backbone network;
removing the false-detected human head detection frame in the initial human head detection frame according to a preset duplication removing rule to obtain a final human head detection frame;
and determining the people flow information of the waiting area of the bus station according to the number of the final people head detection frames.
2. The people flow detection method according to claim 1, wherein the step of segmenting the real-time video image according to the position of the waiting area in the video picture to obtain the real-time video image of the waiting area comprises the steps of:
configuring image segmentation parameters according to the position of a waiting area in a video picture;
and segmenting the real-time video image according to the image segmentation parameters to obtain a real-time video image of a waiting area.
3. The people flow detecting method according to claim 1, wherein the obtaining of the final head detecting frame according to the initial head detecting frame and the head detecting frame with the preset duplication elimination rule for eliminating the false detection comprises:
removing the overlapped human head detection frames in the initial human head detection frames by adopting a non-maximum value inhibition method to obtain the screened human head detection frames;
classifying the screened human head detection frames according to the height information of the human head detection frames in the image to obtain human head detection frame lists with different heights, and calculating the average area of the human head detection frames in the human head detection frame lists with different heights;
calculating the ratio of the absolute value of the difference between the area of each human head detection frame and the average area of the human head detection frames in the human head detection frame list with different heights to the average area of the human head detection frames;
judging whether the ratio of the absolute value of the difference between the area of each human head detection frame and the average area of the human head detection frames in the human head detection frame lists with different heights to the average area of the human head detection frames is larger than a preset threshold value or not;
and if so, deleting the corresponding human head detection frame.
4. The people flow detection method according to any one of claims 1-3, wherein the acquiring of the real-time video image captured by the camera mounted at the bus station further comprises:
acquiring human head sample data and human head marking data;
processing the human head sample data by using a mosaic data enhancement method to obtain human head training data;
and training the constructed human head detection network by using the human head training data and the human head marking data to obtain the trained human head detection network.
5. The people flow detection method according to claim 4, wherein the process of training the constructed people detection network by using the people training data includes the following rules: when the anchor frame anchor is matched, calculating the distance between the center point of the anchor frame anchor and the center point of the mark frame ground-route and the intersection ratio IOU of the anchor frame anchor and the mark frame ground-route, and determining the positive sample and the negative sample of the anchor frame anchor according to the preset hyperparameter, the distance between the center point of the anchor frame anchor and the center point of the mark frame ground-route and the intersection ratio IOU of the anchor frame anchor and the mark frame ground-route.
6. The human flow detection method according to any one of claims 1-3, wherein the method further comprises:
and sending the people flow information to a bus management platform to schedule the bus number in real time.
7. The utility model provides a people flow detection device at bus station which characterized in that includes:
the acquisition module is used for acquiring a real-time video image shot by a camera erected at a bus station;
the segmentation module is used for segmenting the real-time video image according to the position of the waiting area in the video image to obtain the real-time video image of the waiting area;
the detection module is used for carrying out human head detection on the real-time video image of the waiting area by utilizing a human head detection network which is trained in advance and based on an anchor-free algorithm to obtain an initial human head detection frame; the human head detection network based on the anchor-free algorithm takes a MobileNet network added with a channel attention module as a backbone network;
the screening module is used for removing the false-detected human head detection frame according to the initial human head detection frame and a preset de-weight rule to obtain a final human head detection frame;
and the determining module is used for determining the people flow information of the waiting area of the bus station according to the number of the final people head detecting frames.
8. The people flow detecting device of the bus station as claimed in claim 7, further comprising: a sending module;
and the sending module is used for sending the people flow information to a bus management platform so as to schedule the bus number in real time.
9. An electronic device, comprising: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the people flow detection method of any one of claims 1-6.
CN202111143638.7A 2021-09-28 2021-09-28 People flow detection method and device for bus station and electronic equipment Pending CN113963310A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111143638.7A CN113963310A (en) 2021-09-28 2021-09-28 People flow detection method and device for bus station and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111143638.7A CN113963310A (en) 2021-09-28 2021-09-28 People flow detection method and device for bus station and electronic equipment

Publications (1)

Publication Number Publication Date
CN113963310A true CN113963310A (en) 2022-01-21

Family

ID=79462982

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111143638.7A Pending CN113963310A (en) 2021-09-28 2021-09-28 People flow detection method and device for bus station and electronic equipment

Country Status (1)

Country Link
CN (1) CN113963310A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116994211A (en) * 2023-09-27 2023-11-03 深圳市城市交通规划设计研究中心股份有限公司 Bus stop waiting passenger monitoring method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116994211A (en) * 2023-09-27 2023-11-03 深圳市城市交通规划设计研究中心股份有限公司 Bus stop waiting passenger monitoring method
CN116994211B (en) * 2023-09-27 2024-03-01 深圳市城市交通规划设计研究中心股份有限公司 Bus stop waiting passenger monitoring method

Similar Documents

Publication Publication Date Title
Chen et al. An edge traffic flow detection scheme based on deep learning in an intelligent transportation system
WO2021249071A1 (en) Lane line detection method, and related apparatus
CN111126235A (en) Method and device for detecting and processing illegal berthing of ship
CN112435469B (en) Vehicle early warning control method and device, computer readable medium and electronic equipment
CN105844229A (en) Method and system for calculating passenger crowdedness degree
US20220165064A1 (en) Method for acquiring traffic state, relevant apparatus, roadside device and cloud control platform
CN114926766A (en) Identification method and device, equipment and computer readable storage medium
CN109740479A (en) A kind of vehicle recognition methods, device, equipment and readable storage medium storing program for executing again
Odeh Management of an intelligent traffic light system by using genetic algorithm
CN111967396A (en) Processing method, device and equipment for obstacle detection and storage medium
CN112233428B (en) Traffic flow prediction method, device, storage medium and equipment
CN115082752A (en) Target detection model training method, device, equipment and medium based on weak supervision
CN115953643A (en) Knowledge distillation-based model training method and device and electronic equipment
CN114360261B (en) Vehicle reverse running identification method and device, big data analysis platform and medium
CN106682590B (en) Processing method of monitoring service and server
CN110879990A (en) Method for predicting queuing waiting time of security check passenger in airport and application thereof
CN113963310A (en) People flow detection method and device for bus station and electronic equipment
CN112738725B (en) Real-time identification method, device, equipment and medium for target crowd in semi-closed area
CN112597995B (en) License plate detection model training method, device, equipment and medium
Zheng et al. A deep learning–based approach for moving vehicle counting and short-term traffic prediction from video images
CN116311166A (en) Traffic obstacle recognition method and device and electronic equipment
CN109800685A (en) The determination method and device of object in a kind of video
CN115512263A (en) Dynamic visual monitoring method and device for falling object
CN110942642B (en) Video-based traffic slow-driving detection method and system
CN114419018A (en) Image sampling method, system, device and medium

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