MUSKAN17 commited on
Commit
3fa897c
·
verified ·
1 Parent(s): d7207de

update README.md

Browse files
Files changed (1) hide show
  1. README.md +87 -3
README.md CHANGED
@@ -1,3 +1,87 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ ---
4
+
5
+
6
+ Pose Estimation Model
7
+
8
+ Overview
9
+
10
+ This project implements a Pose Estimation Model using MediaPipe, OpenCV, and NumPy to analyze human body movement from images and videos. It extracts key body landmarks, calculates angles between joints, and logs the data for further analysis.
11
+
12
+ Features
13
+
14
+ Pose Detection: Detects and extracts body landmarks from images and videos.
15
+
16
+ Angle Calculation: Computes angles between body joints to analyze posture.
17
+
18
+ Distance Measurement: Measures distances between key body points.
19
+
20
+ Video Processing: Processes videos frame by frame and logs body data.
21
+
22
+ Data Logging: Saves pose estimation data to CSV for analysis.
23
+
24
+ Model Configuration: Supports saving and loading model configurations in JSON.
25
+
26
+ Dependencies
27
+
28
+ Ensure you have the following Python libraries installed:
29
+
30
+ pip install opencv-python mediapipe pandas matplotlib numpy
31
+
32
+ Installation
33
+
34
+ Clone the repository and navigate to the project directory:
35
+
36
+ git clone :
37
+ cd pose-estimation
38
+
39
+ Usage
40
+
41
+ 1. Initialize the Model
42
+
43
+ from pose_estimation import PoseEstimationModel
44
+ model = PoseEstimationModel()
45
+
46
+ 2. Process an Image
47
+
48
+ import cv2
49
+ image = cv2.imread('sample_image.jpg')
50
+ output_image, landmarks = model.detect_pose(image, model.pose_video, display=True)
51
+
52
+ 3. Process a Video
53
+
54
+ video_path = 'input_video.mp4'
55
+ log_file = 'output_log.csv'
56
+ model.process_video(video_path, log_file)
57
+
58
+ 4. Calculate Body Angles
59
+
60
+ angles = model.body_angles(landmarks)
61
+ print(angles)
62
+
63
+ 5. Save & Load Model Configuration
64
+
65
+ model.save_model_config('model_config.json')
66
+ loaded_model = PoseEstimationModel.load_model_config('model_config.json')
67
+
68
+ Output
69
+
70
+ The processed image/video with pose landmarks overlaid.
71
+
72
+ A CSV file containing body joint angles and measurements.
73
+
74
+ Applications
75
+
76
+ Sports Analytics: Analyze athlete posture and movement.
77
+
78
+ Health & Fitness: Assist in exercise form correction.
79
+
80
+ Rehabilitation: Monitor patient recovery through movement tracking.
81
+
82
+ Gaming & AR: Use body pose as input for interactive applications.
83
+
84
+ License
85
+
86
+ This project is licensed under the apache-2.0 License.
87
+