Subway violation warning method based on improved HigherHRNet model and DNN network
Through the improved HigherHRNet model and DNN network, combined with super-resolution processing and double threshold method, the problem of small-scale pedestrian joint point and mask detection in the subway is solved, and accurate violation recognition and posture recognition in the night environment are achieved.
Patent Information
- Application Number
- CN202110643907.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-09
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2041-06-09
AI Technical Summary
Existing technology cannot effectively detect and warn small-scale pedestrian joints and mask-wearing problems in the subway, especially when image recognition errors and pedestrian posture recognition are inaccurate at night.
The improved HigherHRNet model and DNN network are used to identify violations by extracting human joint features, super-resolution processing, double-threshold method to eliminate mirrored figures, PCA dimensionality reduction and MobileNetV2 network, combined with parallel branches of high-resolution network and low-resolution network Perform multi-task recognition.
It achieves the accurate identification of violations and wearing masks in the night subway environment, improves the detection accuracy of key points in small crowds and the generation of high-resolution heat maps, and solves the problems of mirror recognition errors and gesture recognition.
Smart Images

Figure CN113449609B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of public transportation target detection, and in particular to a subway violation warning method based on an improved HigherHRNet model and a DNN network. Background Art
[0002] The HigherHRNet model is currently the most advanced algorithm in the bottom-up multi-person joint point recognition task. The model is not only more accurate in joint point positioning, but also can identify smaller joint points of people in the picture. When it comes to positioning tasks, it is necessary to save the position of the target at high resolution, and then add the position of the target during deconvolution and upsampling, so that the target can be positioned. For example, PersonLab generates high-resolution heat maps by increasing the input resolution, and Hourglass restores high resolution through a symmetric low-to-high process. SimpleBaseline uses a small number of transposed convolution layers to generate high-resolution representations. However, the above methods cannot generate high-resolution heat maps, so they cannot adapt to the current detection and early warning of subway violations (not wearing masks). Summary of the invention
[0003] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and provide a subway violation warning method based on an improved HigherHRNet model and a DNN network.
[0004] The purpose of the present invention can be achieved by the following technical solutions:
[0005] A subway violation warning method based on an improved HigherHRNet model and a DNN network includes the following steps:
[0006] 1) For the subway behavior images to be detected, the HigherHRNet model is constructed to extract the human joint features, including the joint point position features, joint point movement features, and human body movement features;
[0007] 2) constructing a data set based on the extracted human joint features and performing preprocessing;
[0008] 3) Use DNN deep neural network to identify illegal actions in the data set and then determine whether illegal behavior occurs.
[0009] In the step 1), for blurred and unclear images to be detected, super-resolution reconstruction is used to make the resolution of the reconstructed image meet the requirements of the HigherHRNet model.
[0010] In the step 1), when a human figure is reflected in a subway window mirror in a subway car at night, a double threshold method is used to determine whether it is a real person, and the reflected human figure is eliminated.
[0011] The dual threshold method determines whether it is a reflected human figure by connecting the lines between the joint points, and specifically includes the following steps:
[0012] 11) The n joint points I1, I2, I3, ... I corresponding to the human figure or reflected human figure in the image n Connecting n lines, we have:
[0013]
[0014] Among them, S b is the set length threshold. If the sum of the distances between adjacent joint points c1 is greater than the length threshold, it is judged to be a person in reality. If it is less than the length threshold, it is judged to be a reflected shadow.
[0015] 12) Further judgement is performed based on the judgment result of step 11), specifically:
[0016] W x =max(I 1x ,I 2x ,I 3x ...I nx )-min(I 1x ,I 2x ,I 3x ...I nx )
[0017] W y =max(I 1y ,I 2y ,I 3y ...I ny )-min(I 1y ,I 2y ,I 3y ...I ny )
[0018] S=w x *w y
[0019] Among them, w x ,w y are the horizontal and vertical distances of all the node connections, I 1xRepresents the horizontal distance between all nodes, I 1y It represents the longitudinal distance of all the node connections, S is the sum area of all the node connections, and when the sum area of all the node connections is greater than the set threshold, the target is judged to be a real person.
[0020] When regressing joint points, the HigherHRNet model reduces the overlap threshold between the vector ab and the vector ba generated by the two joint points a and b, so that the HigherHRNet model can recognize the lying posture.
[0021] In the step 2), the preprocessing is specifically PCA dimensionality reduction.
[0022] In the step 2), the behavior data sets corresponding to different violations are used as inputs of the DNN deep neural network for training.
[0023] In the identification of illegal actions, data sets of different illegal behaviors are formed by annotating continuous frame image data of videos containing multiple illegal behaviors at the same time.
[0024] For face mask recognition, the joint point detection of the HigherHRNet model is used to obtain the position of a person's eyes, and the face is located based on the position of the eyes. Then the MobileNetV2 network is used to identify whether the person is wearing a mask or not.
[0025] The violations specifically include running, jumping, lying, boxing, kicking, putting feet on seats, pull-ups, smoking and littering.
[0026] Compared with the prior art, the present invention has the following advantages:
[0027] The present invention gives full play to the respective advantages of the HigherHRNet model and the DNN network. On the basis of the HigherHRNet model's accurate identification of joint points and judgment of human portraits, it is combined with the DNN network to accurately and quickly identify violations, solving specific problems such as mirror recognition errors in night pictures, the inability to identify pedestrians lying sideways, and whether pedestrians are wearing masks. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 The figure is a flow chart of the method of the present invention.
[0029] Figure 2 Schematic diagram of the HigherHRNet model structure. DETAILED DESCRIPTION
[0030] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0031] like Figure 1 As shown, the present invention provides a subway violation warning method based on an improved HigherHRNet model and a DNN network. The adopted HigherHRNet is an improvement on HRNet, which solves the problem that the prior art has low accuracy in small-scale pedestrian joint point detection tasks in images. The technical focus is on coping with scale changes, that is, improving the performance of small human bodies without sacrificing the performance of large human bodies and generating high-quality high-resolution heat maps to accurately locate the key points of small crowds.
[0032] Based on deep learning, this paper combines artificial intelligence with image recognition to identify various illegal behaviors on the subway and whether masks are worn, etc., specifically including the following three aspects:
[0033] (1) Detect human joints.
[0034] (2) Obtain the feature vector based on the position information of the joint points of the person and input it into the DNN network to obtain the result;
[0035] (3) Use the MobileNetV2 model to locate the face.
[0036] The present invention uses an improved high-resolution network (HigherHRNet) for human posture recognition, and uses the high-resolution network as a branch to form multiple parallel branch networks in parallel with multiple low-resolution networks. First, the resolution of the image will not decrease on its own branch network. Secondly, each branch network is not fused at the final output, but each network branch continuously interacts, and the high-resolution network provides position information for the low-resolution network, and the low-resolution network provides feature information for the high-resolution network. The human joints obtained by HigherHRNet are used for feature extraction, mainly extracting the joint point position features, joint point movement features, and human body movement features. According to these features, the data set is made, and the features are preprocessed before training, specifically using LDA to reduce the dimensionality of the original 334 features. Finally, the preprocessed features are put into different models for experimental comparison, the accuracy of the model on different evaluation criteria is obtained, and the confusion matrix of each model is drawn. In addition, in terms of mask recognition, the MobileNetV2 model is selected to locate and recognize the face.
[0037] Example
[0038] The present invention first uses the improved HigherHRNet model (such as Figure 2As shown in the figure, the pedestrian joints are detected and a model is constructed. For blurred and unclear images, super-resolution processing is used to make the resolution after reconstruction meet the input requirements of HigherHRNet, so that the network can successfully detect the joints. The present invention respectively adopts the existing super-resolution reconstruction technology bilinear interpolation, bi-trilinear interpolation and deep learning super-resolution technology.
[0039] However, the HigherHRNet model is a product of the laboratory, and its performance in terms of model accuracy is currently the best, especially for the detection of smaller targets in pictures. In addition, it also has good adaptability to light. However, in the subway car, the pictures taken by the camera in the car are not perfect according to the actual situation. For example, at night, the subway window will reflect the shadow of the person. Since the model can adapt to the changes in light, the model will predict the joint points in the mirror. To address this problem, the present invention intends to adopt a dual threshold method to eliminate the human figure reflected in the window based on two thresholds. Specifically, the connection between each joint point is used to determine whether it is a reflection of the mirror. The judgment is divided into two steps. The first step is to connect the n joints in the mirror, and the joint points are represented as I1, I2, I3,...I respectively. n , there are n lines in total, the formula is as follows:
[0040]
[0041] S b The length threshold is set. If the length is greater than the threshold, it is a person in the real world. If the length is less than the threshold, it is a person in the mirror image. After the first step, the second step is performed. The judgment criteria are as follows:
[0042] W x =max(I 1x ,I 2x ,I 3x ...I nx )-min(I 1x ,I 2x ,I 3x ...I nx )
[0043] W y =max(I 1y ,I 2y ,I 3y ...I ny )-min(I 1y ,I 2y ,I 3y ...I ny )
[0044] S=w x *w y , w x ,wy Represents the horizontal and vertical distances of all related nodes, I 1x Represents the horizontal coordinates of all related nodes, I 1y represents the vertical coordinates of all nodes, and S represents the area. Only when the sum of the areas of all the connected lines of the nodes meets the threshold requirement, the target is judged to be a real person.
[0045] When the HigherHRNet model regresses the joint points, the 17 joint points of a target influence each other and are interconnected. This is because each time a joint point a is identified, joint point a will extend to other joint points to form a vector. For example, joint point a extends vector ab to joint point b, and joint point b will also extend vector ba to a. When the overlap between vectors ab and ba is high, the located joint points are considered correct. However, in actual applications, we found that the joint points of the target person will be blocked by objects and cannot be fully detected, which results in the model being inaccurate when regressing the joint points. In addition, the normal training set is basically a standing posture, which results in the model not only being unable to learn the characteristics of people in a lying posture, but also making the joint point regression inaccurate. The present invention reduces the threshold for judging the connection between two joint points in the HigherHRNet model, so that the extension vectors of two joint points that are not completely overlapped can also be output. This threshold represents the overlap between the above-mentioned ab and ba vectors.
[0046] After the above-mentioned joint point detection model is established, the action features are preprocessed through the illegal action recognition model, and PCA dimension reduction is adopted. Since PCA is sorted according to the size of the covariance matrix eigenvalue, the most important part in the front is retained, and the latter dimension is omitted, the dimensionality reduction can be achieved to simplify the model or compress the data, while maintaining the information of the original data to the greatest extent. Due to the diversity of illegal behaviors, the data produced should also be data sets of different actions. Since the recognition of actions requires a large amount of continuous frame image data, the present invention marks a video. First, a variety of uncivilized actions must be included in this video. Secondly, each action must last for a period of time, and it is also necessary to ensure that the time of each action is not too different. Finally, a DNN fully connected network is used for training.
[0047] In terms of face mask recognition, the present invention does not use other face detection models to locate the face, but uses the improved HigherHRNet model's joint point detection technology and the trained MobileNetV2 network for recognition. The data set used in the present invention contains the joint points of the face, including the eyes, nose and ears of the person. These facial features can be recognized even when wearing a mask. When training the joint point model, it is necessary to train the features of the face as joint points, so that the important feature points of the face can be directly obtained, and then the frame of the entire face can be predicted based on these feature points. When the face is blocked by a mask, the HigherHRNet model will detect the eyes of the face. The present invention determines the approximate area of the entire face based on the position of the eyes. The prediction method of the present invention is specifically as follows:
[0048]
[0049]
[0050]
[0051]
[0052] Among them, L low , L up , L left , L right Represent the lower line, upper line, left line and right line of the face rectangle. eyel d eyer Represent the left eye and right eye pixel positions respectively. low d up d left d right The pixel distances between the center point between the two eyes and the lower jaw, the top of the head, the left ear, and the right ear are respectively represented. These pixel positions are obtained by the ratio of the pixel distance to the real distance. The distance between the two eyes is set as the standard d m , the distance from the left eye to the left border is 1.5*d m , the distance from the right eye to the right frame is 1.5*d m , the distance between the top of the head and the center point between the two eyes is 1.5*d m , the distance between the lower jaw and the center point between the two eyes is 2.5*d m Finally, the face positioning map is obtained according to the above method, and then the MobileNetV2 network is used to train and identify whether or not a mask is worn.
Claims
1. A subway violation warning method based on an improved HigherHRNet model and a DNN network, characterized in that: The following steps are involved: 1) For the subway behavior images to be detected, the HigherHRNet model is constructed to extract the human joint features, including the joint point position features, joint point movement features, and human body movement features; 2) constructing a data set after preprocessing based on the extracted human joint features; 3) Use DNN deep neural network to identify illegal actions in the data set and then determine whether illegal behavior occurs; In the step 1), when a person's shadow is reflected in a subway window mirror in a subway car at night, a double threshold method is used to determine whether it is a real person, and the reflected person's shadow is removed; The dual threshold method determines whether it is a reflected human figure by connecting the lines between the joint points, and specifically includes the following steps: 11) The n joint points I1, I2, I3, ... I corresponding to the human figure or reflected human figure in the image n Connecting n lines, we have: Among them, S b is the set length threshold. If the sum of the distances between adjacent joint points c1 is greater than the length threshold, it is judged to be a person in reality. If it is less than the length threshold, it is judged to be a reflected human figure. 12) Further judgement is performed based on the judgment result of step 11), specifically: W x =max(I 1x ,I 2x ,I 3x ...I nx )-min(I 1x ,I 2x ,I 3x ...I nx ) W y =max(I 1y ,I 2y ,I 3y ...I ny )-min(I 1y ,I 2y ,I 3y ...I ny ) S=w x *w y Among them, w x ,w y are the horizontal and vertical distances of all the node connections, I 1x Represents the horizontal distance between all nodes, I 1y represents the longitudinal distance of all the node connections, S is the sum of the areas of all the node connections, and when the sum of the areas of all the node connections is greater than the set threshold, it is determined that the target corresponding to the human joint feature is a real person; When regressing joint points, the HigherHRNet model reduces the overlap threshold between the vector ab and the vector ba generated by the two joint points a and b, so that the HigherHRNet model can recognize the lying posture.
2. According to claim 1, a subway violation warning method based on an improved HigherHRNet model and a DNN network is characterized in that: In the step 1), for blurred and unclear images to be detected, super-resolution reconstruction is used to make the resolution of the reconstructed image meet the requirements of the HigherHRNet model.
3. According to claim 1, a subway violation warning method based on an improved HigherHRNet model and a DNN network is characterized in that: In the step 2), the preprocessing is specifically PCA dimensionality reduction.
4. According to claim 1, a subway violation warning method based on an improved HigherHRNet model and a DNN network is characterized in that: In the step 2), the behavior data sets corresponding to different violations are used as inputs of the DNN deep neural network for training.
5. According to claim 4, a subway violation warning method based on an improved HigherHRNet model and a DNN network is characterized in that: In the identification of illegal actions, data sets of different illegal behaviors are formed by annotating continuous frame image data of videos containing multiple illegal behaviors at the same time.
6. According to claim 1, a subway violation warning method based on an improved HigherHRNet model and a DNN network is characterized in that: For face mask recognition, the joint point detection of the HigherHRNet model is used to obtain the position of a person's eyes, and the face is located based on the position of the eyes. Then, the MobileNetV2 network is used to identify whether the person is wearing a mask or not.
7. According to claim 1, a subway violation warning method based on an improved HigherHRNet model and a DNN network is characterized in that: The violations specifically include running, jumping, lying, boxing, kicking, putting feet on seats, pull-ups, smoking and littering.
