Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides a live broadcast body-building method, a live broadcast body-building system, electronic equipment and a storage medium, which are used for converting a student body-building video of a student into student body-building data through an action error correction recognition algorithm and displaying the student body-building video on a training side device, so that student body-building data of a plurality of students can be displayed on the training side device at the same time, and a training person can intuitively obtain more student body-building data.
According to one aspect of the present invention, there is provided a live fitness method comprising:
collecting training body-building videos of a training machine through training end equipment, and forwarding the training body-building videos to a plurality of student end equipment in real time for playing;
Collecting a student fitness video of a student through student end equipment;
determining a current target action based on the trainer exercise video;
acquiring a current action to be detected based on the student body-building video;
performing action recognition and error correction based on the current target action and the current action to be detected to obtain student body-building data corresponding to the student body-building video; and
and providing the student fitness data of the plurality of student fitness videos acquired by the plurality of student side devices respectively to the coach side device for display.
Optionally, the student body-building data at least includes error types of the current action to be tested in the student body-building video, and the error types with the largest number in the student body-building data of the student body-building videos respectively collected by the plurality of student end devices are displayed to the coach end device.
Optionally also comprises
According to the error type with the largest number, a prestored correction video corresponding to the error type is called;
and sending the corrected video to student side equipment with the student fitness data of the error type for playing.
Optionally, the student fitness data further includes an action score of a current action to be measured in the student fitness video, the action score is calculated based on a matching degree between the current action to be measured and the current target action, and the live-broadcast fitness method further includes:
And according to the error type with the largest number, the student body-building video collected by the student end equipment with the student body-building data with the lowest action score in the student body-building data with the error type is called for the coach to perform action correction.
Optionally, the body image of the trainer is obtained from the training exercise video by matting, the body image of the learner is obtained from the extracted student exercise video by matting, the body image of the learner is superimposed into the training exercise video and played at the training end device, the body image of the trainer is superimposed into the extracted student exercise video and played at the student end device with the wrong type of student exercise data.
Optionally, after the body image of the coach is superimposed on the invoked student fitness video, the method further comprises:
determining an overlay location between the physical image of the trainer and the physical image of the learner;
mapping the overlapping position to a target position of a wearing device of a trainee, the wearing device including a plurality of tactile sensors;
such that a tactile sensor located at a target location of the trainee's wearing device provides a tactile signal to the trainee.
Optionally, the student fitness data at least includes an error type of the current motion to be measured in the student fitness video and a motion score of the current motion to be measured in the student fitness video, and the student fitness data is displayed on the coach side device in a form of a table.
Optionally, the performing action recognition and error correction based on the current target action and the current action to be measured includes:
a. determining a target action, wherein the target action at least comprises a target action stage, each target action stage is split into a plurality of target part actions, the target part actions comprise 5 body part actions and at least one random part action according to body parts, and the body parts comprise: a left arm, a right arm, a left leg, a right leg, and a torso, the randomized region being comprised of selected at least two skeletal points in the body part,
the random part action at least corresponds to one or more process-oriented recognition items, each recognition item comprises a recognition object, a recognition parameter, a recognition rule and a standard skeleton point coordinate library, the recognition object comprises a vector formed by at least two skeleton points of the random part in the process-oriented recognition item, and the standard skeleton point coordinate library stores standard coordinates of all skeleton points in the target action in time sequence;
b. dividing the motion to be detected into at least one motion stage to be detected according to the time of the target motion stage of the target motion, and forming a matching group by the target motion stage and the motion stage to be detected of the corresponding time;
d. In each matching group, dividing the to-be-detected action stage into corresponding to-be-detected part actions according to the target part actions of the target action stage, and forming a part matching group by the to-be-detected part actions of the to-be-detected action stage and the target part actions of the corresponding target action stage;
e. for each part matching group, at least acquiring an identification item of random part action in target part action, acquiring vectors formed by at least two selected bone points in the part action to be detected according to the two-dimensional bone action model, and carrying out matching calculation on the vectors of the random part action and standard vectors formed by corresponding standard coordinates in a standard bone point coordinate library so as to compare the vectors with a vector threshold set by the identification parameter, so as to acquire action identification feedback;
f. and integrating the action recognition feedback of at least one matching group to obtain the action recognition feedback of the action to be detected.
According to another aspect of the present invention, there is also provided a live fitness system comprising:
the training end device is used for collecting training body-building videos of a training;
the student end device is used for collecting student body-building videos of students;
the forwarding module is used for forwarding the training body-building video to a plurality of student side devices in real time for playing;
The determining module is used for determining the current target action based on the coach body-building video;
the first acquisition module is used for acquiring the current action to be detected based on the student body-building video;
the second acquisition module is used for performing action recognition and error correction based on the current target action and the current action to be detected to acquire student fitness data corresponding to the student fitness video; and
and the sending module is used for providing the student body-building data of the plurality of student body-building videos acquired by the plurality of student end devices to the coach end device for display.
According to still another aspect of the present invention, there is also provided an electronic apparatus including: a processor; a storage medium having stored thereon a computer program which, when executed by the processor, performs the steps as described above.
According to a further aspect of the present invention there is also provided a storage medium having stored thereon a computer program which, when executed by a processor, performs the steps as described above.
Compared with the prior art, the invention converts the student body-building video of the student into the student body-building data through the action error correction recognition algorithm, and displays the student body-building data on the training side equipment, so that the training side equipment can display the student body-building data of a plurality of students at the same time, and the training can intuitively obtain more student body-building data.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted. Some of the block diagrams depicted in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software or in one or more hardware modules or integrated circuits or in different networks and/or processor devices and/or microcontroller devices.
Referring first to fig. 1, fig. 1 shows a flow chart of a live fitness method according to an embodiment of the present invention.
Fig. 1 shows a total of 6 steps:
step S11: collecting training body-building videos of a training machine through training end equipment, and forwarding the training body-building videos to a plurality of student end equipment in real time for playing;
step S12: collecting a student fitness video of a student through student end equipment;
step S13: determining a current target action based on the trainer exercise video;
step S14: acquiring a current action to be detected based on the student body-building video;
step S15: performing action recognition and error correction based on the current target action and the current action to be detected to obtain student body-building data corresponding to the student body-building video; and
step S16: and providing the student fitness data of the plurality of student fitness videos acquired by the plurality of student side devices respectively to the coach side device for display.
Therefore, according to the live broadcast body-building method provided by the invention, the student body-building video of the student is converted into the student body-building data through the action error correction recognition algorithm, and the student body-building data is displayed on the training side equipment, so that the student body-building data of a plurality of students can be displayed on the training side equipment at the same time, and a training person can intuitively obtain more student body-building data.
In a specific embodiment of the present invention, the student fitness data at least includes an error type of the current motion to be measured in the student fitness video and a motion score of the current motion to be measured in the student fitness video, and the student fitness data is displayed on the training side device (as shown in fig. 2) in a form of a table, so that the training side device does not need to display student fitness videos of multiple students, but can provide student fitness data to the training side only through characters, and the training side can obtain more student fitness data at the same time and is more visual. The present invention is not limited by the tabular form or the display layout of fig. 2.
In a specific embodiment of the present invention, the student fitness data at least includes error types of the current motion to be measured in the student fitness video, and the most error types in the student fitness data of the student fitness videos respectively collected by the plurality of student end devices are displayed to the coach end device. In the embodiment of fig. 2, the error type is the most number of errors 2, so that the current target action with the greatest number of coaches can be informed by highlighting, amplifying, playing voice, etc., so that the coaches can give important instruction and explanation through live broadcasting.
In the above embodiment of the present invention, the live fitness method may further include the steps of: according to the error type with the largest number, a prestored correction video corresponding to the error type is called; and sending the corrected video to student side equipment with the student fitness data of the error type for playing. The corrected video may be pre-recorded and stored in the learner-side device/cloud platform according to different error types, so as to facilitate retrieval and playing when the error type is the largest. The error correction video can be suspended at the corners of the live video of the student side equipment so as to avoid affecting the live video; the live video can be replaced to be played so as to carry out targeted error correction, and damage caused by action errors is avoided.
In the above embodiment of the present invention, the student fitness data further includes an action score of a current action to be measured in the student fitness video, the action score is calculated based on a matching degree between the current action to be measured and the current target action, and the live-broadcast fitness method further includes the following steps: and according to the error type with the largest number, the student body-building video collected by the student end equipment with the student body-building data with the lowest action score in the student body-building data with the error type is called for the coach to perform action correction. Therefore, through interaction between a coach and a student with the lowest score, people participating in live broadcasting are enabled to have more participation feeling, and experience of gym lessons is more closed. In this embodiment, before invoking the video of the learner-side device, an inquiry option is preferably provided, and the invoking is performed only when the learner agrees to forward its video. In this embodiment, in order to eliminate the trainees who do not perform exercises on the trainee-side apparatus, the score lower limit may also be set to the lowest score, that is, only the trainee exercise video of the trainee whose action score is greater than the score lower limit and whose action score is the lowest in the error type is called. The lower score limit may be set to, for example, 0 score, 5 score, 10 score, or the like, and the present invention is not limited thereto.
In the above embodiment of the present invention, the method may further include the steps of: the training method comprises the steps of picking pictures from training exercise videos to obtain body images of a training aid, picking pictures from the picked training exercise videos to obtain body images of a training aid, overlapping the body images of the training aid into the training exercise videos, playing the training aid by aid of training aid equipment, overlapping the body images of the training aid into the picked training aid exercise videos, and playing the training aid by aid of training aid equipment with wrong training aid exercise data. Referring to fig. 3 and fig. 4, the body image of the trainer 6 is obtained from the training exercise video of the trainer 6 by matting, the body image of the learner 7 is obtained from the extracted training exercise video by matting, the body image of the learner 7 obtained from the extracted training exercise video by matting is superimposed into the video data of the trainer 6 and is played in the display device 1 of the training end device of the trainer 6; the physical image of the trainer 6 is superimposed on the video data of the trainee 7 and played on the display screen 4 of the trainee 7 (the display screen 4 of the trainee-side device described herein may be the display screen 4 of all the trainee-side devices having the error type). Therefore, for students and coaches, visual error correction experience can be realized, and the calculated amount of the modes of drawing and superposition is small, so that the method is beneficial to use in live scenes.
In the above embodiment of the present invention, after the body image of the trainer is superimposed on the invoked training video, the method may further include the following steps: determining an overlay location between the physical image of the trainer and the physical image of the learner; mapping the overlapping position to a target position of a wearing device of a trainee, the wearing device including a plurality of tactile sensors; such that a tactile sensor located at a target location of the trainee's wearing device provides a tactile signal to the trainee. The haptic signal may be, for example, a weak current signal, or other physical signal that mimics the sense of touch. Thus, by further approaching the real-world fitness experience.
According to another aspect of the present invention, there is also provided a live fitness system, see fig. 3. The live exercise system may include a trainer-side device (including the collecting device 2 and the display device 1, where the collecting device 2 and the display device 1 may be separate devices or may be integrated together), a learner-side device (including the collecting device 5 and the display device 4, where the collecting device 5 and the display device 4 may be separate devices or may be integrated together), a forwarding module, a determining module, a first acquiring module, a second acquiring module, and a transmitting module (the forwarding module, the determining module, the first acquiring module, the second acquiring module, and the transmitting module may be integrated in the cloud server 3, or may be partially integrated in the trainer-side device and the learner-side device, which is not limited in this aspect of the invention.
The acquisition device 2 of the coaching end device is used for acquiring coaching exercise videos of the coaching and the display device 1 is used for displaying an interface as shown in fig. 2 (only schematically). The collecting device 5 of the student end equipment is used for collecting student fitness videos of students, and the display device 4 is used for displaying training fitness videos. And the forwarding module is used for forwarding the training body-building video to a plurality of student side devices in real time for playing. The determining module is used for determining the current target action based on the coach body-building video. The first acquisition module is used for acquiring the current action to be detected based on the student body-building video. The second acquisition module is used for performing motion recognition and error correction based on the current target motion and the current motion to be detected, and acquiring student body-building data corresponding to the student body-building video. The sending module is used for providing the student fitness data of the plurality of student fitness videos acquired by the plurality of student side devices respectively to the coach side device for display.
Therefore, according to the live broadcast body-building system provided by the invention, the student body-building video of the student is converted into the student body-building data through the action error correction recognition algorithm, and the student body-building data is displayed on the training side equipment, so that the student body-building data of a plurality of students can be displayed on the training side equipment at the same time, and a training person can intuitively obtain more student body-building data.
Referring to fig. 5, fig. 5 shows a flow chart of action recognition error correction according to an embodiment of the present invention. Fig. 5 shows a total of 5 steps:
first, step S110: determining target actions, wherein the target actions at least comprise one target action stage, each target action stage is split into a plurality of target part actions, and the target part actions comprise 5 body part actions and at least one random part action according to body parts.
In some embodiments, the target action may be determined by displaying a workout video. Specifically, the workout video includes a plurality of target actions, each of the target actions being associated with a play time of the workout video. In other embodiments, the user may directly select the target action.
Specifically, in this case, 15 skeletal points (see fig. 6) are set for each human body, and the 15 skeletal points are: head center 211, neck center (e.g., spine center of neck) 212, torso center 213 (e.g., spine center of torso), left shoulder skeletal point 221, left elbow skeletal point 222, left wrist skeletal point 223, right shoulder skeletal point 231, right elbow skeletal point 232, right wrist skeletal point 233, left hip skeletal point 241, left knee skeletal point 242, left ankle skeletal point 243, right hip skeletal point 251, right knee skeletal point 252, right ankle skeletal point 253.
The 15 bone points are divided into five body parts by taking 3 bone points as a unit: torso (see fig. 7), left arm (see fig. 8), right arm (see fig. 9), left leg (see fig. 10), and right leg (see fig. 11). Wherein, the bone points in each body part also form vectors, and the vectors also form included angles.
Specifically, the torso (see fig. 7) includes a head center 211, a spine center 212 of the neck, a spine center 213 of the torso, a first vector 214 formed from the head center 211 to the spine center 212 of the neck, a second vector 215 formed from the spine center 212 of the neck to the spine center 213 of the torso, a third vector 216 formed from the head center 211 to the spine center 213 of the torso, and an included angle 217 formed by the first vector 214 and the second vector 215.
The left arm (see fig. 8) comprises a left wrist bone point 223, a left elbow bone point 222, a left shoulder bone point 221, a first vector 224 formed from the left shoulder bone point 221 to the left elbow bone point 222, a second vector 225 formed from the left elbow bone point 222 to the left wrist bone point 223, a third vector 226 formed from the left shoulder bone point 221 to the left wrist bone point 223, and an angle 227 between the first vector 224 and the second vector 225.
The right arm (see fig. 9) comprises a right wrist bone point 233, a right elbow bone point 232, a right shoulder bone point 231, a first vector 234 formed from the right shoulder bone point 231 to the right elbow bone point 232, a second vector 235 formed from the right elbow bone point 232 to the right wrist bone point 233, a third vector 236 formed from the right shoulder bone point 231 to the right wrist bone point 233, and an angle 237 between the first vector 234 and the second vector 235.
The left leg includes (see fig. 10) a left ankle skeletal point 243, a left knee skeletal point 242, a left hip skeletal point 241, a first vector 244 formed from the left hip skeletal point 241 to the left knee skeletal point 242, a second vector 245 formed from the left knee skeletal point 242 to the left ankle skeletal point 243, a third vector 246 formed from the left hip skeletal point 241 to the left ankle skeletal point 243, and an included angle 247 between the first vector 244 and the second vector 245.
The right leg includes (see fig. 11) a right ankle skeletal point 253, a right knee skeletal point 252, a right hip skeletal point 251, a first vector 254 formed by the right hip skeletal point 251 to the right knee skeletal point 252, a second vector 255 formed by the right knee skeletal point 252 to the right ankle skeletal point 253, a third vector 256 formed by the right hip skeletal point 251 to the right ankle skeletal point 253, and an angle between the first vector 254 and the second vector 255.
Fewer representative bone points are set as bone points to reduce the amount of computation in motion recognition and error correction.
The target action is disassembled into five body parts: left arm, right arm, left leg, right leg, and torso. Each body part comprises three bone points as shown in fig. 7 to 11, three vectors formed by the three bone points and an angle between two vectors of the three vectors.
To increase the flexibility of motion recognition, the target motion may further comprise at least one random site motion, the random site being constituted by selected at least two bone points in the body part, as selected bone points 212 and 223 in fig. 6, and the random site being formed by bone points 212 and 223. The random part is not limited to this, and any at least two bone points can form a random part, so that more dimension motion recognition can be realized on the basis of five body parts.
The random part actions at least correspond to one or more process-oriented recognition items, and each recognition item comprises a recognition object, recognition parameters, recognition rules and a standard skeleton point coordinate base. In the process-oriented recognition item, the recognition object comprises a vector formed by at least two bone points of the random part. The identification parameters include a set vector threshold. The recognition rule includes that the similarity between a vector (recognition object) formed by at least two bone points of the random part and a standard vector formed by corresponding standard coordinates in a standard bone point coordinate base in the motion process is greater than or equal to a set vector threshold (recognition parameter), and if the similarity between the vector (recognition object) formed by at least two bone points of the random part and the standard vector formed by corresponding standard coordinates in the standard bone point coordinate base is smaller than the set vector threshold (recognition parameter), error reporting is performed (the reported error can be stored in advance as the recognition parameter).
In a specific embodiment, the matching calculation is performed on the vector of the random part motion and the standard vector formed by the corresponding standard coordinates in the standard skeleton point coordinate base to compare with the vector threshold set by the identification parameter, by the following steps:
calculating standard vectors formed by corresponding standard coordinates in standard skeleton point coordinate baseVector of motion with random part->Cosine value of included angle theta:
(Vector)vector->And the cosine value of the included angle theta is used for comparing with the vector threshold value set by the identification parameter. For example, when bone points 212 and 223 form random sites, vector +.>Vector->The vectors formed by the bone points 212 and 223 acquired in real time and the vectors formed by the bone points 212 and 223 in the standard bone point coordinate library are respectively.
Further, in the present invention, two-dimensional video data or three-dimensional video data may be collected in real time, depending on the function of a camera equipped to the apparatus. If the two-dimensional video data collected in real time generate a two-dimensional skeleton motion model, and the coordinates in the standard skeleton point coordinate library can be three-dimensional coordinates, the method further comprises the step of judging whether the corresponding standard coordinates in the standard skeleton point coordinate library are two-dimensional coordinates or not before the matching calculation is performed. If yes, matching calculation is carried out on the vector of the random part motion and a standard vector formed by corresponding standard coordinates in a standard skeleton point coordinate base. If not, converting the corresponding standard coordinates in the standard skeleton point coordinate library into two-dimensional coordinates, and carrying out matching calculation with the vector of the random part action.
In a specific embodiment, for the process-oriented identification item corresponding to the random part action, the identification parameter may further include a starting amplitude threshold and an achievement amplitude threshold, where the starting amplitude threshold is used to determine whether the part action to be measured starts; the achievement amplitude threshold is used for judging whether the action of the part to be detected is finished or not. Specifically, the starting amplitude and the achievement amplitude are based on the position on the action time axis. In particular, the number of frames may be used to determine the starting and ending magnitudes. For example: assuming that an action has 20 frames of data in a standard skeleton point coordinate base, assuming that the set initial amplitude threshold is 0.2 and the achieved amplitude threshold is 0.8, then the action is considered to start when the matching degree of any frame of data between the random part action of the actual action of the user and the 0 th to 4 th (namely 20 x 0.2) frames of the standard skeleton point coordinate base is highest (within the vector threshold range). When the user action is started and the random part action in the movement process does not match with the standard bone point coordinate library, once the random part action of the user action is matched with any frame of data between 16 th (namely 20 x 0.8) and 20 th frames in the standard bone point coordinate library to the highest degree (within the vector threshold range), the action is considered to be achieved. The above is merely illustrative of the implementation of the invention, which is not limited thereto.
In a specific embodiment, the random-location action further corresponds to one or more distance-oriented recognition terms. For the distance-oriented recognition term, the recognition object includes a distance between at least two skeletal points of the random site. The identification parameter sets a distance threshold. The recognition rule comprises that the recognition object of the action of the part to be detected is always more than or equal to a distance threshold range set by the recognition parameter in the motion process. In the distance recognition, when the recognition object of the action of the part to be detected is always greater than or equal to a distance threshold value set by the recognition parameter in the motion process, the action is achieved; and when the identified object of the action of the part to be tested is smaller than the distance threshold set by the identified parameter in the motion process, reporting errors. In negative distance recognition, when the distance threshold value set by the recognition parameter is greater than or equal to any moment in the motion process of the recognition object of the action of the part to be detected, error reporting is carried out.
The above description is merely illustrative of the embodiment of the random-site motion recognition and error correction in the present invention, and the present invention is not limited thereto. An embodiment mode of recognition error correction of body part actions in the present invention will be described below.
At least one body part action corresponds to one or more process-oriented or displacement-oriented recognition terms. Each recognition item comprises a recognition object, recognition parameters and recognition rules, wherein the recognition object comprises at least one bone point in the three bone points of the part action; at least one of the three vectors; and one or more of an angle between two of the three vectors.
The identification item facing the process needs to be matched with the vector acquired in real time through a standard skeleton point coordinate library so as to judge whether the identification item is met. The standard skeleton point coordinate library stores coordinates of at least one skeleton point of the site motion in time sequence at a sampling frequency. For example, for a push-up left leg motion, at least coordinates of skeletal points 221, 222, and 223 of the left arm are stored in time series at a sampling frequency of 5 times/second, whereby the first vector 224, second vector 225 (and included angle 227) formed by skeletal points 221, 222, and 223 can be known.
Specifically, the identification items facing the process comprise track identification, negative track identification and holding identification; the recognition term for displacement includes displacement recognition and negative displacement recognition.
The track recognition is used for recognizing whether the action of the part moves according to the preset track, and if the action does not move according to the preset track, an error is prompted. The recognition object comprises at least one vector of the three vectors and/or an included angle between two vectors of the three vectors. One or more thresholds are set for the recognition parameters corresponding to the recognition object. The threshold value comprises vector threshold values of the three vectors and included angle threshold values of the included angles, and the identification parameters determine to adopt the vector threshold values and/or the included angle threshold values according to the identification objects.
Specifically, the vector threshold and the angle threshold are used for judging whether the vector (and the angle) acquired in real time is matched with a standard vector (and the angle between standard vectors) formed by standard bone points in the standard bone point coordinate library. For example, referring to fig. 12, for vector threshold, a vector from skeletal point 222 to skeletal point 293 of a body part motion is acquired in real timeFinding corresponding bone points 222 to bones at corresponding times in a standard bone point coordinate library according to timePoint 223, forming vector->Calculating vectors in a standard skeleton point coordinate baseVector of body part movements acquired in real time +.>Cosine value of included angle theta:
(Vector)Vector->The cosine value (cosine value is-1 to 1) of the included angle theta is used for comparing with the vector threshold set by the identification parameter. The vector threshold can be set to 0.8, corresponding vector +.>Vector of ANDWhen the cosine value of the included angle theta is more than or equal to 0.8, the two vectors can be considered to be matched. Can be compared with the calculated cosine value based on the vector threshold to determine the vector +.>Whether within the vector threshold.
For example, in an embodiment in which the included angle threshold is set, the standard skeleton point coordinate library stores at least standard skeleton points in time sequence, and may be formed by standard skeleton points and included angles between standard vectors. The first vector and the second vector of the body part motion can calculate the included angle between the vectors according to the two vectors or directly store the included angle in a standard skeleton point coordinate library. Referring to fig. 13 and 14, the angle threshold is used to compare with the ratio α/β of the angle 297 α between the first vector 294 of the (bone point 292 to bone point 291) and the second vector 295 of the (bone point 292 to bone point 293) of the real-time acquired site motion to the angle 227 β between the first vector 224 of the (bone point 222 to bone point 221) and the second vector 225 of the (bone point 222 to bone point 223) of the corresponding time in the standard bone point coordinate library to determine whether the angle of the real-time acquired site motion is within the range of the angle threshold. The vector threshold may be set to 0.8, with a corresponding vector threshold of 0.8 to 1. The range of vector thresholds may also be set directly to 0.8 to 1. A comparison may be made to determine if the angle between the first vector and the second vector is within the vector threshold based on the angle threshold and the calculated angle ratio.
Further, the recognition parameters of the track recognition further comprise a starting amplitude threshold and an achievement amplitude threshold, wherein the starting amplitude threshold is used for judging whether the part action starts, and the achievement amplitude threshold is used for judging whether the part action ends and the achievement amplitude is completed. Specifically, the starting amplitude and the achievement amplitude are based on the position on the action time axis. In particular, the number of frames may be used to determine the starting and ending magnitudes. For example: assuming that an action has 20 frames of data in the standard skeleton point coordinate base, assuming that the set initial amplitude threshold is 0.2 and the achieved amplitude threshold is 0.8, then the action is considered to start when the matching degree of any frame of data between the actual action of the user and the 0 th to 4 th (i.e. 20 x 0.2) frames of the standard skeleton point coordinate base is highest (within the vector threshold range). When the user action is started and the matching with the standard skeleton point coordinate base fails in the movement process, once the matching degree of the user action and any frame data between the 16 th (namely 20 x 0.8) and 20 th frames in the standard skeleton point coordinate base is highest (within the vector threshold range), the action is considered to be achieved. The above is merely illustrative of the implementation of the invention, which is not limited thereto.
The recognition rules of the track recognition include achievement rules and optionally different error rules corresponding to the set recognition objects and recognition parameters. The achievement rule of track recognition is that the recognition object of the action of the part starts from the position represented by the initial amplitude threshold value and the recognition object is in the set vector threshold value and/or the set included angle threshold value; in the process that the identification object of the part action reaches the position represented by the amplitude threshold from the position represented by the initial amplitude threshold, the identification object is in the set vector threshold and/or the set included angle threshold; and the recognition object of the part action reaches the position represented by the reaching amplitude threshold value and the recognition object is within the set vector threshold value and/or the set included angle threshold value. Different error rules for trajectory recognition include: exceeding the corresponding vector threshold error (e.g., the thigh or thigh represented by vector one exceeds the threshold); exceeding a corresponding angle threshold error (e.g., angle at elbow or angle at knee represented by angle exceeding a threshold); the amplitude is not sufficiently erroneous. The recognition rule of the amplitude deficiency error is that the recognition object of the action of the part starts from the position represented by the initial amplitude threshold value and the recognition objects are all in the set vector threshold value and/or the set included angle threshold value; in the process that the identification object of the part action reaches the position represented by the amplitude threshold from the position represented by the initial amplitude threshold, the identification object is in the set vector threshold and/or the set included angle threshold; and the recognition object of the part action does not reach the position represented by the reaching amplitude threshold value and the recognition object is within the set vector threshold value and/or the set included angle threshold value.
The negative track recognition is used for recognizing whether the part moves according to the preset track, and if so, an error is prompted. For negative trajectory recognition, which is similar to trajectory recognition, the recognition object comprises at least one of the three vectors and/or an angle between two of the three vectors (preferably, an angle between the first vector and the second vector). Setting one or more thresholds for recognition parameters of negative track recognition, wherein the thresholds comprise vector thresholds of the three vectors and an included angle threshold of the included angle, and the recognition parameters determine to adopt the vector thresholds and/or the included angle thresholds according to the recognition objects. Unlike the trajectory recognition, the negative trajectory recognition achievement rule is: the recognition object of the part action starts from the position represented by the initial amplitude threshold value and is in the set vector threshold value and/or the set included angle threshold value; in the process that the identification object of the part action reaches the position represented by the amplitude threshold from the position represented by the initial amplitude threshold, the identification object is in the set vector threshold and/or the set included angle threshold; the identification object of the part action reaches the position represented by the reaching amplitude threshold value and is within the set vector threshold value and/or the set included angle threshold value; and there is currently a state in which recognition other than negative recognition and retention recognition is in progress (in other words, the trajectory or displacement amplitude is increasing). When the rule is achieved, the trace is prompted to be wrong. In other words, if the recognition object is not always within the threshold range set by the recognition parameter during the movement of the body part, and the part action represented by the recognition object generates a track and/or displacement during the movement, no error will be presented.
The hold identification is used to identify whether the part motion is held in a certain state (e.g., held upright or held at a bend angle) during movement, and if not, to indicate an error. The recognition object to be recognized comprises at least one of the three vectors and/or an angle between two of the three vectors. And setting one or more thresholds for the recognition parameters, wherein the thresholds comprise vector thresholds of the three vectors and included angle thresholds of the included angles, and the recognition parameters determine the vector thresholds and/or the included angle thresholds according to the recognition objects. The achievement rules for maintaining identification are: the recognition object of the part action is always within the set vector threshold value and/or the set included angle threshold value. If the achievement rule of the retention recognition is not achieved, prompting an error corresponding to the retention recognition.
For displacement recognition and negative displacement recognition, although the displacement-oriented recognition items are described as recognition items which are not object-oriented, the displacement recognition and the negative displacement recognition actually need to recognize whether the part action is in a continuous motion state, if the part action is not in the continuous motion state, the recognition is interrupted, and errors are directly prompted; or to re-identify from the current location.
The displacement recognition is used for judging whether the recognition object reaches a preset displacement direction and displacement distance, and if the recognition object does not reach the preset displacement direction and displacement distance, an error is prompted. The recognition object of the displacement recognition comprises one of three bone points. Preferably, a skeletal point of the site motion is designated. The identification parameters set the displacement distance, the displacement direction (the displacement direction can be mapped to the positive X-axis direction, the negative X-axis direction, the positive Y-axis direction and the negative Y-axis direction in the two-dimensional coordinates without calculating the specific displacement direction) and the initial amplitude threshold. The initial amplitude threshold of the displacement is a value in the range of 0 to 1. For example, the starting amplitude threshold may be set to 0.2 and represent that the site motion starts or displacement identification starts when the displacement of the designated bone point exceeds 20% of the set displacement distance. The recognition rules for displacement recognition include achievement rules and optionally different error rules. The achievement rule of displacement identification is that the moving direction of the appointed skeleton point is consistent with the displacement direction set in the identification parameter, and the displacement distance of one continuous movement is larger than or equal to the displacement distance set in the identification parameter. Different error rules include prompting that the initial motion amplitude is insufficient when the displacement of the designated bone point does not exceed the initial amplitude threshold; the displacement amplitude of the designated bone point exceeds the initial amplitude threshold, the moving direction of the designated bone point is consistent with the displacement direction set in the identification parameter, and the displacement distance of one continuous movement is smaller than the displacement distance set in the identification parameter, the insufficient amplitude is indicated.
The negative displacement recognition is used for judging whether the recognition object reaches a preset displacement direction and displacement distance, and if so, the error is prompted. Similar to displacement recognition, the recognition object includes one of three skeletal points. Preferably, a skeletal point of the site motion is designated. The identification parameters set a displacement distance, a displacement direction (the displacement direction can be mapped to an X-axis positive direction, an X-axis negative direction, a Y-axis positive direction, a Y-axis negative direction in two-dimensional coordinates), and a starting amplitude threshold. The achievement rule of negative displacement recognition specifies that the moving direction of the bone point coincides with the displacement direction set in the recognition parameter, that the displacement distance of one continuous movement is equal to or greater than the displacement distance set in the recognition parameter, and that there is currently a state in which recognition other than negative recognition and retention recognition is in progress (in other words, the trajectory or displacement amplitude is increasing). When the rule is achieved, the trace is prompted to be wrong. In other words, if the recognition object does not move in the displacement direction set by the recognition parameter or the movement distance is greater than the displacement distance set by the recognition parameter during the movement of the body part, no error is presented.
In the above embodiments, the difficulty coefficient may also be increased, for example, the product of the difficulty coefficient and the achievement condition for each action may be used as the achievement condition for actions with different difficulties.
The identification item is set for at least one part of an action, the at least one part of the action and the identification item of the at least one part of the action are used as an action file of the action, and the action file is stored in the standard action database in association with the action number.
In one particular embodiment, for squat maneuvers, it sets identification terms for the torso, left leg, and right leg. The torso identification items include a hold identification and a displacement identification. In the trunk keeping and recognizing, the recognition object is only a first vector from the center of the head to the center of the spine of the neck, parameters of the first vector are set correspondingly, and a standard skeleton point coordinate base of skeleton points of the trunk in the squatting process is saved for subsequent matching. When the first vector of the torso acquired in real time exceeds a threshold of the first vector, it indicates that the body is not standing upright, prompting an error. Here, due to the characteristics of the trunk, when the first vector from the center of the head to the center of the spine of the neck is kept upright, the second vector from the center of the spine of the neck to the center of the spine of the trunk can be generally and directly considered to be also kept upright, and only a threshold value of one vector is set, so that the subsequent calculation amount is reduced, and the subsequent real-time error correction efficiency is improved.
In the displacement identification of the trunk, an identification object is a bone point of the center of the spine of the trunk, and corresponding identification parameters are a preset displacement distance and a preset displacement direction (the direction is the negative direction of the Y axis) of the bone point. This identification of the motion of the indicated location is achieved when the spine center of the torso moves beyond a predetermined distance in the negative Y-axis direction. If the spine center of the trunk does not move in the negative Y-axis direction by more than a preset displacement distance, the movement amplitude of the part is insufficient.
The left leg is provided with negative displacement recognition for reminding that the knee cannot exceed the toe in deep squat. In negative displacement recognition of the left leg, the recognition target is a skeletal point of the left knee, and the recognition parameters are a predetermined displacement distance, a predetermined displacement direction (the direction is the positive X-axis direction), and a threshold of the initial amplitude. When the left knee moves beyond a predetermined displacement distance along the positive X-axis direction, a prompt indicates that the part is wrong. When the left knee is not moved more than a predetermined displacement distance in the positive X-axis direction, the recognition indicating the part motion is achieved. The right leg has the same identification item as the left leg, and will not be described here again.
In some embodiments, for each action, the division into multiple phases may be performed. For example, for deep squat, squat and rise can be divided into two phases. In some embodiments, with back and forth motion for squats, push-ups, etc., only one process between the coming and going may be set and identified. For example, setting of recognition items and recognition error correction are performed only for actions when squatting down; by setting the recognition term and performing recognition error correction only for the motion during push-up and push-down, the calculation amount of motion recognition can be further reduced to increase the real-time performance of error correction.
Step S120: dividing the motion to be detected into at least one motion stage to be detected according to the time of the target motion stage of the target motion, and forming a matching group by the target motion stage and the motion stage to be detected of the corresponding time.
Specifically, the motion to be measured is obtained by a two-dimensional skeleton motion model or a three-dimensional skeleton motion model generated by the collected two-dimensional video data or three-dimensional video data. In one embodiment, the sampling frequency of the real-time acquisition may be equal to the sampling frequency in the standard bone point coordinate library, or the sampling frequency of the real-time acquisition may be greater than the sampling frequency in the standard bone point coordinate library. When the sampling frequency acquired in real time can be larger than the sampling frequency in the standard bone point coordinate library, matching and calculating a plurality of data of the vector in the same time range with one data in the vector formed by the bone points in the standard bone point coordinate library.
Specifically, for example, the target action is a squat, and is divided into two target action phases: squat and rise, squat time is 2 seconds, rise time is 2 seconds. According to time, the motion to be detected is correspondingly divided into two motion phases to be detected: squatting and lifting. A matching group is formed by the corresponding squat target action stage and the corresponding action stage to be detected, and a matching group is formed by the corresponding rising target action stage and the corresponding action stage to be detected.
Step S130: in each matching group, the to-be-detected action phase is divided into corresponding to-be-detected part actions according to the target part actions of the target action phase, and the to-be-detected part actions of the to-be-detected action phase and the target part actions of the corresponding target action phase form a part matching group.
For example, the stage of the motion to be measured is divided into five parts of the left arm, right arm, left leg, right leg, and trunk to be measured. If the left arm, the right arm, the trunk and a random part in the target action stage are provided with identification items, the action of the part to be detected of the left arm and the action of the target part are used as a part matching group; taking the action of the part to be detected and the action of the target part of the right arm as a part matching group; taking the action of the part to be detected of the trunk and the action of the target part as a part matching group; the motion of the part to be measured and the motion of the target part of the random part are used as a matching group of the parts.
Step S140: and for each part matching group, at least acquiring an identification item of random part motion in target part motion, acquiring vectors formed by at least two selected bone points in the part motion to be detected according to the two-dimensional bone motion model, and carrying out matching calculation on the vectors of the random part motion and standard vectors formed by corresponding standard coordinates in a standard bone point coordinate library so as to compare the vectors with vector thresholds set by the identification parameters, so as to acquire motion identification feedback. I.e. the identification and error correction is performed according to the content of the different identification items as described in step S110 above.
In one embodiment, each of the exercise videos has a video file, the video file includes a number of the target action in the exercise video and a playing time of the target action, and the step S110 further includes: when the target action is played, searching a target action file of the number of the target action in a standard action database, wherein the target action file is stored in the standard action database in association with the number of the target action, and each target action file comprises a target action stage of the target action, a target part action and an identification item corresponding to the target part action.
Step S150: and integrating the action recognition feedback of at least one matching group to obtain the action recognition feedback of the action to be detected.
In some embodiments, the target action includes at least a plurality of target action phases with a sequence, and in step S150, when the action recognition feedback of the previous target action phase and the corresponding action phase to be tested is not achieved, the action recognition feedback of the action of the subsequent target action phase and the corresponding action phase to be tested is not achieved.
In addition, the execution sequence of each step is not limited, for example, the step S120 and the step S130 are executed simultaneously, and those skilled in the art may implement further modified examples, which are not described herein.
The identification error correction algorithm is simple in operation and can cope with the identification speed required in the live broadcast scene.
Compared with the prior art, the invention converts the student body-building video of the student into the student body-building data through the action error correction recognition algorithm, and displays the student body-building data on the training side equipment, so that the training side equipment can display the student body-building data of a plurality of students at the same time, and the training can intuitively obtain more student body-building data.
In an exemplary embodiment of the present disclosure, a computer readable storage medium is also provided, on which a computer program is stored, which program, when being executed by, for example, a processor, can implement the steps of the live fitness method described in any one of the embodiments above. In some possible embodiments, the various aspects of the invention may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the invention as described in the live fitness method section of this specification, when said program product is run on the terminal device.
Referring to fig. 15, a program product 300 for implementing the above-described method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable storage medium may also be any readable medium that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++, C#, and the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the tenant computing device, partially on the tenant device, as a stand-alone software package, partially on the tenant computing device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the tenant computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected through the internet using an internet service provider).
An engineering program for performing the operations of the present invention, such as Unity3D, universal, visual Studio, etc., may be built in any combination of one or more programming integrated development environments (IDE, integrated Development Environment), game development engines.
In an exemplary embodiment of the present disclosure, an electronic device is also provided, which may include a processor, and a memory for storing executable instructions of the processor. Wherein the processor is configured to perform the steps of the live fitness method of any one of the embodiments described above via execution of the executable instructions.
Those skilled in the art will appreciate that the various aspects of the invention may be implemented as a system, method, or program product. Accordingly, aspects of the invention may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
An electronic device 600 according to this embodiment of the invention is described below with reference to fig. 16. The electronic device 600 shown in fig. 16 is merely an example, and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 16, the electronic device 600 is in the form of a general purpose computing device. Components of electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one memory unit 620, a bus 630 connecting the different system components (including the memory unit 620 and the processing unit 610), a display unit 640, etc.
Wherein the storage unit stores program code that is executable by the processing unit 610 such that the processing unit 610 performs the steps according to various exemplary embodiments of the present invention described in the live fitness method section of the present specification above. For example, the processing unit 610 may perform the steps as described in fig. 1.
The memory unit 620 may include readable media in the form of volatile memory units, such as Random Access Memory (RAM) 6201 and/or cache memory unit 6202, and may further include Read Only Memory (ROM) 6203.
The storage unit 620 may also include a program/utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
Bus 630 may be a local bus representing one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or using any of a variety of bus architectures.
The electronic device 600 may also communicate with one or more external devices 700 (e.g., keyboard, pointing device, bluetooth device, etc.), one or more devices that enable a tenant to interact with the electronic device 600, and/or any device (e.g., router, modem, etc.) that enables the electronic device 600 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 650. Also, electronic device 600 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 660. The network adapter 660 may communicate with other modules of the electronic device 600 over the bus 630. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 600, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a usb disk, a mobile hard disk, etc.) or on a network, including several instructions to cause a computing device (may be a personal computer, a server, or a network device, etc.) to perform the above-described live fitness method according to the embodiments of the present disclosure.
Compared with the prior art, the invention converts the student body-building video of the student into the student body-building data through the action error correction recognition algorithm, and displays the student body-building data on the training side equipment, so that the training side equipment can display the student body-building data of a plurality of students at the same time, and the training can intuitively obtain more student body-building data.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.