Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 4, No. 3, 2022 162 Design of Real‐time Movement Guidance System Based on Blazepose on Mobile Terminal Jingying Wang, Yujun Zhang*, Xin Zheng School of Computer and Software Engineering, University of Science and Technology Liaoning, Anshan 114051, China *Corresponding author Abstract: People's daily sports and patient rehabilitation movement requires standard movement guidance, this paper puts forward a real-time movement guidance in mobile terminal system, the main function of using the camera to obtain the user movement posture, identify the current posture in the application of the category, and the current posture with the standard movement, in the user movement key body with different color grading tips, in order to prompt the user and correct the user posture. Keywords: Movement guidance, Posture recognition. 1. Introduction China's sports fans have a broad mass base, and "sports health" is also playing an increasingly important role in people's healthy life. In different places in the city, we can often see some people who love sports or try to use exercise to reduce fat and shape, and whether these exercises can really achieve the effect of the exercisers is closely related to their exercise posture. With a standard posture, a wrong posture can not only lead to double effort, but also be counterproductive and even cause muscle strain[1]. However, the cost of fitness coaches is not affordable for most people. In addition, the distance of fitness guidance is too close. At present, the epidemic prevention is normal, and the distance between people needs to be limited, and the fitness coaches need to consider more. In addition to exercise for the purpose of fitness and weight loss, rehabilitation exercise also needs to use exercise therapy to let patients have systemic or local motor function, sensory function recovery training exercise. Traditional rehabilitation training requires patients to be carried out in specific training sites under the guidance of professional therapists, and the effect is not easy to evaluate, which requires a lot of energy of doctors, and may not be able to meet the needs of patients. With the in-depth study of computer vision and human posture estimation algorithm, human posture estimation is used in various aspects of life, so we think that can have an app to detect human movement posture, and compared with the standard movement after the movement, so as to improve the user accuracy of purpose movement[2]. 2. System Analysis 2.1. Main functions This project is committed to using the human posture estimation algorithm to build the movement guidance system on the mobile terminal to assist people who need daily fitness exercise and rehabilitation training, so as to realize portable intelligent exercise, which can not only reduce the cost of professional exercise guidance, but also reduce the physical damage caused by movement errors in the exercise. This application main function for the camera to obtain user posture, identify the user's current posture in the application of the library category, and the user and the current posture of the standard movement, the user movement key body with color classification tips, including red for serious error, yellow for movement slightly not standard, green for correct movement. 2.2. Research Analysis With the rapid development of deep learning technology in recent years, the research in this field is also deepening. At present, most domestic posture APP use posture models based on COCO topology, with fewer key points; moreover, the most advanced posture recognition methods rely on the powerful desktop environment for reasoning. The main algorithm used in this application, BlazePose, tracks 33 nodes in the human body. It is a lightweight convolutional neural network architecture for human pose estimation. It is designed for real-time inference on mobile devices. As a new network architecture, the algorithm can accurately locate more key points and make it more suitable for fitness applications. Moreover, our method is able to achieve real- time performance on mobile phones through CPU inference. If exploiting GPU inference, BlazePose can achieve ultra- real-time performance, enabling it to run subsequent ML models, such as face or hand tracking. 3. Innovations 3.1. Technological innovation Movement posture guidance system using the latest Google development body posture tracking algorithm BlazePose, BlazePose topology network is different from the COCO standard, which can only predict across the trunk, arms, legs and face, and BlazePose can predict the hip midpoint, outside the radius of the circle and connecting the shoulder and hip straight line tilt Angle, a total of 33 human key points, 16 key points more than the COCO standard, compared to the COCO standard, it has a higher recognition accuracy. 3.2. Applied innovation The exercise posture guidance system uses the Android platform to develop technology that allows users to exercise and get posture guidance anytime and anywhere. When there is a problem with the posture Angle, the user will be reminded 163 that the posture is not correct to correct the exerciser's posture and help them to exercise more efficiently. The system has a wide range of application scenarios: 1) It can be used to correct the students 'training movements when they are in school PE class, or to score the students' test movements through the system prompts, so as to ensure the accuracy of the test score. 2) For users with limited economic conditions, you can save the cost of asking professionals for guidance. You only need to take out the phone, open the APP, and place the phone in the distance to ensure that the camera can capture the whole body, so that the system can fully acquire 33 key nodes of users, and then you can start to do quality exercise. 3) The project can be applied to dance guidance. When the dance posture is not standard, the system prompts. As we all know, dance can be shaped, and different dance movements will cause different gestures, so the APP can indirectly improve human posture through guidance prompts. 4. System Design 4.1. Overall design The construction of this application is divided into four steps: collecting high-quality motion photos to form a picture data set, using MediaPipeAPI to classify the human body posture, formulate the correct movement standard, build the application and apply the correct movement standard to the judgment of whether the movement is correct or not.The structure design is shown in Figure 1. Figure 1. Structure Flowchart 4.2. Build the movement dataset The movement photos required to build the movement dataset need to be taken in a bright and harmless environment, and the photos are taken by the project team members. Take Baduanjin as an example: Baduanjin movement is divided into eight sections, with fewer movements but more functions. We extract the movement nodes that need to be paid attention to. In the first paragraph, when the two arms lift the sky with three jiao " arms are raised to the top of the head, the arms should be extended as far as possible, so as to lengthen the muscles of the spine, neck and shoulder, and regulate qi and blood. After bending the arms down, the knee flexion can be classified as the same movement in multiple sections. The second paragraph is "left and right bow like shooting carving", do the movement of the body needs to squat for horse riding, can reduce chest tightness and shoulder and neck pain and other symptoms. In the third paragraph, "regulate the spleen and stomach must be single alone" in the right hand over the palm, we should pay attention to the five fingers and tight, the palm up, which can enhance the function of the spleen and stomach. The fourth paragraph "five work seven injuries look back", palm close to the leg, and then slowly look left and right to look back, can relieve the shoulder and neck stiffness. The fifth paragraph "shake the head and tail to the heart fire", in the upper body of the head to do a round circular waist, waist at the same time to appropriate swing buttocks, can relieve people's anxiety. In the sixth paragraph, "two hands climbing to fix the kidney waist". When two hands clenched, pay attention to the fist on both sides of the lumbar spine, the upper body slowly back, and then restore upright, can massage the kidney. The seventh paragraph "save fist angry eyes increase strength", slowly hit the left and right fist need to straighten the arm, fist heart down, can stretch the shoulder muscles, increase strength. The eighth paragraph "behind seven diseases" need to be close to the side of the legs, knees straight. Tiptoe a few inches away from the ground, the whole body lift potential, you can refresh yourself. Pictures were pictures for key movements and build datasets. 4.3. Postural classification was implemented using MediaPipe The human posture coding and human posture classification were performed by taking pictures as data. MediaPipe Pose Api was used to extract 33 key x, y and z- axis coordinates of the human body and the category of the movement, and abnormal samples, such as incomplete pictures of the human body, were removed during the extraction process. After completing the feature extraction, the data files were generated. 4.4. Specify the criteria using a regression algorithm In order to realize the application to display the corresponding error prompt when the user makes the wrong movement, we need to formulate the correct movement standard for each movement, and different standards need to be adopted when the user makes different movements. However, because the user's height and other body shape is not exactly the same, it can not be completely applicable to the same set of standards. After the research and discussion of the team members, the original correct movement standard for each movement and each group of people was changed to using the knn regression algorithm. Take the closest movement picture of the current user in the standard movement library as a standard to measure whether the individual body movements of the current user are correct. By using this method, the workload of the team members to set the movement standards is greatly reduced. And after there are enough multiple body standard movement pictures, different body users can use the most appropriate movement standard when using the system. For example, eight duan Jinzhong: the first section "hands to the sky three focal" in the arm straight when the wrist, elbow, shoulder three key points of the Angle should be about 180. 4.5. Build the application using the MLkit ML kit As a mobile platform, SDK can bring Google's professional machine learning knowledge to applications and is extremely easy to use. Among them, ML Kit posture 164 detection API is also supported by MediaPipe Pose. After importing the data file, the APP uses the MediaPipe Pose pose detection API for real-time posture recognition and classification. 5. Process of Use 5.1. Overall process The application function is mainly divided into two modules, which are human posture recognition and classification and movement error classification reminder. After entering the app, the user needs to grant the app the permission to use the camera, and then the user needs to choose the corresponding movement library according to their own needs, such as Baduanjin, squat, high leg lift, etc. When the use scenario is the user's personal movement, after selecting the movement library, the user can place the phone one to two meters away and change the shooting to the front to ensure that the whole body can be displayed on the screen. When users make different movements within the scope of the movement library, the application will identify and classify these movements, and compare them with the standard movements of the movement. If they do not meet the movement specifications, they will be displayed in different colors on the key points of human posture.The system design is shown in Figure 2. Figure 2. System Flowchart 5.2. Movement selection of the movement library This application selection posture is simple and easy to learn, but can effectively enhance the movement of physical adjustment, including Baduanjin, squat, high leg lift, etc. Among them, squat is divided into two states: squatting and standing, high leg is divided into two states: leg lifting and standing, and eight brocade is divided into eight movements, which need to be paid attention to are classified to construct the data set. 5.3. Movement error classification is displayed If some movements of the user are seriously wrong and some angles between the body exceed the standard range, the application will use red warning to make the user clearly understand the wrong position of the posture; when the user movement deviates from the standard movement but within the acceptable range, the application will use yellow to connect the key points; when the user movement standard, the prompt box becomes green. 6. Summary This application is developed based on android platform and developed using MLkit mobile application SDK. The application is originally designed to allow people with exercise goals to do high-quality exercise without guidance, so as to avoid not achieving good results and even causing damage to the body due to improper posture. According to the overall requirements of the project, the application realizes the classification of human body posture by collecting movement pictures, and sets the correct movement standard in the application to complete the development of the software system program. Acknowledgment This work was supported in part by innovation and entrepreneurship training program for college students of University of science and Technology Liaoning 2022, project number: S202210146085 References [1] Xi Chaojie. The Construction of Adaptive Learning for Sports Based on Aerobics Trajectory Recognition Model[J]. Journal of Function Spaces, 2022, 2022. [2] Yuan Yi and Zheng DongXia. Deep Learning-Based Posture Recognition for Motion-Assisted Evaluation[J]. Mobile Information Systems, 2022, 2022. [3] Zhao Nana et al. Computational Technologies in Internet of Things and Big Data Technology for Physical Exercise Rehabilitation System[J]. Security and Communication Networks, 2022, 2022. [4] Mallick Tanwi and Das Partha Pratim and Majumdar Arun Kumar. Posture and sequence recognition for Bharatanatyam dance performances using machine learning approaches[J]. Journal of Visual Communication and Image Representation, 2022, 87. [5] Tang Tang and Hyun Joo Min. Research on Sports Dance Movement Detection Based on Pose Recognition[J]. Mathematical Problems in Engineering, 2022, 2022. [6] Wang Qi and Wang QingMing. Aided Evaluation of Motion Action Based on Attitude Recognition.[J]. Journal of healthcare engineering, 2022, 2022 : 8388325-8388325