A method for detecting abnormal behavior of factory personnel based on self-supervised learning

By constructing a variety of graph structures and a self-supervised learning method that combines graph convolutional neural networks and 3D convolutional neural networks, it solves the problems of simple abnormal behavior detection methods and low accuracy in the existing technology, and achieves higher behavior detection. Accuracy and small sample data processing capabilities.

CN117935357BActive Publication Date: 2024-09-27QINGDAO UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410059546.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-16
Publication Date
2024-09-27
Estimated Expiration
2044-01-16

AI Technical Summary

Technical Problem

Existing abnormal behavior detection methods based on graph convolution models are relatively simple, have low algorithm accuracy, fail to deeply mine the graph representation of human bones, and perform poorly in small sample cases.

Method used

A method based on self-supervised learning is used to construct four graph structures (graph structures based on distance, second-order nearest distance, texture similarity and motion information), combined with graph convolutional neural network and 3D convolutional neural network, through comparative learning and Temporal convolutional network,extracts features of action frames and predicts them.

Benefits of technology

Through the mining and feature fusion of multiple graph structures, the comprehensiveness and robustness of the description of human postures and movements are improved, the accuracy of behavior detection is improved, and the ability to process small sample data is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117935357B
    Figure CN117935357B
Patent Text Reader

Abstract

The present invention provides a method for detecting abnormal behavior of factory personnel based on self-supervised learning, which specifically includes the following steps: constructing four graph structures, including: a graph structure based on distance, a graph structure based on second-order closest distance, a graph structure based on texture similarity, and a graph structure based on motion information, and extracting features of action frames based on a graph convolutional neural network GCN; extracting features of action frames based on a 3D convolutional neural network; pre-training a graph convolutional neural network model based on contrastive learning and a 3D convolutional neural network model; splicing the features extracted by the 3D convolutional neural network and the graph convolutional neural network, and predicting personnel actions using a temporal convolutional network TCN. The technical solution of the present invention overcomes the problems in the prior art that the abnormal behavior detection method based on the graph convolutional model is relatively simple and the algorithm accuracy is low.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of behavior detection, and in particular to a method for detecting abnormal behavior of factory personnel based on self-supervised learning. Background Art

[0002] The common point of most production processes in industrial production environments is that they rely on production lines. The products are produced through all the processes of the production line in sequence. In the stage where workers need to participate, most of the work is repetitive. However, these tasks are the core of the assembly line production system. Therefore, effective monitoring of workers' work conditions and detection of non-process behaviors are of great significance to improving the production efficiency of factory products.

[0003] At present, there are two main methods for monitoring work actions and behaviors, namely wearable device-based and camera-based action recognition methods. Wearable device-based monitoring methods are limited by the power of mobile devices, the convenience of workers' activities, and the recognition accuracy, and cannot monitor and recognize behaviors on a large scale for a long time. Camera-based action recognition methods are very helpful for quickly and deeply mining high-level information in videos. At the same time, with the development of monitoring equipment, new color depth image cameras are increasingly used in the monitoring field, especially in indoor monitoring. The additional depth information provided by the depth image can more accurately extract the three-dimensional information of the human skeleton, which is used to improve the accuracy and efficiency of human posture and action analysis and recognition.

[0004] At present, many institutions at home and abroad have conducted research on action recognition or abnormal action detection based on color depth image data and deep learning. Skeletal information extracted based on color depth images has become one of the important weights for action recognition. More and more researchers have shifted their focus to skeleton information or multiple information fusion processing. At present, the most commonly used skeleton nodes are still the 20-node skeleton information used by Kinect. In addition, there are also skeleton information composed of 15 nodes or 25 nodes. The feature extraction method of skeleton information is simpler than that of images, but how to design a method that can accurately express action information has also become the key to improving recognition accuracy. For the feature extraction method of skeleton points, the simplest one is to directly use the coordinates of each skeleton node. HOJ3D maps the coordinates of the joint points to a spherical coordinate and generates a feature histogram based on the angle and length of the coordinates. EigenJoints extracts three features, including the static joint point distance, the distance between the joint points of adjacent frames, and the distance between the key points of the current frame and the initial frame, and uses the principal component analysis method for dimensionality reduction. Amir Shahroudy et al. extracted LOP and HON4D features from deep graphs, and integrated the features of skeleton data to propose a hierarchical multi-model multi-part action recognition method. Khaire et al. trained five CNN models corresponding to different images and skeleton data, and proposed a WPM method to achieve multi-model fusion at the decision layer.

[0005] In addition, there are some action recognition methods based on graph convolution. ST-GCN first connects the corresponding positions of the skeleton points of multiple frames in the time dimension to form a more complex spatiotemporal graph structure, and performs convolution operations on this structure. For the selection of receptive field, this method proposes three spatial division methods to mark unused adjacent nodes for convolution. Zhang et al. used the edge as the object of convolution, extracted the direction, length and other features of the edge, performed convolution and fused the vertex convolution to represent the action features. However, this fusion does not consider the direct relationship between points and edges, but only regards them as two independent data streams for fusion.

[0006] In summary, the existing abnormal behavior detection methods based on graph convolution models are relatively simple and fail to dig deeper into human skeleton information. The expression methods for bone data are also relatively simple, and fail to deeply dig into the graph representation method of human skeleton, and the algorithm accuracy is low. Abandoning the existing methods must rely on data collected on-site, but the amount of data in each production environment is relatively small, resulting in poor performance of the algorithm in small sample conditions.

[0007] Therefore, in response to the above problems, the present invention proposes a method for detecting abnormal behavior of factory personnel based on self-supervised learning. Summary of the invention

[0008] The main purpose of the present invention is to provide a method for detecting abnormal behavior of factory personnel based on self-supervised learning, so as to solve the problem that the abnormal behavior detection method based on graph convolution model in the prior art is relatively simple and the algorithm accuracy is low.

[0009] To achieve the above object, the present invention provides a method for detecting abnormal behavior of factory personnel based on self-supervised learning, which specifically comprises the following steps:

[0010] S1, constructs four graph structures, including: graph structure based on distance, graph structure based on second-order nearest distance, graph structure based on texture similarity and graph structure based on motion information, and extracts feature of action frames based on graph convolutional neural network GCN.

[0011] S2, based on 3D convolutional neural network, performs feature extraction on action frames.

[0012] S3, pre-training of graph convolutional neural network model based on contrastive learning and 3D convolutional neural network model.

[0013] S4, the features extracted by 3D convolutional neural network and graph convolutional neural network are spliced, and the temporal convolutional network TCN is used to predict the personnel actions.

[0014] Furthermore, step S1 specifically includes the following steps:

[0015] S1.1, build a distance-based graph structure: define the skeleton node at time t as v i (t), i = 1, 2, 3 ... N, N is the number of nodes, For the bone node v i (t) The corresponding three-dimensional coordinates, for any two nodes v i (t) and v j (t), whether it is connected is defined as formula (1):

[0016]

[0017] Where T location is the threshold of the neighbor distance. According to whether any two nodes are connected, a distance-based connectivity matrix can be constructed, that is, a distance-based graph structure: In the matrix, 1 means that the nodes with the corresponding row and column numbers are connected, and 0 means they are not connected.

[0018] S1.2, construct a graph structure based on the second-order closest distance:

[0019] According to formula (2), the second-order adjacency matrix A is calculated 2-loc (t):

[0020] A temp (t) = A loc (t)×A loc (t)-A loc (t)

[0021]

[0022] Adjacency Matrix A 2-loc (t) means for a certain node v i (t), A temp (t) is the intermediate matrix, whether it is related to node v j (t) connection depends on whether there is a third node v k (t) is also v i (t),v j (t)’s neighboring nodes.

[0023] Furthermore, step S1 further includes the following steps:

[0024] S1.3, constructing a graph structure based on texture similarity:

[0025] The distance method is used to calculate the distance of the EHD features between any two bone nodes as the criterion for connectivity. The calculation method is as follows:

[0026]

[0027] Connectivity(v i (t),v j (t)) EHD Used to describe the bone node v i (t) and v j (t) Whether it is connected; T EHD is the threshold value, EHD(v i (t)) c is the cth interval of the EHD feature extracted for the skeleton node; in order to expand the possibility of connection between nodes, when calculating the distance, as long as the difference between any interval of two EHD features is less than the threshold, they are considered to be connected. i (t),v j (t)) EHD Generate adjacency matrix A EHD .

[0028] S1.4, constructing a graph structure based on motion information:

[0029] For the skeleton node set v at time t i (t)={v1(t),v2(t),v3(t)...v N(t)}, extract the data of m frames before and after to form a skeletal motion sequence For this sequence, calculate each node v i The displacement vector dis generated in the adjacent frames of (t) i (t)=||v i (t)-v i (t-1)||; at the same time, calculate the rotation angle θ(t) of the displacement vector in the x and y planes, as well as the angle between the displacement vector and the z axis The corresponding displacement vector dis i and the angle vector θ i , For any two points i and j in the skeleton node, the correlation coefficient cor() of the displacement vector and the angle vector is calculated according to formula (4), where T dis , T θ , They are the displacement vectors dis i , angle vector θ i , The corresponding threshold is calculated and the adjacency matrix A is generated according to formula (5): mo ;

[0030]

[0031]

[0032]

[0033] Cov(m i ,m j ) is m i With m j The covariance of Var[m i ] is m i The variance of Var[m j ] is m j Variance, Connectivity(v i (t),v j (t)) mo Used to describe the bone node v i (t) and v j (t) Whether connected.

[0034] Furthermore, step S1 further includes the following steps:

[0035] S1.5, use graph convolutional neural network to extract the features of action frames, and use formula (6) to calculate the feature vector:

[0036]

[0037] Among them, H(l) represents the eigenvector matrix of the lth layer, W (l) is the linear transformation matrix of the lth layer, A represents the adjacency matrix, represents the normalized adjacency matrix, σ represents an activation function ReLU; after four graph convolution networks, the L-layer feature matrices of four graph structures after convolution are obtained, which are represented as

[0038] S1.6, for the feature matrix Perform pooling operations separately to obtain the vector representation of the graph, and then concatenate them and pass them through the fully connected layer to obtain the action frame feature f at time t. g (t);

[0039]

[0040] Among them, Pool is the pooling operation, [] is the feature concatenation operation, FC is the fully connected layer, and f g (t) is the graph convolution feature vector.

[0041] Further, step S2 includes the following steps:

[0042] S2.1, for an input human skeleton information, first construct a three-dimensional enclosing area of ​​the human skeleton.

[0043] S2.2, discretize the three-dimensional enclosing area, discretize the human skeleton into a grid shape with an interval of 1 pixel, and use the RGB color in the image as the representation of each pixel to form 3 three-dimensional grids, and then construct a 3-channel original 3D grid of the human skeleton.

[0044] S2.3, use the Gaussian convolution kernel to perform convolution operation on the original 3D grid:

[0045]

[0046]

[0047] Among them, x, y, z are the coordinates of the pixels corresponding to the human bones in the grid, S(x, y, z) defines the calculation method of the Gaussian convolution kernel, σ is the Gaussian variance; Grid_init(x, y, z, t) is the initial value of the grid at time t, and h is the smoothing range.

[0048] For the 3D molecular grid after Gaussian convolution, a three-dimensional convolutional neural network (CNN) is used for feature extraction to obtain the representation vector f of the grid at time t. c (t):

[0049] f c (t) = FC(3DCNN(Grid)) (9);

[0050] Among them, FC is the fully connected layer, Grid t is the grid data at time t, f c (t) is the 3D neural network feature vector.

[0051] Furthermore, step S3 specifically includes the following steps:

[0052] S3.1, convolutional feature vector f g (t) and 3D neural network feature vector f c (t), use formula (10) for contrastive learning:

[0053]

[0054] Among them, l i,j is the contrast loss function, is the cosine similarity, which is used to measure the molecular representation vector z i ,z j The similarity is , τ is the temperature parameter.

[0055] S3.2, the feature vector after contrast learning is then input into the graph convolutional neural network model and the 3D neural network model, and then step S3.1 is continued until the model converges or reaches the preset training rounds.

[0056] Further, step S4 is specifically as follows:

[0057] S4.1, for each frame of the skeleton structure, obtain: the features of the pre-trained graph convolutional neural network model and the features of the pre-trained 3D neural network model, and splice the features.

[0058] S4.2, the concatenated features are input into the temporal convolutional network (TCN) to model and predict the action.

[0059] The present invention has the following beneficial effects:

[0060] The present invention mines the correlation of implicit joint points through a variety of graph structures, in which the static structure describes the human body posture and the dynamic structure describes the movement situation. The two are integrated to improve the comprehensiveness and robustness of feature extraction.

[0061] In order to enrich the spatial representation of human body posture, the present invention adopts a three-dimensional model to extract features of human skeleton information to mine the spatial information of the skeleton.

[0062] The present invention proposes a method based on contrastive learning to fully learn the differences between graph structure and 3D structure, thereby improving the diversity of posture description and the accuracy of behavior detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] In order to more clearly illustrate the specific implementation of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for the specific implementation or the prior art description. Obviously, the drawings described below are some implementations of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0064] Figure 1 The original skeleton data is shown;

[0065] Figure 2 Skeletal data of a distance-based graph structure is shown;

[0066] Figure 3 Skeleton data constructed based on the graph structure of the second-order closest distance is shown;

[0067] Figure 4 Skeleton data constructed based on a graph structure of texture similarity is shown;

[0068] Figure 5 Skeletal data constructed based on a graph structure of motion information is shown;

[0069] Figure 6 A flowchart showing step S1 of a method for detecting abnormal behavior of factory personnel based on self-supervised learning of the present invention is shown;

[0070] Figure 7 The three-dimensional enclosed area of ​​the human skeleton constructed in step S2 of the present invention is shown;

[0071] Figure 8 A flow chart showing step S3 of the present invention is shown;

[0072] Fig. 9 A flow chart showing step S4 of the present invention is shown. DETAILED DESCRIPTION

[0073] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0074] A method for detecting abnormal behavior of factory personnel based on self-supervised learning specifically includes the following steps:

[0075] S1, such as Figure 6As shown in the figure, four graph structures are constructed, including: a graph structure based on distance, a graph structure based on second-order nearest distance, a graph structure based on texture similarity, and a graph structure based on motion information, and feature extraction of action frames is performed based on the graph convolutional neural network GCN.

[0076] S2, based on 3D convolutional neural network, performs feature extraction on action frames.

[0077] S3, pre-training of graph convolutional neural network model based on contrastive learning and 3D convolutional neural network model.

[0078] S4, the features extracted by 3D convolutional neural network and graph convolutional neural network are spliced, and the temporal convolutional network TCN is used to predict the personnel actions.

[0079] Specifically, most of the existing skeleton data are collected from Kinect sensors, which generally contain 20 nodes, including head, neck, shoulder, elbow, hand, spine, leg, foot, etc. These 20 nodes are connected together through actual physical rigid connections, such as the left hand and the left elbow are connected, the neck and the head are connected, Figure 1 However, for graph expression and graph construction, although this connection can reveal the correlation information of the joints to a certain extent, there is also the possibility of correlation between nodes that are not actually connected. For example, when the left hand moves, the right hand may have a corresponding action. Although this action is non-rigid, the introduction of the correlation between the two nodes is helpful for improving the accuracy of action recognition.

[0080] Since the number and position of joint points depend on the capture device, they cannot be adjusted. Therefore, the present invention expresses the correlation of such joint points in the form of edge connections, thereby generating a variety of graph structures. The graph structure is mainly constructed from two aspects: static and dynamic information. Static information can describe the posture of the human body, while dynamic information can be described according to the movement of the previous and next frames. The fusion of the two can describe human body movements in a more comprehensive way. Based on this, the present invention mainly constructs the following four graph structures.

[0081] Step S1 specifically includes the following steps:

[0082] S1.1, for static structures, the proximity of node positions is first considered. Since the human skeleton graph is in Euclidean space, the role of the edge is not only to express the connection relationship of the nodes, but also the distance between the two corresponding points is very important. Therefore, the present invention first uses the proximity of node positions as the standard for graph construction.

[0083] like Figure 2 As shown, we construct a distance-based graph structure: define the skeleton node at time t as v i(t), i = 1, 2, 3 ... N, N is the number of nodes, For the bone node v i (t) The corresponding three-dimensional coordinates, for any two nodes v i (t) and v j (t), whether it is connected is defined as formula (1):

[0084]

[0085] Where T location is the threshold of the neighbor distance. According to whether any two nodes are connected, a distance-based connectivity matrix can be constructed, that is, a distance-based graph structure: In the matrix, 1 means that the nodes with the corresponding row and column numbers are connected, and 0 means they are not connected.

[0086] S1.2, such as Figure 3 As shown, in order to consider a deeper level of connectivity structure, the present invention proposes to construct a graph structure based on the second-order closest distance:

[0087] According to formula (2), the second-order adjacency matrix A is calculated 2-loc (t):

[0088] A temp (t) = A loc (t)×A loc (t)-A loc (t)

[0089]

[0090] Adjacency Matrix A 2-loc (t) means for a certain node v i (t), A temp (t) is the intermediate matrix, whether it is related to node v j (t) connection depends on whether there is a third node v k (t) is also v i (t),t j The second-order connectivity considers the deeper relationship between nodes, which can make the convolution area cover more information during the graph convolution calculation process.

[0091] Specifically, in addition to the position, image information is also introduced into the graph construction process. In order to reduce the number of convolution channels in the graph convolution process, the present invention extracts the edge histogram (EHD) as a feature for the area around the joint point. The edge histogram is divided into 5 intervals representing four different types of edges and irregular edges. Step S1 also includes the following steps:

[0092] S1.3, such as Figure 4As shown, a graph structure based on texture similarity is constructed:

[0093] The distance method is used to calculate the distance of the EHD features between any two bone nodes as the criterion for connectivity. The calculation method is as follows:

[0094]

[0095] Connectivity(v i (t),v j (t)) EHD Used to describe the bone node v i (t) and v j (t) Whether it is connected; T EHD is the threshold value, EHD(v i (t)) c is the cth interval of the EHD feature extracted for the skeleton node; in order to expand the possibility of connection between nodes, when calculating the distance, as long as the difference between any interval of two EHD features is less than the threshold, they are considered to be connected. i (t),v j (t)) EHD Generate adjacency matrix A EHD .

[0096] S1.4, such as Figure 5 As shown, a graph structure based on motion information is constructed:

[0097] In addition to static features, the relationship between adjacent frames is also very important for action recognition. The present invention mainly extracts two dynamic features, namely, motion angle and motion length. i (t)={v1(t),v2(t),v3(t)...v N (t)}, extract the data of m frames before and after to form a skeletal motion sequence For this sequence, calculate each node v i The displacement vector dis generated in the adjacent frames of (t) i (t)=||v i (t)-v i (t-1)||; at the same time, calculate the rotation angle θ(t) of the displacement vector in the x and y planes, as well as the angle between the displacement vector and the z axis The corresponding displacement vector dis i and the angle vector θ i , For any two points i and j in the skeleton node, the correlation coefficient cor() of the displacement vector and the angle vector is calculated according to formula (4), where T dis , Tθ , They are the displacement vectors dis i , angle vector θ i , The corresponding threshold is calculated and the adjacency matrix A is generated according to formula (5): mo ;

[0098]

[0099]

[0100] Cov(m i ,m j ) is m i With m j The covariance of Var[m i ] is m i The variance of Var[m j ] is m j Variance, Connectivity(v i (t),v j (t)) mo Used to describe the bone node v i (t) and v j (t) Whether connected.

[0101] All features used to construct the graph structure, such as coordinates, texture information, and displacement information, will be used as features in the graph convolution process. Figure 5 As shown in the figure, there are isolated subgraphs or isolated points. Isolated points and isolated subgraphs are also an expression of skeleton information. During the convolution process, the features of this node are marked by filling 0.

[0102] The present invention constructs four graph structures, so the final model is the concatenation and fusion of the output features of the four models obtained after graph convolution, and the final features are output through a fully connected layer.

[0103] Specifically, step S1 also includes the following steps:

[0104] S1.5, use graph convolutional neural network to extract the features of action frames, and use formula (6) to calculate the feature vector:

[0105]

[0106] Among them, H (l) represents the eigenvector matrix of the lth layer, w (l) is the linear transformation matrix of the lth layer, A represents the adjacency matrix, represents the normalized adjacency matrix, σ represents an activation function ReLU; after four graph convolution networks, the L-layer feature matrices of four graph structures after convolution are obtained, which are represented as

[0107] S1.6, for the feature matrix Perform pooling operations separately to obtain the vector representation of the graph, and then concatenate them and pass them through the fully connected layer to obtain the action frame feature f at time t. g (t);

[0108]

[0109] Among them, Pool is the pooling operation, [] is the feature concatenation operation, FC is the fully connected layer, and f g (t) is the graph convolution feature vector.

[0110] Specifically, for the acquired human skeleton data, the three-dimensional coordinates of each skeleton point can be obtained, so the feature representation is performed in the form of constructing a three-dimensional grid.

[0111] Step S2 includes the following steps:

[0112] S2.1, for an input human skeleton information, first construct a three-dimensional enclosing area of ​​the human skeleton. This area is the smallest three-dimensional rectangular box that completely contains the target object, such as Figure 7 shown.

[0113] S2.2, after the three-dimensional enclosing area is constructed, the three-dimensional enclosing area is discretized according to 128 pixels × 32 pixels × 32 pixels, and the human skeleton is discretized into a grid shape with an interval of 1 pixel. Each pixel is represented by the RGB color in the image to form 3 three-dimensional grids, and then the 3-channel original 3D grid of the human skeleton is constructed.

[0114] S2.3, in order to solve the problem that the available data in the original grid is too sparse, the original 3D grid is convolved using a Gaussian convolution kernel:

[0115]

[0116]

[0117] Among them, x, y, z are the coordinates of the pixels corresponding to the human bones in the grid, S(x, y, z) defines the calculation method of the Gaussian convolution kernel, σ is the Gaussian variance; Grid_init(x, y, z, t) is the initial value of the grid at time t, and h is the smoothing range.

[0118] For the 3D molecular grid after Gaussian convolution, a three-dimensional convolutional neural network (CNN) is used for feature extraction to obtain the representation vector f of the grid at time t. c (t):

[0119] f c (t) = FC(3DCNN(Grid)) (9);

[0120] Among them, FC is the fully connected layer, Grid t is the grid data at time t, f c (t) is the 3D neural network feature vector.

[0121] Specifically, Figure 8 As shown, for the human features f at time t obtained by graph convolution g (t), and the human features f at time t obtained by 3DCNN c (t) Performing contrastive learning. In order to better improve the comprehensiveness of human features, the present invention introduces a contrastive learning process, the purpose of which is to maximize the similarity of representation vectors generated by different views at the same time. The contrast loss used by the model is NT-Xent loss, and the difference of representation vectors generated by views with different features is maximized. Step S3 specifically includes the following steps:

[0122] S3.1, convolutional feature vector f g (t) and 3D neural network feature vector f c (t), use formula (10) for contrastive learning:

[0123]

[0124] Among them, l i,j is the contrast loss function, is the cosine similarity, which is used to measure the molecular representation vector z i ,z j The similarity is , τ is the temperature parameter.

[0125] S3.2, the feature vector after contrast learning is then input into the graph convolutional neural network model and the 3D neural network model, and then step S3.1 is continued until the model converges or reaches the preset training rounds.

[0126] Specifically, Fig. 9 As shown, step S4 is specifically as follows:

[0127] S4.1, for each frame of the skeleton structure, obtain: the features of the pre-trained graph convolutional neural network model and the features of the pre-trained 3D neural network model, and splice the features.

[0128] S4.2, the concatenated features are input into the temporal convolutional network (TCN) to model and predict the action.

[0129] Through comparative learning, the feature representations of 3D-CNN and GCN for individual motion frames can be learned. On this basis, the feature representations of the skeletal structure of each frame are obtained respectively, and the splicing and fusion are used as the features of a frame. At the same time, a temporal convolutional network (TCN) network is constructed to model the entire action and make predictions. The present invention actively collects video sequences of workers working in an industrial environment, and marks the video sequences. Video sequences with abnormal behaviors, including rapid movements, falls, waving, sitting for a long time, and normal video sequences are used as data sets. 80% of them are used for training and 20% for testing. The model has been trained to realize abnormal behavior detection of factory personnel.

[0130] Of course, the above description is not a limitation of the present invention, and the present invention is not limited to the above examples. Changes, modifications, additions or substitutions made by technicians in this technical field within the essential scope of the present invention should also fall within the protection scope of the present invention.

Claims

1. A method for detecting abnormal behavior of factory personnel based on self-supervised learning, characterized in that: The specific steps include: S1, construct four graph structures, including: graph structure based on distance, graph structure based on second-order closest distance, graph structure based on texture similarity, and graph structure based on motion information, and extract the features of action frames based on graph convolutional neural network GCN; S2, based on 3D convolutional neural network, extracts features from action frames; S3, pre-training of graph convolutional neural network model and 3D convolutional neural network model based on contrastive learning; S4, concatenates the features extracted by the 3D convolutional neural network and the graph convolutional neural network, and uses the temporal convolutional network TCN to predict the person’s actions; Step S1 specifically includes the following steps: S1.1, build a distance-based graph structure: define the skeleton node at time t as v i (t), i = 1, 2, 3 ... N, N is the number of nodes, For the bone node v i (t) corresponds to the three-dimensional coordinates, for any two nodes vi(t) and v j (t), whether it is connected is defined as formula (1): Where T location is the threshold of the neighbor distance. According to whether any two nodes are connected, a distance-based connectivity matrix can be constructed, that is, a distance-based graph structure: In the matrix, 1 means that the nodes with the corresponding row and column numbers are connected, and 0 means that they are not connected; S1.2, construct a graph structure based on the second-order closest distance: According to formula (2), the second-order adjacency matrix A is calculated 2-loc (t): A temp (t)=A loc (t)×A loc (t)-A loc (t) Adjacency Matrix A 2-loc (t) means for a certain node v i (t), A temp (t) is the intermediate matrix, whether it is related to node v j (t) connection depends on whether there is a third node v k (t) is also v i (t),v j The neighboring nodes of (t); Step S1 also includes the following steps: S1.3, constructing a graph structure based on texture similarity: The distance method is used to calculate the distance of the EHD features between any two bone nodes as the criterion for connectivity. The calculation method is as follows: COnnectivity(v i (t),v j (t)) EHD Used to describe the bone node v i (t) and v j (t) Whether it is connected; T EHD is the threshold value, EHD(v i (t)) c is the cth interval of the EHD feature extracted for the skeleton node; in order to expand the possibility of connection between nodes, when calculating the distance, as long as the difference between any interval of two EHD features is less than the threshold, they are considered to be connected. i (t),v j (t)) EHD Generate adjacency matrix A EHD ; S1.4, constructing a graph structure based on motion information: For the skeleton node set v at time t i (t)={v1(t),v2(t),v3(t)...v N (t)}, extract the data of m frames before and after to form a skeletal motion sequence For this sequence, calculate each node v i The displacement vector dis generated by (t) in the adjacent frame i (t)=||v i (t)-v i (t-1)||; at the same time, calculate the rotation angle θ(t) of the displacement vector in the x and y planes, as well as the angle between the displacement vector and the z axis The corresponding displacement vector dis i and the angle vector For any two points i and j in the skeleton node, the correlation coefficient cor( ) of the displacement vector and the angle vector is calculated according to formula (4), where T dis , T θ , They are the displacement vectors dis i , angle vector The corresponding threshold is calculated and the adjacency matrix A is generated according to formula (5): mo ; Cov(m i ,m j ) is m i With m j The covariance of Var[m i ] is m i The variance of Var[m j ] is m j The variance of connectivity(v i (t),v j (t)) mo Used to describe the bone node v i (t) and v j (t) Whether connected.

2. According to the method for detecting abnormal behavior of factory personnel based on self-supervised learning in claim 1, it is characterized in that: Step S1 also includes the following steps: S1.5, use graph convolutional neural network to extract the features of action frames, and use formula (6) to calculate the feature vector: Among them, H (l) represents the eigenvector matrix of the lth layer, W (l) is the linear transformation matrix of the lth layer, A represents the adjacency matrix, represents the normalized adjacency matrix, σ represents an activation function ReLU; after four graph convolution networks, the L-layer feature matrices of four graph structures after convolution are obtained, which are represented as S1.6, for the feature matrix Perform pooling operations separately to obtain the vector representation of the graph, and then concatenate them and pass them through the fully connected layer to obtain the action frame feature f at time t. g (t); Among them, Pool is the pooling operation, [ ] is the feature concatenation operation, FC is the fully connected layer, and f g (t) is the graph convolution feature vector.

3. The method for detecting abnormal behavior of factory personnel based on self-supervised learning according to claim 1, characterized in that: Step S2 includes the following steps: S2.1, for an input human skeleton information, first construct a three-dimensional enclosing region of the human skeleton; S2.2, discretize the three-dimensional enclosing area, discretize the human skeleton into a grid shape with an interval of 1 pixel, each pixel is represented by the RGB color in the image, and three three-dimensional grids are formed, thereby constructing a three-channel original 3D grid of the human skeleton; S2.3, use the Gaussian convolution kernel to perform convolution operation on the original 3D grid: Among them, x, y, z are the coordinates of the pixels corresponding to the human skeleton in the grid, S(x, y, z) defines the calculation method of the Gaussian convolution kernel, σ is the Gaussian variance; Grid_init(x, y, z, t) is the initial value of the grid at time t, and h is the smoothing range; For the 3D molecular grid after Gaussian convolution, a three-dimensional convolutional neural network (CNN) is used for feature extraction to obtain the representation vector f of the grid at time t. c (t): f c (t)=FC(3DCNN(Grid t )) (9); Among them, FC is the fully connected layer, Grid t is the grid data at time t, f c (t) is the 3D neural network feature vector.

4. The method for detecting abnormal behavior of factory personnel based on self-supervised learning according to claim 1, characterized in that: Step S3 specifically includes the following steps: S3.1, convolutional feature vector f g (t) and 3D neural network feature vector f c (t), use formula (10) for contrastive learning: Among them, l i,j is the contrast loss function, is the cosine similarity, which is used to measure the molecular representation vector z i ,z j The similarity of , τ is the temperature parameter; S3.2, the feature vector after contrast learning is then input into the graph convolutional neural network model and the 3D neural network model, and then step S3.1 is continued until the model converges or reaches the preset training rounds.

5. The method for detecting abnormal behavior of factory personnel based on self-supervised learning according to claim 1, characterized in that: Step S4 is specifically as follows: S4.1, for each frame of the skeleton structure, respectively obtain: the features of the pre-trained graph convolutional neural network model and the features of the pre-trained 3D neural network model, and splice the features; S4.2, the concatenated features are input into the temporal convolutional network (TCN) to model and predict the action.