Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# GitHub Actions Workflows

This directory contains GitHub Actions workflows for automated checks and builds.

## Available Workflows

### Build (`build.yaml`)
Builds and tests the package on multiple platforms (Ubuntu and Windows) with Python 3.10 and PyTorch 2.4.0.

**Triggers:** Push and Pull Requests to `main` branch

### Codespell (`codespell.yml`)
Checks for spelling errors in the codebase using codespell.

**Triggers:** Push and Pull Requests to `main` branch

### Check File Headers (`check-headers.yml`)
Ensures all Python files have the proper FMPose3D header with Apache 2.0 license information.

**Triggers:** Push and Pull Requests to `main` branch

**How it works:**
- Runs `scripts/update_headers.py --check` to verify headers
- Fails if any Python files are missing proper headers
- To fix locally, run: `python scripts/update_headers.py` and commit the changes

## Running Header Checks Locally

Before submitting a pull request, you can check and fix headers locally:

```bash
# Check if all files have proper headers
python scripts/update_headers.py --check

# Add/update headers to files that need them
python scripts/update_headers.py
```

The script will:
- Add the standard FMPose3D header to Python files that don't have one
- Replace old header formats with the current standard
- Preserve shebangs (#!) and `from __future__` imports at the top of files
- Skip `__init__.py` files that are very short
36 changes: 36 additions & 0 deletions .github/workflows/check-headers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Check File Headers

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
check-headers:
name: Check Python file headers
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Check headers
run: |
python scripts/update_headers.py --check
continue-on-error: false

- name: Provide fix instructions
if: failure()
run: |
echo "::error::Some files are missing proper headers."
echo "To fix this, run: python scripts/update_headers.py"
echo "Then commit the changes."
9 changes: 9 additions & 0 deletions animals/demo/vis_animals.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
"""
FMPose3D: monocular 3D Pose Estimation via Flow Matching

Official implementation of the paper:
"FMPose3D: monocular 3D Pose Estimation via Flow Matching"
by Ti Wang, Xiaohang Yu, and Mackenzie Weygandt Mathis
Licensed under Apache 2.0
"""

# SuperAnimal Demo: https://github.com/DeepLabCut/DeepLabCut/blob/main/examples/COLAB/COLAB_YOURDATA_SuperAnimal.ipynb
import sys
import os
Expand Down
9 changes: 9 additions & 0 deletions animals/models/model_animals.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
"""
FMPose3D: monocular 3D Pose Estimation via Flow Matching

Official implementation of the paper:
"FMPose3D: monocular 3D Pose Estimation via Flow Matching"
by Ti Wang, Xiaohang Yu, and Mackenzie Weygandt Mathis
Licensed under Apache 2.0
"""

import math
from functools import partial

Expand Down
9 changes: 9 additions & 0 deletions animals/scripts/main_animal3d.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
"""
FMPose3D: monocular 3D Pose Estimation via Flow Matching

Official implementation of the paper:
"FMPose3D: monocular 3D Pose Estimation via Flow Matching"
by Ti Wang, Xiaohang Yu, and Mackenzie Weygandt Mathis
Licensed under Apache 2.0
"""

import os
import torch
import random
Expand Down
9 changes: 9 additions & 0 deletions demo/vis_in_the_wild.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
"""
FMPose3D: monocular 3D Pose Estimation via Flow Matching

Official implementation of the paper:
"FMPose3D: monocular 3D Pose Estimation via Flow Matching"
by Ti Wang, Xiaohang Yu, and Mackenzie Weygandt Mathis
Licensed under Apache 2.0
"""

import sys
import cv2
import os
Expand Down
9 changes: 9 additions & 0 deletions fmpose/aggregation_methods.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
"""
FMPose3D: monocular 3D Pose Estimation via Flow Matching

Official implementation of the paper:
"FMPose3D: monocular 3D Pose Estimation via Flow Matching"
by Ti Wang, Xiaohang Yu, and Mackenzie Weygandt Mathis
Licensed under Apache 2.0
"""

import torch
from fmpose.common.utils import project_to_2d

Expand Down
9 changes: 9 additions & 0 deletions fmpose/animals/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
"""
FMPose3D: monocular 3D Pose Estimation via Flow Matching

Official implementation of the paper:
"FMPose3D: monocular 3D Pose Estimation via Flow Matching"
by Ti Wang, Xiaohang Yu, and Mackenzie Weygandt Mathis
Licensed under Apache 2.0
"""

"""
Animal-specific components for FMPose.
"""
Expand Down
9 changes: 9 additions & 0 deletions fmpose/animals/common/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
"""
FMPose3D: monocular 3D Pose Estimation via Flow Matching

Official implementation of the paper:
"FMPose3D: monocular 3D Pose Estimation via Flow Matching"
by Ti Wang, Xiaohang Yu, and Mackenzie Weygandt Mathis
Licensed under Apache 2.0
"""

"""
Shared utilities for animal datasets and models.
"""
9 changes: 9 additions & 0 deletions fmpose/animals/common/animal3d_dataset.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
"""
FMPose3D: monocular 3D Pose Estimation via Flow Matching

Official implementation of the paper:
"FMPose3D: monocular 3D Pose Estimation via Flow Matching"
by Ti Wang, Xiaohang Yu, and Mackenzie Weygandt Mathis
Licensed under Apache 2.0
"""

import json

import numpy as np
Expand Down
9 changes: 9 additions & 0 deletions fmpose/animals/common/animal_visualization.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
"""
FMPose3D: monocular 3D Pose Estimation via Flow Matching

Official implementation of the paper:
"FMPose3D: monocular 3D Pose Estimation via Flow Matching"
by Ti Wang, Xiaohang Yu, and Mackenzie Weygandt Mathis
Licensed under Apache 2.0
"""

import os

import cv2
Expand Down
9 changes: 9 additions & 0 deletions fmpose/animals/common/arber_dataset.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
"""
FMPose3D: monocular 3D Pose Estimation via Flow Matching

Official implementation of the paper:
"FMPose3D: monocular 3D Pose Estimation via Flow Matching"
by Ti Wang, Xiaohang Yu, and Mackenzie Weygandt Mathis
Licensed under Apache 2.0
"""

import copy
import gc
import glob
Expand Down
9 changes: 9 additions & 0 deletions fmpose/animals/common/arguments.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
"""
FMPose3D: monocular 3D Pose Estimation via Flow Matching

Official implementation of the paper:
"FMPose3D: monocular 3D Pose Estimation via Flow Matching"
by Ti Wang, Xiaohang Yu, and Mackenzie Weygandt Mathis
Licensed under Apache 2.0
"""

import argparse
import math

Expand Down
9 changes: 9 additions & 0 deletions fmpose/animals/common/camera.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
"""
FMPose3D: monocular 3D Pose Estimation via Flow Matching

Official implementation of the paper:
"FMPose3D: monocular 3D Pose Estimation via Flow Matching"
by Ti Wang, Xiaohang Yu, and Mackenzie Weygandt Mathis
Licensed under Apache 2.0
"""

import sys

import numpy as np
Expand Down
9 changes: 9 additions & 0 deletions fmpose/animals/common/graph_utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
"""
FMPose3D: monocular 3D Pose Estimation via Flow Matching

Official implementation of the paper:
"FMPose3D: monocular 3D Pose Estimation via Flow Matching"
by Ti Wang, Xiaohang Yu, and Mackenzie Weygandt Mathis
Licensed under Apache 2.0
"""

from __future__ import absolute_import

import numpy as np
Expand Down
9 changes: 9 additions & 0 deletions fmpose/animals/common/lifter3d.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
"""
FMPose3D: monocular 3D Pose Estimation via Flow Matching

Official implementation of the paper:
"FMPose3D: monocular 3D Pose Estimation via Flow Matching"
by Ti Wang, Xiaohang Yu, and Mackenzie Weygandt Mathis
Licensed under Apache 2.0
"""

import glob

import cv2
Expand Down
9 changes: 9 additions & 0 deletions fmpose/animals/common/mocap_dataset.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
"""
FMPose3D: monocular 3D Pose Estimation via Flow Matching

Official implementation of the paper:
"FMPose3D: monocular 3D Pose Estimation via Flow Matching"
by Ti Wang, Xiaohang Yu, and Mackenzie Weygandt Mathis
Licensed under Apache 2.0
"""

class MocapDataset:
def __init__(self, fps, skeleton):
self._skeleton = skeleton
Expand Down
9 changes: 9 additions & 0 deletions fmpose/animals/common/skeleton.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
"""
FMPose3D: monocular 3D Pose Estimation via Flow Matching

Official implementation of the paper:
"FMPose3D: monocular 3D Pose Estimation via Flow Matching"
by Ti Wang, Xiaohang Yu, and Mackenzie Weygandt Mathis
Licensed under Apache 2.0
"""

import numpy as np


Expand Down
9 changes: 9 additions & 0 deletions fmpose/animals/common/utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
"""
FMPose3D: monocular 3D Pose Estimation via Flow Matching

Official implementation of the paper:
"FMPose3D: monocular 3D Pose Estimation via Flow Matching"
by Ti Wang, Xiaohang Yu, and Mackenzie Weygandt Mathis
Licensed under Apache 2.0
"""

import glob
import hashlib
import json
Expand Down
9 changes: 9 additions & 0 deletions fmpose/animals/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
"""
FMPose3D: monocular 3D Pose Estimation via Flow Matching

Official implementation of the paper:
"FMPose3D: monocular 3D Pose Estimation via Flow Matching"
by Ti Wang, Xiaohang Yu, and Mackenzie Weygandt Mathis
Licensed under Apache 2.0
"""

"""
FMPose models.
"""
Expand Down
9 changes: 9 additions & 0 deletions fmpose/animals/models/graph_frames.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
"""
FMPose3D: monocular 3D Pose Estimation via Flow Matching

Official implementation of the paper:
"FMPose3D: monocular 3D Pose Estimation via Flow Matching"
by Ti Wang, Xiaohang Yu, and Mackenzie Weygandt Mathis
Licensed under Apache 2.0
"""

import numpy as np

class Graph():
Expand Down
9 changes: 9 additions & 0 deletions fmpose/animals/models/model_animal3d.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
"""
FMPose3D: monocular 3D Pose Estimation via Flow Matching

Official implementation of the paper:
"FMPose3D: monocular 3D Pose Estimation via Flow Matching"
by Ti Wang, Xiaohang Yu, and Mackenzie Weygandt Mathis
Licensed under Apache 2.0
"""

import math
from functools import partial

Expand Down
9 changes: 9 additions & 0 deletions fmpose/common/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
"""
FMPose3D: monocular 3D Pose Estimation via Flow Matching

Official implementation of the paper:
"FMPose3D: monocular 3D Pose Estimation via Flow Matching"
by Ti Wang, Xiaohang Yu, and Mackenzie Weygandt Mathis
Licensed under Apache 2.0
"""

"""
Common utilities for FMPose.
"""
Expand Down
9 changes: 9 additions & 0 deletions fmpose/common/arguments.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
"""
FMPose3D: monocular 3D Pose Estimation via Flow Matching

Official implementation of the paper:
"FMPose3D: monocular 3D Pose Estimation via Flow Matching"
by Ti Wang, Xiaohang Yu, and Mackenzie Weygandt Mathis
Licensed under Apache 2.0
"""

import argparse
import math

Expand Down
9 changes: 9 additions & 0 deletions fmpose/common/camera.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
"""
FMPose3D: monocular 3D Pose Estimation via Flow Matching

Official implementation of the paper:
"FMPose3D: monocular 3D Pose Estimation via Flow Matching"
by Ti Wang, Xiaohang Yu, and Mackenzie Weygandt Mathis
Licensed under Apache 2.0
"""

import sys

import numpy as np
Expand Down
9 changes: 9 additions & 0 deletions fmpose/common/generator.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
"""
FMPose3D: monocular 3D Pose Estimation via Flow Matching

Official implementation of the paper:
"FMPose3D: monocular 3D Pose Estimation via Flow Matching"
by Ti Wang, Xiaohang Yu, and Mackenzie Weygandt Mathis
Licensed under Apache 2.0
"""

import numpy as np


Expand Down
Loading
Loading