MakamDevansh044/major_project
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Β | Β | |||
Β | Β | |||
Β | Β | |||
Β | Β | |||
Β | Β | |||
Β | Β | |||
Β | Β | |||
Repository files navigation
# Hybrid Geometric-Machine Learning for Interpretable Pose Classification [](https://www.python.org/downloads/) [](https://opensource.org/licenses/MIT) [](https://mediapipe.dev/) ## π― Project Vision This project addresses a critical gap in human pose classification by developing a **hybrid approach that combines geometric understanding with machine learning** to create pose classifiers that are not only accurate but also **inherently interpretable and explainable**. ### π‘ The Core Idea Most state-of-the-art pose classification systems rely on deep learning architectures that process skeletal data as flat, unstructured inputs, resulting in black-box predictions with limited interpretability. Our approach takes a fundamentally different path: **ποΈ Hierarchical Structure**: Instead of treating human keypoints as independent coordinates, we organize them into a **hierarchical anatomical structure** - segmenting the body into meaningful regions like head, torso, left/right arms, and left/right legs, mirroring the natural structure of human anatomy. **π Geometric Intelligence**: For each body segment, we compute **interpretable geometric features** including: - Joint angles (elbow flexion, knee bend, shoulder rotation) - Relative positions and vectors between connected joints - Spatial relationships and proportions between different body parts - Inter-segment distances and orientations **π§ Structured Learning**: These geometric features are encoded as **structured vectors** that preserve the hierarchical relationships, enabling machine learning models to learn from anatomically meaningful representations rather than raw coordinate data. **π Transparent Decision-Making**: The resulting classification system can explain its decisions by tracing them back to specific joint angles, body part configurations, or geometric relationships - making it possible to understand *why* a particular pose was classified in a certain way. ### π― Why This Matters **Healthcare Applications**: In medical rehabilitation or movement analysis, clinicians need to understand why a system classified a movement as abnormal. Our approach can pinpoint specific joint angles or body relationships that contributed to the decision. **Sports Analytics**: Coaches can understand which specific body mechanics led to a pose classification, enabling targeted training and improvement. **Human-Computer Interaction**: Gesture recognition systems can provide feedback about which part of a pose needs adjustment. **Robustness**: By leveraging anatomical structure and geometric relationships, the system is more robust to variations, occlusions, and edge cases compared to end-to-end deep learning approaches. --- ## π Quick Start ### Installation # 1. Install dependencies pip install -r requirements.txt # 2. Download Sub-JHMDB dataset to datasets/jhmdb_dataset/ # 3. Run the pipeline python src/main_pipeline.py # 4. Test on single image python test_pipeline.py ## π Project Structure hierarchical-pose-classification/ β βββ src/ β βββ keypoint_extractor.py # MediaPipe integration β βββ hierarchical_segmentation.py # Body part organization β βββ geometric_features.py # Joint angles & spatial features β βββ feature_vector_encoder.py # Structured feature creation β βββ pose_classifier.py # ML classification pipeline β βββ main_pipeline.py # Complete pipeline execution β βββ datasets/ # Dataset storage βββ models/ # Trained model storage βββ notebooks/ # Jupyter notebooks for analysis βββ tests/ # Unit tests β βββ requirements.txt # Python dependencies βββ README.md # This file βββ setup.py # Package installation