Summary of the invention
The present invention is intended to provide a kind of action identification method and device, solve the action classification identification of current bone sequence not
Accurate problem.
According to an aspect of the present invention, a kind of action identification method is provided, comprising:
Obtain the skeleton data of object to be identified during exercise in video;
The bone sequence of the object to be identified is generated according to the skeleton data;
Skeleton character image corresponding with the bone sequence is generated, includes several bones in the skeleton character image
Point;
Skeleton character image is input to default convolutional neural networks model to classify, is obtained and the skeleton character figure
Corresponding action classification.
Further, skeleton character image corresponding with the bone sequence is generated, comprising:
The three-dimensional point coordinate of bone sequence in frame image every in video is arranged as Three-channel data according to preset order;
The Three-channel data is sequentially arranged as triple channel matrix;
The triple channel matrix is normalized, skeleton character image is obtained.
Further, the triple channel matrix is normalized, obtains skeleton character image, comprising:
The normalization is shown below:
Wherein,For the pixel value at position coordinates (i, j) on c-th of channel of skeleton character image;WithPoint
Not Wei on c-th of channel of skeleton character image pixel minimum value and maximum value;Round () is bracket function.
Further, skeleton character image default convolutional neural networks model is input to classify, obtain with it is described
The corresponding action classification of skeleton character figure, comprising:
Utilize the feature of skeleton character image described in default convolutional neural networks model extraction;
Using full articulamentum by the Feature Conversion be feature vector;
Determine that the type of the skeleton character image, the type are the object to be identified according to described eigenvector
Action classification.
According to a further aspect of the invention, it discloses a kind of action recognition devices, comprising:
Module is obtained, for obtaining the skeleton data of object to be identified during exercise in video;
Generation module, for generating the bone sequence of the object to be identified according to the skeleton data;
Characteristic image module, for generating skeleton character image corresponding with the bone sequence, the skeleton character figure
It include several skeleton points as in;
Determining module is classified for skeleton character image to be input to default convolutional neural networks model, obtain with
The corresponding action classification of the skeleton character figure.
Further, the characteristic image module includes:
First sorting sub-module, for by the three-dimensional point coordinate of bone sequence in frame image every in video according to preset order
It is arranged as Three-channel data;
Second sorting sub-module, for being sequentially arranged the Three-channel data for triple channel matrix;
It normalizes submodule and obtains skeleton character image for the triple channel matrix to be normalized.
Further, the normalization submodule, is used for,
The normalization is shown below:
Wherein,For the pixel value at position coordinates (i, j) on c-th of channel of skeleton character image;WithPoint
Not Wei on c-th of channel of skeleton character image pixel minimum value and maximum value;Round () is bracket function.
Further, the determining module includes:
Extracting sub-module, for the feature using skeleton character image described in default convolutional neural networks model extraction;
Transform subblock is used to using full articulamentum be feature vector by the Feature Conversion;
Submodule is determined, for determining that the type of the skeleton character image, the type be according to described eigenvector
The action classification of the object to be identified.
The beneficial effect of the technical program is compared with the immediate prior art:
Technical solution provided by the invention obtains the skeleton data of object to be identified during exercise in video, then by bone
Bone data are converted to the bone sequence of object to be identified, then bone sequence is converted to skeleton character image, are set using preset
Switching network is ranked up all skeleton points in skeleton character image, finally using convolutional neural networks to the bone after sequence
Characteristic image is classified, and motion characteristic corresponding with the skeleton character figure is obtained.The present invention will turn the problem of action recognition
The problem of being melted into the classification of bone sequence image, is converted to skeleton character image for bone sequence, then again to skeleton character image
Classification, so that identification is more accurate, it is more efficient.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is
A part of the embodiments of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people
Member's every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
As shown in Figure 1, process is as follows the present invention provides a kind of action identification method:
S101, the skeleton data of object to be identified during exercise in video is obtained;
S102, the bone sequence that the object to be identified is generated according to the skeleton data;
S103, skeleton character image corresponding with the bone sequence is generated, includes several in the skeleton character image
A skeleton point;
S104, skeleton character image is input to default convolutional neural networks model classifies, obtain and the bone
The corresponding action classification of characteristic pattern.
In the embodiment of the present application, the skeleton data of object to be identified during exercise in video is obtained, then by bone
Data are converted to the bone sequence of object to be identified, then bone sequence is converted to skeleton character image, finally utilize convolution mind
Classify through network to skeleton character image, obtains motion characteristic corresponding with the skeleton character figure.The present invention will act
The problem of identification, is converted to the problem of bone sequence image classification, and bone sequence is converted to skeleton character image, then right again
Skeleton character image classification, so that identification is more accurate, it is more efficient.
In some embodiments of the present application, the bone sequence v of a T frame, in t frame, the seat of k-th of skeleton point are given
Mark is expressed asWherein, t ∈ [1,2 ..., T], k ∈ [1,2 ..., N], N represent the number of skeleton point in a frame
Mesh.The skeleton data of t frame is expressed as St={ J1,J2,…,JN}.Generate skeleton character image corresponding with the bone sequence
Mainly include three steps:
Step 1: the three-dimensional point coordinate of bone sequence in frame image every in video is arranged as triple channel according to preset order
Data;
Step 2: being sequentially arranged the Three-channel data for triple channel matrix;
Step 3: the triple channel matrix is normalized, skeleton character image is obtained.
In step 1, regard the coordinate (x, y, z) of three dimensions as three channels.By taking x dimension as an example, by StIn x
Dimension value according to a predefined sequence O=(o1,o2,…,ok,…,oK) it is arranged as a feature vector, obtain spy
Levy vector ftX channel characteristics vector ft x, whereinThe O that puts in order is determined
Skeleton point closes on relationship in the picture.In step 2, by the triple channel skeleton character of all framesAccording to time elder generation
It is sequentially arranged as the matrix M an of triple channel afterwards.By taking the channel x as an example,The size of M be 3 × T ×
K, wherein T is the length of video sequence, and K is the length of O of putting in order.
In step 3, M is normalized as the following formula, is quantified as a RGB image I:
Wherein,For the pixel value at position coordinates (i, j) on c-th of the channel image I;WithRespectively bone
The minimum value and maximum value of pixel on c-th of channel of characteristic image;Round () is bracket function.By to the element in matrix
The minimum value in channel is subtracted, then is normalized divided by value variable quantity maximum in all channels.Then value is quantified
To the section of [0,255].
In some embodiments of the present application, skeleton character image is input to default convolutional neural networks model and is divided
Class obtains action classification corresponding with the skeleton character figure, comprising:
Utilize the feature of skeleton character image described in default convolutional neural networks model extraction;
Using full articulamentum by the Feature Conversion be feature vector;
Determine that the type of the skeleton character image, the type are the object to be identified according to described eigenvector
Action classification.
Based on identical inventive concept, the present invention also provides a kind of action recognition devices, comprising:
Module is obtained, for obtaining the skeleton data of object to be identified during exercise in video;
Generation module, for generating the bone sequence of the object to be identified according to the skeleton data;
Characteristic image module, for generating skeleton character image corresponding with the bone sequence, the skeleton character figure
It include several skeleton points as in;
Determining module is classified for skeleton character image to be input to default convolutional neural networks model, obtain with
The corresponding action classification of the skeleton character figure.
Optionally, the characteristic image module includes:
First sorting sub-module, for by the three-dimensional point coordinate of bone sequence in frame image every in video according to preset order
It is arranged as Three-channel data;
Second sorting sub-module, for being sequentially arranged the Three-channel data for triple channel matrix;
It normalizes submodule and obtains skeleton character image for the triple channel matrix to be normalized.
Optionally, the normalization submodule, is used for,
The normalization is shown below:
Wherein,For the pixel value at position coordinates (i, j) on c-th of channel of skeleton character image;WithPoint
Not Wei on c-th of channel of skeleton character image pixel minimum value and maximum value;Round () is bracket function.
Optionally, the determining module includes:
Extracting sub-module, for the feature using skeleton character image described in default convolutional neural networks model extraction;
Transform subblock is used to using full articulamentum be feature vector by the Feature Conversion;
Submodule is determined, for determining that the type of the skeleton character image, the type be according to described eigenvector
The motion characteristic of the object to be identified.
Particular embodiments described above has carried out further in detail the purpose of the present invention, technical scheme and beneficial effects
Describe in detail bright, it should be understood that the above is only a specific embodiment of the present invention, is not intended to restrict the invention, it is all
Within the spirit and principles in the present invention, any modification, equivalent replacement, improvement and so on should be included in protection of the invention
Within the scope of.