This project develops a biomechanics analysis system using neural networks to evaluate cricket shots. The system uses pose estimation and deep learning to classify technique, identify key movement phases, and provide corrective feedback to athletes and coaches.
- Pose Tracking: Captures a player's joint positions using pose estimation models
- Movement Analysis: Extracts kinematic features such as joint angles and bat trajectory
- Neural Network Classifier: Uses LSTM-based deep learning to recognize proper vs. improper execution
- Technique Scoring: Assigns performance scores and flags biomechanical inefficiencies
- Real-time Feedback: Provides actionable coaching cues
- Multiclass Shot Classification: Identifies different cricket shot types from static images
biomechanics/
├── data/ # Data storage directory
│ ├── raw/ # Raw video and image files
│ │ └── images/ # Cricket shot images by type
│ ├── processed/ # Processed pose data
│ └── labeled/ # Annotated datasets
├── src/ # Source code
│ ├── data_collection/ # Scripts for video/image capture and pose extraction
│ ├── preprocessing/ # Data cleaning and preparation
│ ├── feature_engineering/ # Joint angle calculations and feature extraction
│ ├── model/ # Neural network architecture and training
│ ├── visualization/ # Visualization tools
│ └── inference/ # Inference pipeline and feedback system
├── notebooks/ # Jupyter notebooks for exploration and demos
├── tests/ # Unit and integration tests
├── configs/ # Configuration files
├── models/ # Trained model files
├── results/ # Prediction results and visualizations
├── requirements.txt # Python dependencies
└── README.md # Project documentation
# Clone the repository
git clone https://github.com/lokesh-nuvvula/Biomechanics.git
cd Biomechanics
# Create a virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txtFor analyzing cricket shots from video sequences, see the Jupyter notebook demos:
jupyter notebook notebooks/01_cricket_biomechanics_demo.ipynbFor classifying cricket shots from static images:
# Train the classifier
python src/train_image_classifier.py --extract_poses --visualize
# Predict on new images
python src/predict_cricket_shot.py --model models/cricket_shot_classifier.pt --input path/to/image.jpg --visualizeFor detailed instructions on the image classification system, see README_IMAGE_CLASSIFIER.md.
[Contributing guidelines to be added]
This project is licensed under the GNU Affero General Public License - see the LICENSE file for details.