Skip to content

Official implementation of MotionAGFormer (WACV 2024) for 3D human pose estimation, customized for feature extraction on the 84-video Ewalk dataset.

License

Notifications You must be signed in to change notification settings

Tusllar/MotionAGFormer

Repository files navigation

MotionAGFormer: 3D Human Pose Estimation & Feature Extraction on Ewalk Dataset

PyTorch arXiv Paper Explanation

PapersWithCode: Human3.6M PapersWithCode: MPI-INF-3DHP


Giới thiệu

Đây là mã nguồn chính thức của bài báo MotionAGFormer: Enhancing 3D Human Pose Estimation With a Transformer-GCNFormer Network (WACV 2024).

Repo này đã được chỉnh sửa để hỗ trợ trích xuất đặc trưng từ bộ dữ liệu Ewalk gồm 84 video.


Môi trường cài đặt

  • Python 3.8.10
  • PyTorch 2.0.0
  • CUDA 12.2

Cài đặt các thư viện cần thiết:

pip install -r requirements.txt

Hỗ trợ dữ liệu

1. Bộ dữ liệu Ewalk (84 video)

Repo đã được chỉnh sửa để hỗ trợ trích xuất đặc trưng từ 84 video của bộ dữ liệu Ewalk. Sau khi thực hiện bạn sẽ có cấu trúc dữ liệu như dưới đây:

demo/Dataset/
  └── <Tên_video>/
      ├── input_2D/
      │   └── keypoints.npz
      ├── pose/
      ├── pose2D/
      ├── pose3D/
      └── <Tên_video>.mp4

2. Các bộ dữ liệu khác (Human3.6M, MPI-INF-3DHP)

Repo vẫn hỗ trợ đầy đủ các bộ dữ liệu chuẩn như Human3.6M, MPI-INF-3DHP. Xem hướng dẫn chi tiết trong thư mục configs/ hoặc phần bên dưới.


3. Tải các model Checkpoint cho dự án.

demo/lib/
  └── checkpoint/
      ├── pose_hrnet_w48_384x288.pth
      └── yolov3.weights

MotionAGFormer/
  └── checkpoint/
      └── motionagformer-b-h36m.pth.tr

Hướng dẫn trích xuất đặc trưng từ video Ewalk

  1. Đặt video Ewalk vào thư mục demo/Video/.

  2. Chạy script trích xuất đặc trưng (ví dụ):

    python demo/vis.py
    • Kết quả sẽ được lưu trong các thư mục pose2D, pose3D, input_2D dưới mỗi video.
    • Đặc trưng 2D/3D và keypoints sẽ được lưu dưới dạng .npz hoặc .png (tùy script).
  3. Tùy chỉnh script: Bạn có thể chỉnh sửa các file trong demo/vis.py, demo/lib/preprocess.py hoặc các script khác để phù hợp với mục đích trích xuất đặc trưng riêng.


Huấn luyện & Đánh giá

  • Huấn luyện trên Human3.6M:
    python train.py --config configs/h36m/MotionAGFormer-base.yaml
  • Huấn luyện trên MPI-INF-3DHP:
    python train_3dhp.py --config configs/mpi/MotionAGFormer-base.yaml
  • Đánh giá mô hình:
    python train.py --eval-only --checkpoint <CHECKPOINT-DIR> --checkpoint-file <FILE> --config <CONFIG>

Demo trực quan

  • Bạn cần chuẩn bị dữ liệu video Ewalk theo cấu trúc sau. Đặt video vào demo/Video/.
  • Chạy:
    python demo/vis.py
  • Kết quả sẽ được lưu trong demo/output/ hoặc các thư mục tương ứng.

Tài liệu tham khảo & Code gốc


Citation

Nếu bạn sử dụng repo này cho nghiên cứu, vui lòng trích dẫn:

@inproceedings{motionagformer2024,
  title     =   {MotionAGFormer: Enhancing 3D Human Pose Estimation with a Transformer-GCNFormer Network}, 
  author    =   {Soroush Mehraban, Vida Adeli, Babak Taati},
  booktitle =   {Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision},
  year      =   {2024}
}

About

Official implementation of MotionAGFormer (WACV 2024) for 3D human pose estimation, customized for feature extraction on the 84-video Ewalk dataset.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published