This study proposes a human posture action detection system based on image processing and machine learning, designed to automate fitness exercise counting and eliminate errors associated with manual tracking. The framework begins by capturing and decomposing test videos into sequential motion frames using OpenCV. The acquired images undergo preprocessing for enhancement, followed by the detection and normalization of 33 skeletal keypoints via the Mediapipe library. The normalized keypoint coordinates are then transformed into embedding vectors as model input. A K-Nearest Neighbors (KNN) algorithm compares these vectors against a reference database to classify and count exercise repetitions. Temporal smoothing refines the classification output, ensuring robust action recognition and accurate repetition counting. The system culminates in a user-friendly UI that visually presents the processed video stream alongside real-time analytics. By addressing the limitations of conventional counting methods, this research delivers an efficient, integrated solution for automated posture recognition and repetition tracking. Its practical implementation offers significant societal and economic value by enhancing workout efficiency and promoting health-conscious fitness practices.
Key words
human pose action recognition /
OpenCV /
Mediapipe /
KNN Algorithm
{{custom_sec.title}}
{{custom_sec.title}}
{{custom_sec.content}}
References
[1] Lowe D G.Distinctive image features from scale-invariant keypoints[J].International journal of computer vision, 2004, 60(2):91-110.
[2] Alexander T, Christian S.DeepPose: Human Pose Estimation via Deep Neural Networks[J/OL].CoRR abs/1312.4659.(2013).
[3] 张欣毅,张运楚,王菲,等.改进YOLOpose的轻量化多人姿态检测模型[J].小型微型计算机系统,2025,46(1):167-172.
[4] Newell A,Yang K,Deng J.Stacked hourglass networks for human pose estimation[C]//European conference on computer vision.Springer,Cham,2016:483-499.
[5] Chenchen L,Yongzhi L,Kangqi M,et al.Learning 3-D Human Pose Estimation from Catadioptric Videos[C]//The 30th International Joint Conference on Artificial Intelligence (IJCAI) 2021.
[6] 张恒博,刘大铭,伏娜娜,等.基于MediaPipe Pose的人体动作识别方法研究[J].宁夏工程技术,2024,23(1):79-84+91.
[7] 杨易木. 基于KNN算法的电子档案信息文本自动分类方法[J].办公自动化,2025,30(5):14-16
[8] 李怀义,李如晗,孙红霞.基于BlazePose模型和KNN算法的消防体能训练识别系统设计[J].人工智能,2023(3):89-97.