Skip to content

Repository files navigation

ViTPose PyTorch Implementation (from Scratch)

This project aims to implement the ViTPose model for human pose estimation from scratch using PyTorch, based on the paper ViTPose: Simple Vision Transformer Baselines for Human Pose Estimation.

Project Structure

.
├── checkpoints/    # Saved model checkpoints
├── configs/        # Configuration files (training, model)
├── data/           # Data loading and preprocessing
├── models/         # Model definitions (ViT, Pose Head)
├── scripts/        # Training, evaluation, inference scripts
├── utils/          # Utility functions (metrics, visualization)
├── main.py         # Main training script entry point
├── requirements.txt # Project dependencies
└── README.md       # This file

Setup

  1. Clone the repository:

    git clone <your-repo-url>
    cd vitpose_pytorch
  2. Install dependencies:

    pip install -r requirements.txt
  3. Download COCO Dataset: Run the download script. This will download COCO 2017 images and annotations to the data/ directory (approx. 20GB). This may take a while.

    python scripts/download_coco.py --output-dir data
  4. (Optional) Update Configuration: Review and modify configs/default.yaml as needed. Ensure the DATASET.ROOT path points to your dataset location (it should be data if you used the download script).

Usage

Training

To start training using the default configuration:

python main.py --cfg configs/default.yaml

Training logs and checkpoints will be saved to the directory specified by OUTPUT_DIR in the configuration file (defaults to output/).

TODO

  • Implement Vision Transformer (ViT) backbone
  • Implement Pose Estimation Head
  • Set up data loading (e.g., for COCO dataset)
  • Implement training loop
  • Implement evaluation logic
  • Add configuration management
  • Add inference script

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages