Railway station crowd anomaly detection method and system based on sparse feature tracking and neural network, and readable medium
By applying sparse feature tracking and neural network methods in the detection of population abnormalities in railway stations, the problem of difficult to balance detection accuracy and efficiency in the existing technology is solved, accurate and accurate detection of abnormal behavior of populations is achieved, and the railway system is improved Security and operational efficiency.
Patent Information
- Application Number
- CN202411582455.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-02-18
AI Technical Summary
The existing railway station population abnormality detection methods are difficult to achieve a balance of accuracy and efficiency in real-time monitoring, resulting in poor detection results.
Using a method based on sparse feature tracking and neural network, classification and abnormal detection of population state is realized through video image preprocessing, local feature extraction, sparse feature tracking, Delaunay triangulation and descriptor generation.
Accurate detection and real-time response to abnormal behaviors of people at railway stations has been achieved, and the safety and operational efficiency of the railway system have been improved.
Smart Images

Figure CN119478831A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method, a system and a readable medium for detecting abnormal crowds in railway stations based on sparse feature tracking and neural networks, and belongs to the technical field of railway integrated video monitoring. Background Art
[0002] With the rapid development of computer and network technology, video surveillance technology continues to improve and improve. Digital and networked monitoring systems have achieved high-definition image quality, convenient storage and retrieval functions, as well as real-time monitoring and remote access capabilities. They have gradually become mainstream and have been widely used in various security monitoring fields, including railway safety. The railway integrated video surveillance system can monitor all parts of the railway system, including trains, tracks, and stations, in real time through real-time monitoring and remote management; at the same time, through the networked system, operation and maintenance personnel can conveniently remotely access and manage monitoring data, discover and handle problems in a timely manner, and the transportation efficiency and safety of the railway system have been greatly improved.
[0003] With the popularization of railway integrated video surveillance systems, their functions are constantly being improved on the basis of the original video surveillance functions. Especially with the rapid development of machine learning and big data technologies, more and more intelligent auxiliary detection functions based on images and videos, such as intrusion detection and image quality diagnosis, have been developed and applied to railway video surveillance. By automatically discovering and reporting potential security issues through analysis of surveillance videos, the safety and operational efficiency of the railway system have been further improved.
[0004] In the intelligent auxiliary detection function based on images and videos, the analysis and detection of crowd behavior is of great significance. Since railway stations and platforms are crowded places, there are scenes of large crowds in the monitoring screen of the railway system, which provides a lot of data for the analysis of crowd behavior; at the same time, in such crowded places, safety accidents such as crowding and trampling are prone to occur. The analysis of crowd behavior can timely discover and report accidents and effectively prevent safety problems; in addition, when other safety accidents such as natural disasters occur, the crowds in stations and platforms will also show abnormal behaviors such as running and crowding, which can also be detected by the crowd behavior analysis algorithm, so that management personnel can respond in time. Summary of the invention
[0005] In view of the above problems, the purpose of the present invention is to propose a railway station crowd anomaly detection method, system and readable medium based on sparse feature tracking and neural network, which adopts targeted crowd behavior descriptors and classifiers with low performance requirements to achieve a balance between detection accuracy and detection efficiency, and form a detection method suitable for real-time railway station monitoring.
[0006] To achieve the above-mentioned purpose, the present invention proposes the following technical scheme: a method for detecting abnormal crowds in railway stations based on sparse feature tracking and neural networks, comprising the following steps: acquiring video images and preprocessing the video images; extracting the coordinates of multiple key points from the preprocessed video images through local feature extraction; obtaining the movement trajectory of the key points between adjacent video frames through sparse feature tracking; generating a triangular mesh based on the key points on each frame through the Delaunay triangulation method, wherein the key points are vertices and the relationship between adjacent key points is an edge; generating a descriptor based on the triangular mesh, and converting the multi-dimensional descriptor into a low-dimensional crowd status classification result.
[0007] Furthermore, the video images are based on the CUHK crowd dataset, which contains crowd videos of various densities and perspectives collected from different environments, with sufficient scene diversity and a large number of video clips; and video clips in indoor scenes are added to the CUHK crowd dataset, as well as crowd videos from multiple perspectives in railway stations and railway platforms collected from multiple stations by the railway video surveillance system, the videos including video clips of static crowd gathering, chaotic crowd gathering, flowing crowd gathering and dispersed crowd; and at the same time, some additional abnormal situation video clips are simulated and shot in indoor scenes and added to the dataset.
[0008] Furthermore, the preprocessing includes video key frame selection, grayscale processing, noise reduction and video segmentation in sequence, dividing the video into segments of fixed length.
[0009] Furthermore, the video segmentation is achieved by creating a buffer to batch process and detect videos of fixed length, or by setting a window with a fixed number of frames and sliding the window by continuously inputting frames, and processing and detecting video segments in each window respectively.
[0010] Furthermore, the local feature extraction adopts the AKAZE feature extraction method; the sparse feature tracking adopts the Lucas-Kanade optical flow method.
[0011] Furthermore, the descriptors include: movement speed, degree of change of movement direction, stability, collectivity, conflict, local density and unity.
[0012] Furthermore, the calculation formula of the moving speed is:
[0013]
[0014] The calculation formula for the change in moving direction is:
[0015]
[0016] Among them, d θ The calculation method is:
[0017]
[0018] The stability calculation formula is:
[0019]
[0020] The calculation formula of the collectivity is:
[0021]
[0022] The calculation formula of the conflict is:
[0023]
[0024] The calculation formula of the local density is:
[0025]
[0026] The calculation formula of the unity is:
[0027]
[0028] in:
[0029]
[0030] in, The coordinates of the i-th key point in the k-th frame, t is the interval between two frames after downsampling; for the calculation formula of the degree of change in the moving direction, use The data in the frame and the short period of time before this frame are calculated. (The length of this short period of time depends on the frame rate. That is, since the descriptor of the kth frame needs to be calculated, the selected time cannot be too long. Too long will cause the calculation result to describe a video instead of a certain frame. At the same time, the calculation time needs to be long enough to ensure that enough video frames are covered to provide the data required for calculation. After completing the time period selection, the selected time period is divided into F segments, that is, F is the total number of frames after downsampling in this period of time, and t is the unit interval of downsampling in this period of time, that is, the 0th frame, the tth frame, the 2tth frame, etc. are selected from the data before downsampling as samples.) are the coordinates of the i-th key point in the kt-th frame, the k-ft-th frame, and the k-(f-1)t-th frame, respectively. F is the total number of frames after downsampling in the short period before the k-th frame. In the calculation formula for the change in moving direction, By summing up, we calculated the angles between the moving speeds in two adjacent frames after downsampling from f=0, f=1, f=2, ..., to f=F-2. d(θ) is the sum of the angles between the moving speeds in two adjacent frames after downsampling. f represents the current frame in the summation process, i.e., the 0th frame, the 1st frame, the 2nd frame, ..., until the F-2th frame after downsampling. θ(a) and θ(b) are the angles between any two vectors a and b representing the moving speed and the x-axis, respectively. middle, Represent the moving speed of the i-th key point in the k-ft frame and the k-(f+1)t frame respectively, Then it is the change in the direction of the moving speed between the k-ft frame and the k-(f+1)t frame; is the kth frame with The n-order group with the center point is is the number of pixels in the previous frame after downsampling. The n-order group with the center point; d H (X,Y) is the Hausdorff distance between the coordinate sets X and Y, is the set of key point coordinates in the selected conflict candidates; σ is the bandwidth of the selected two-dimensional Gaussian kernel; N is the set of all key points, N i is a set of key points in a cluster.
[0031] Furthermore, the crowd state classification includes: static crowd gathering: there is an area in the video where a large number of people gather, and the movement of the gathered crowd is small; chaotic crowd gathering: there is an area in the video where a large number of people gather, and the movement pattern of the gathered crowd is chaotic; flowing crowd gathering: there is an area in the video where a large number of people gather, and the movement direction of the gathered crowd is unified and the movement speed is fast; scattered crowd: there is a situation in the video where a large number of people scatter away from a certain area; no abnormality occurs, and the multi-layer perceptron neural network is used to obtain the crowd state classification result.
[0032] The present invention also discloses a railway station crowd anomaly detection system based on sparse feature tracking and neural network, comprising: an image acquisition module, used for acquiring video images and preprocessing the video images; a local feature extraction module, used for extracting the coordinates of multiple key points from the preprocessed video images through local feature extraction; a sparse feature tracking module, used for obtaining the movement trajectory of the key points between adjacent video frames through sparse feature tracking; a spatial relationship acquisition module, used for generating a triangular mesh according to the key points on each frame through the Delaunay triangulation method, wherein the key points are vertices and the relationship between adjacent key points is an edge; and a state classification module, used for generating a descriptor according to the triangular mesh, and converting the multi-dimensional descriptor into a low-dimensional crowd state classification result.
[0033] The present invention also discloses a computer-readable storage medium, on which a computer program is stored. The computer program is executed by a processor to implement any of the above-mentioned methods for detecting abnormal crowds in railway stations based on sparse feature tracking and neural networks.
[0034] The technical solution of the present invention has at least the following technical effects or advantages: the present invention collects videos close to the monitoring situation of railway stations through the existing video surveillance system to form a training data set suitable for abnormal detection of crowds in railway stations; adopts targeted crowd behavior descriptors and classifiers with low computing performance requirements to achieve a balance between detection accuracy and detection efficiency, and form a detection method suitable for real-time railway station monitoring; by introducing intelligent crowd anomaly detection methods into railway safety management, possible abnormal crowd behaviors can be automatically detected and management personnel can be notified, which makes up for the uncertainty and lag of manual management to a certain extent and improves the safety of railway management. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is a flow chart of a method for detecting abnormal crowds in railway stations based on sparse feature tracking and neural networks in one embodiment of the present invention. DETAILED DESCRIPTION
[0036] In order to enable those skilled in the art to better understand the technical solution of the present invention, the present invention is described in detail through specific embodiments. However, it should be understood that the provision of specific embodiments is only for a better understanding of the present invention, and they should not be understood as limitations of the present invention. In the description of the present invention, it should be understood that the terms used are only for the purpose of description and cannot be understood as indicating or implying relative importance.
[0037] In order to solve the problem of the lack of a railway station crowd anomaly detection method that takes into account both accuracy and detection efficiency in the prior art, the present invention proposes a railway station crowd anomaly detection method, system and readable medium based on sparse feature tracking and neural network, which is based on sparse feature tracking and neural network, combined with a railway station monitoring video data set, preprocesses and extracts features from the video in the data set, generates descriptors, and classifies the crowd status based on the descriptors. It proposes to introduce an intelligent method for railway station crowd anomaly detection into the railway system, to replace manual labor with machines to a certain extent, so as to improve the efficiency of responding to potential accidents in the operation of the railway system; it provides an efficient railway station crowd anomaly detection method based on sparse feature tracking and multi-layer perceptron neural network, so as to realize real-time crowd anomaly detection of railway station video surveillance. The scheme of the present invention is described in detail below through embodiments.
[0038] Embodiment 1
[0039] This embodiment discloses a method for detecting abnormal crowds in railway stations based on sparse feature tracking and neural networks. Figure 1 As shown, the following steps are included:
[0040] S1 collects video images and preprocesses the video images.
[0041] The video images are based on the CUHK (Chinese University of Hong Kong) crowd dataset, which contains crowd videos of various densities and perspectives collected from different environments, with sufficient scene diversity and a large number of video clips. For the application of crowd anomaly detection in railway stations, this embodiment adds indoor scenes such as video clips in railway stations, shopping malls, and airports to the CUHK crowd dataset. In addition, the dataset adds crowd videos of multiple perspectives in railway stations and railway platforms collected by the railway video surveillance system from multiple stations. The videos include video clips of crowd stagnation, i.e. static gathering of crowds, conflict events, i.e. chaotic gathering of crowds, crowd running, i.e. flowing gathering of crowds, and crowd running, i.e. dispersing crowds. In order to enrich the video clips of abnormal conditions, this embodiment also simulates and shoots some additional abnormal video clips in indoor scenes and adds them to the dataset. The screened and expanded data are fully close to the crowd status and abnormal event types in railway stations to ensure the effectiveness and pertinence of the trained detection model.
[0042] Preprocessing includes video key frame selection, grayscale processing, noise reduction, etc. The preprocessed video frames have the characteristics of small data volume and uniform format, which is convenient for subsequent feature extraction. When processing the video dataset for model training, the video is segmented after the above preprocessing, and the video used for training is divided into fixed-length segments to create a balanced and manageable dataset, ensuring that the training samples have a consistent time window, which is convenient for the subsequent generation of descriptors.
[0043] Video segmentation is achieved by creating a buffer to batch process and detect videos of fixed length, or by setting a window with a fixed number of frames and sliding the window by continuously inputting frames, processing and detecting the video segments in each window separately. The latter has better real-time performance, but requires greater computing overhead, and needs to be chosen according to actual needs in the application.
[0044] This step is the basic processing before the video is subjected to crowd anomaly detection. It can effectively show the distribution characteristics of the crowd in the video and facilitate the processing of subsequent steps.
[0045] S2 extracts the coordinates of multiple key points from the preprocessed video image through local feature extraction.
[0046] The local feature extraction adopts the AKAZE feature extraction method. The AKAZE feature extraction method is an algorithm for image feature extraction and description. It can detect images and obtain feature points with scale invariance and rotation invariance. It accelerates the nonlinear diffusion process through the fast display diffusion method to quickly generate a scale space. AKZAZE provides sufficient robustness while achieving higher computational efficiency. It is suitable for large-scale video and image processing, and can realize real-time video processing, balancing video processing effects and computational efficiency. After the AKAZE feature extraction method, the video clip will be converted into the coordinates of multiple extracted key points and the low-level descriptors corresponding to each key point to represent the visual information of the area around the key point.
[0047] S3 obtains the movement trajectory of key points between adjacent video frames through sparse feature tracking.
[0048] Sparse feature tracking uses the Lucas-Kanade optical flow method. The Lucas-Kanade optical flow method is widely used in the field of computer vision to track moving objects. It obtains the moving trajectory of key points between adjacent video frames through video clips and key points in the previous step.
[0049] S4 generates a triangular mesh based on the key points on each frame through the Delaunay triangulation method, with the key points as vertices and the relationship between adjacent key points as edges.
[0050] The spatial relationship is represented by the Delaunay triangulation method. The key points in each frame are connected by Delaunay triangulation to generate a triangular mesh. The key points are vertices, the neighboring relationships of the key points are edges, and the vertex sets are groups. The vertex set is a mesh structure composed of any vertices connected to each other. For the kth frame, the coordinates of the i-th feature point are represented as a two-dimensional vector The n-th order community centered on the i-th feature point is represented as the set of key point coordinates contained in the community The important structures and interaction patterns of key points are obtained based on the triangular mesh for subsequent crowd behavior analysis.
[0051] S5 generates descriptors based on the triangular mesh and converts the multi-dimensional descriptors into low-dimensional crowd status classification results.
[0052] Descriptors capture the more complex structures and patterns in the video, describe the key information in the video in a more general form, and are suitable for the analysis of crowd behavior. In this embodiment, the descriptors include: movement speed, degree of change in movement direction, stability, collectivity, conflict, local density and unity, so as to achieve a more comprehensive description of crowd behavior.
[0053] The moving speed indicates the moving speed of a key point. It is obtained by calculating the Euclidean distance of the coordinate change of the key point per unit time between adjacent frames. Moving speed The calculation formula is:
[0054]
[0055] Change degree of moving direction: indicates the moving direction of a key point. It is obtained by calculating the change in speed direction of the key point per unit time over a period of time. Change of moving direction The calculation formula is:
[0056]
[0057] Among them, d θ The calculation method is:
[0058]
[0059] Stability indicates the degree of change in the topological structure of a group of keypoints. It is obtained by calculating the Hausdorff distance of the group in the Denaulay triangulation between adjacent frames. The calculation formula is:
[0060]
[0061] Collectivity indicates the deviation of a key point from the overall movement direction of all key points in its group. The mean deviation between the movement direction of a key point and other key points in its group is calculated between adjacent frames. The smaller the value, the more consistent the movement direction of the key point is with that of the group. The calculation formula is:
[0062]
[0063] Conflict indicates the degree of conflict between the movement directions of key points in a group centered on a key point. By screening key points (i.e. conflict candidates) in a group centered on a key point between adjacent frames that conflict with the displacement direction of the central key point, and calculating the mean deviation of the movement direction of the central key point and these conflict candidates, the smaller the value, the smaller the conflict between the movement directions of the key points in the group centered on the key point. The calculation formula is:
[0064]
[0065] The local density represents the density of key points in a community centered on a key point. It is expressed by calculating the kernel density within the community using a two-dimensional Gaussian kernel. The larger the value, the greater the local density. The calculation formula is:
[0066]
[0067] Uniformity refers to the uniformity of the key points in spatial distribution. All key points are divided into multiple clusters through a distance-based clustering algorithm, that is, N = {N1, N2, ..., N m}, where N is the set of all key points, N i The difference between the coordinate distance between clusters and the coordinate distance within a cluster is calculated by normalization. The larger the value, the more uniform the spatial distribution of the key points in the cluster, that is, the key points in the cluster are closer to each other and farther away from the key points outside the cluster. i ) is calculated as:
[0068]
[0069] in:
[0070]
[0071] in, The coordinates of the i-th key point in the k-th frame, t is the interval between two frames after downsampling; for the calculation formula of the degree of change in the moving direction, use The data in the frame and the short period of time before this frame are calculated. (The length of this short period of time depends on the frame rate. That is, since the descriptor of the kth frame needs to be calculated, the selected time cannot be too long. Too long will cause the calculation result to describe a video instead of a certain frame. At the same time, the calculation time needs to be long enough to ensure that enough video frames are covered to provide the data required for calculation. After completing the time period selection, the selected time period is divided into F segments, that is, F is the total number of frames after downsampling in this period of time, and t is the unit interval of downsampling in this period of time, that is, the 0th frame, the tth frame, the 2tth frame, etc. are selected from the data before downsampling as samples.) are the coordinates of the i-th key point in the kt-th frame, the k-ft-th frame, and the k-(f-1)t-th frame, respectively. F is the total number of frames after downsampling in the short period before the k-th frame. In the calculation formula for the change in moving direction, By summing up, we calculated the angles between the moving speeds in two adjacent frames after downsampling from f=0, f=1, f=2, ..., to f=F-2. d(θ) is the sum of the angles between the moving speeds in two adjacent frames after downsampling. f represents the current frame in the summation process, i.e., the 0th frame, the 1st frame, the 2nd frame, ..., until the F-2th frame after downsampling. θ(a) and θ(b) are the angles between any two vectors a and b representing the moving speed and the x-axis, respectively. middle, Represent the moving speed of the i-th key point in the k-ft frame and the k-(f+1)t frame respectively, Then it is the change in the direction of the moving speed between the k-ft frame and the k-(f+1)t frame; is the kth frame with The n-order group with the center point is is the number of pixels in the previous frame after downsampling. The n-order group with the center point; d H (X,Y) is the Hausdorff distance between the coordinate sets X and Y, is the set of key point coordinates in the selected conflict candidates; σ is the bandwidth of the selected two-dimensional Gaussian kernel; N is the set of all key points, N i is a set of key points in a cluster.
[0072] Among the above descriptors, the degree of change of movement speed and movement direction mainly describes the changes of individual characteristics over time, while stability, collectivity, conflict, local density and uniformity mainly describe the relationship between individuals in the crowd and the changes of the overall characteristics of the crowd over time.
[0073] The generated descriptors are processed by dimensionality reduction, and the multi-dimensional descriptors are converted into low-dimensional crowd status classification results. In this embodiment, a multi-layer perceptron neural network is used to obtain the crowd status classification results. The complexity of the multi-layer perceptron is low and suitable for real-time processing requirements. Specifically, multiple descriptors are converted into multi-layer perceptron inputs through feature splicing and standardization, and the output of multiple perceptrons is the classification result.
[0074] Combined with the possible risk accidents faced by railway station monitoring, the crowd states are classified into: static crowd gathering: there are areas with large crowds in the video, and the crowds move less; chaotic crowd gathering: there are areas with large crowds in the video, and the movement patterns of the crowds are chaotic; flowing crowd gathering: there are areas with large crowds in the video, and the crowds move in a unified direction and at a fast speed; scattered crowd: there are large crowds in the video that leave a certain area; no abnormality, no video of the first four situations is detected, that is, no large crowds and abnormal crowd behavior appear in the video. Therefore, the output result of the multi-layer perceptron is a five-dimensional vector, which represents the probability score of an input video under the five categories of the above crowd states.
[0075] Embodiment 2
[0076] Based on the same inventive concept, this embodiment also discloses a railway station crowd anomaly detection system based on sparse feature tracking and neural network, including:
[0077] An image acquisition module is used to acquire video images and pre-process the video images;
[0078] A local feature extraction module is used to extract the coordinates of multiple key points from the preprocessed video image through local feature extraction;
[0079] A sparse feature tracking module is used to obtain the movement trajectory of key points between adjacent video frames through sparse feature tracking;
[0080] The spatial relationship acquisition module is used to generate a triangular mesh based on the key points on each frame through the Delaunay triangulation method, where the key points are vertices and the relationship between adjacent key points is an edge;
[0081] The state classification module is used to generate descriptors based on triangular meshes and convert multi-dimensional descriptors into low-dimensional crowd state classification results.
[0082] Embodiment 3
[0083] Based on the same inventive concept, this embodiment discloses a computer-readable storage medium, on which a computer program is stored, and the computer program is executed by a processor to implement any of the above-mentioned methods for detecting abnormal crowds in railway stations based on sparse feature tracking and neural networks.
[0084] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0085] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0086] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0087] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0088] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit them. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation of the present invention can still be modified or replaced by equivalents, and any modification or equivalent replacement that does not deviate from the spirit and scope of the present invention should be included in the protection scope of the claims of the present invention. The above content is only a specific implementation of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or replacements within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A method for detecting abnormal crowds in railway stations based on sparse feature tracking and neural networks, characterized in that: The following steps are involved: Capturing video images and preprocessing the video images; The pre-processed video image is subjected to local feature extraction to extract the coordinates of multiple key points; Obtaining the moving trajectory of the key point between adjacent video frames through sparse feature tracking; According to the key points on each frame, a triangular mesh is generated by using a Delaunay triangulation method, wherein the key points are vertices and the relationship between adjacent key points is an edge; A descriptor is generated according to the triangular mesh, and the multi-dimensional descriptor is converted into a low-dimensional crowd status classification result.
2. The method for detecting abnormal crowds in railway stations based on sparse feature tracking and neural network as claimed in claim 1, characterized in that: The video images are based on the CUHK crowd dataset, which contains crowd videos of various densities and perspectives collected from different environments, with sufficient scene diversity and a large number of video clips; and adding video clips of indoor scenes and crowd videos from multiple perspectives in railway stations and railway platforms collected by the railway video surveillance system from multiple stations to the CUHK crowd dataset, wherein the videos include video clips of static crowd gathering, chaotic crowd gathering, flowing crowd gathering, and dispersed crowd; At the same time, some additional abnormal situation video clips were simulated and shot in indoor scenes and added to the dataset.
3. The railway station crowd anomaly detection method based on sparse feature tracking and neural network as claimed in claim 2, characterized in that: The preprocessing includes video key frame selection, grayscale processing, noise reduction and video segmentation in sequence, dividing the video into segments of fixed length.
4. The railway station crowd anomaly detection method based on sparse feature tracking and neural network as claimed in claim 3, characterized in that: The video segmentation is achieved by creating a buffer to batch process and detect videos of fixed length, or by setting a window with a fixed number of frames and sliding the window by continuously inputting frames, and processing and detecting video segments in each window respectively.
5. The railway station crowd anomaly detection method based on sparse feature tracking and neural network as claimed in claim 1, characterized in that: The local feature extraction adopts the AKAZE feature extraction method; the sparse feature tracking adopts the Lucas-Kanade optical flow method.
6. The method for detecting abnormal crowds in railway stations based on sparse feature tracking and neural network as claimed in claim 1, characterized in that: The descriptors include: movement speed, degree of change in movement direction, stability, collectivity, conflict, local density and unity.
7. The method for detecting abnormal crowds in railway stations based on sparse feature tracking and neural network as claimed in claim 6, characterized in that: The calculation formula of the moving speed is: The calculation formula for the change in moving direction is: Among them, d θ The calculation method is: The stability calculation formula is: The calculation formula of the collectivity is: The calculation formula of the conflict is: The calculation formula of the local density is: The calculation formula of the unity is: in: in, is the coordinate of the i-th key point in the k-th frame, and t is the interval between two frames after downsampling; are the coordinates of the i-th key point in the kt-th frame, the k-ft-th frame, and the k-(f-1)t-th frame, respectively. F is the total number of frames after downsampling in the short period before the k-th frame. θ(a) and θ(b) are the angles between any two vectors a and b representing the moving speed and the x-axis, respectively. is the kth frame with The n-order group with the center point is is the number of pixels in the previous frame after downsampling. The n-order group with the center point, d H (X,Y) is the Hausdorff distance between the coordinate sets X and Y, is the set of key point coordinates in the selected conflict candidates; σ is the bandwidth of the selected two-dimensional Gaussian kernel; N is the set of all key points, N i is a set of key points in a cluster.
8. The method for detecting abnormal crowds in railway stations based on sparse feature tracking and neural network as claimed in claim 1, characterized in that: The crowd state classification includes: static crowd gathering: there is an area in the video where a large number of people gather, and the movement of the gathered crowd is small; chaotic crowd gathering: there is an area in the video where a large number of people gather, and the movement pattern of the gathered crowd is chaotic; flowing crowd gathering: there is an area in the video where a large number of people gather, and the movement direction of the gathered crowd is unified and the movement speed is fast; scattered crowd: there is a situation in the video where a large number of people scatter away from a certain area; no abnormality occurs, and the crowd state classification result is obtained using a multi-layer perceptron neural network.
9. A railway station crowd anomaly detection system based on sparse feature tracking and neural network, characterized in that: include: An image acquisition module, used for acquiring video images and preprocessing the video images; A local feature extraction module is used to extract the coordinates of multiple key points from the preprocessed video image through local feature extraction; A sparse feature tracking module, used for obtaining the moving trajectory of the key point between adjacent video frames through sparse feature tracking; A spatial relationship acquisition module, used to generate a triangular mesh according to the key points on each frame by using a Delaunay triangulation method, wherein the key points are vertices and the relationship between adjacent key points is an edge; The state classification module is used to generate a descriptor based on the triangular mesh and convert the multi-dimensional descriptor into a low-dimensional crowd state classification result.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the railway station crowd anomaly detection method based on sparse feature tracking and neural network as described in any one of claims 1 to 8.