Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Human Pose Classification - Deep Learning Project

A deep learning project that classifies human poses into three categories: Standing, Sitting, and Lying using transfer learning with MobileNetV2.

Project Overview

This project implements a pose classification system using:

  • Base Model: MobileNetV2 (pre-trained on ImageNet)
  • Architecture: Transfer learning with custom dense layers
  • Training Strategy: Two-phase approach (frozen base + fine-tuning)
  • Data Augmentation: Extensive augmentation for robust training

Results

  • Test Accuracy: 91%
  • Weighted F1-Score: 0.91
  • Individual F1-Scores:
    • Standing: 0.93
    • Sitting: 0.88
    • Lying: 0.92

Dataset

The dataset contains:

  • Standing: 421 images
  • Sitting: 429 images
  • Lying: 509 images
  • Total: 1,359 images

Project Structure

human-pose-classifier/
├── notebooks/          # Jupyter notebooks
├── data/              # Dataset (lying, sitting, standing)
├── models/            # Trained models
├── results/          # Plots, metrics, and evaluation results
├── reports/          # Project documentation
├── venv/             # Virtual environment (created during setup)
├── requirements.txt  # Python dependencies
└── README.md         # This file

Setup

Prerequisites

  • Python 3.8 or higher
  • pip (Python package installer)

Installation

  1. Clone the repository:
git clone https://github.com/sachin-prabhakar/human-pose-classifier.git
cd human-pose-classifier
  1. Create a virtual environment:
python3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install required packages:
pip install -r requirements.txt
  1. Register the virtual environment as a Jupyter kernel:
python -m ipykernel install --user --name=human-pose-classifier --display-name="Human Pose Classifier"

Running the Project

Option 1: Using Jupyter Notebook

# Activate virtual environment (if not already active)
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Start Jupyter Notebook
jupyter notebook notebooks/Human_Pose_Classification_Training.ipynb

Option 2: Using the registered kernel

  1. Open Jupyter Notebook
  2. Navigate to notebooks/Human_Pose_Classification_Training.ipynb
  3. Go to KernelChange KernelHuman Pose Classifier
  4. Run the notebook cells

Deactivating the Virtual Environment

deactivate

Key Features

  • Transfer Learning: MobileNetV2 pre-trained on ImageNet
  • Data Augmentation: Rotation, flipping, brightness adjustment for robust training
  • Class Balancing: Automatic weight computation for imbalanced dataset
  • Two-Phase Training: Frozen base model + fine-tuning approach
  • Comprehensive Evaluation: Confusion matrices, F1-scores, and accuracy metrics
  • Real-world Testing: External image validation

Technologies Used

  • TensorFlow/Keras: Deep learning framework
  • MobileNetV2: Efficient CNN architecture for mobile deployment
  • Scikit-learn: Model evaluation and metrics
  • Pandas/NumPy: Data manipulation and numerical computing
  • Matplotlib/Seaborn: Data visualization and plotting
  • PIL (Pillow): Image processing and manipulation

Troubleshooting

Common Issues

1. ModuleNotFoundError for numpy, pandas, etc.

  • Solution: Make sure you've activated the virtual environment and installed dependencies:
    source venv/bin/activate
    pip install -r requirements.txt

2. Jupyter kernel not found

  • Solution: Register the virtual environment as a Jupyter kernel:
    source venv/bin/activate
    python -m ipykernel install --user --name=human-pose-classifier --display-name="Human Pose Classifier"

3. Permission denied errors on macOS

  • Solution: Use virtual environment instead of system Python:
    python3 -m venv venv
    source venv/bin/activate

4. TensorFlow installation issues

  • Solution: Ensure you have Python 3.8+ and install TensorFlow in the virtual environment:
    pip install tensorflow>=2.18.0

Getting Help

If you encounter issues not covered here:

  1. Check that all dependencies are installed: pip list
  2. Verify virtual environment is activated: which python
  3. Ensure Jupyter is using the correct kernel
  4. Check Python version compatibility: python --version

About

Deep learning project for human pose classification using MobileNetV2

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages