Pose Estimator is a user-friendly application that leverages MediaPipe to detect human poses in images. It classifies the detected pose as Standing, Sitting, or Lying Down, and visually annotates the image with the identified landmarks.
- Human Pose Detection: Utilizes MediaPipe's Pose solution to identify human body landmarks.
- Pose Classification: Determines if the person is standing, sitting, or lying down based on landmark positions.
- Visual Annotation: Displays the processed image with overlaid landmarks and pose classification.
- Simple Interface: Easy-to-use application suitable for beginners and developers alike.
-
Clone the Repository
git clone https://github.com/Rktim/pose_estimator.git cd pose_estimator -
Create a Virtual Environment (Optional but Recommended)
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install Dependencies
pip install -r requirements.txt
-
Prepare an Image
Ensure you have an image (e.g.,
person.jpg) in the project directory. -
Run the Application
python mp.py
-
Follow the Prompt
The application will prompt you to enter the image filename:
Enter image file name (with extension): person.jpg -
View the Result
The processed image will be displayed with landmarks and the classified pose.
The application processes the input image using MediaPipe's Pose solution to detect body landmarks. It then calculates the vertical distance between the shoulder and hip landmarks to classify the pose:
- Standing: Significant vertical distance between shoulder and hip.
- Sitting: Moderate vertical distance.
- Lying Down: Minimal vertical distance.
This heuristic provides a simple yet effective method for basic pose classification.
- OpenCV - For image processing and display.
- MediaPipe - For pose detection.
- Pillow - For image handling.
- NumPy - For numerical operations.
All dependencies are listed in the requirements.txt file.
Contributions are welcome! If you have suggestions, improvements, or encounter issues, please open an issue or submit a pull request.
This project is licensed under the MIT License.
For any inquiries or feedback, please reach out via GitHub Issues.
Feel free to customize this README.md further to suit your project's needs. If you need assistance with additional features or deployment, don't hesitate to ask!
