Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What are .poseheader files? #52

Open
kaustesseract opened this issue Feb 6, 2024 · 1 comment
Open

What are .poseheader files? #52

kaustesseract opened this issue Feb 6, 2024 · 1 comment

Comments

@kaustesseract
Copy link

Hi,

I was wondering if you can give a more detailed description of what are .poseheader files? What is the significance of it? How can we create for our own custom dataset?

@AmitMY
Copy link
Contributor

AmitMY commented Feb 7, 2024

Hi,
When storing a dataset in a disk-mapped fashion with TFDS, we store poses as three objects:

  • fps: float
  • data: tensor of floats
  • confidence: tensor of floats

This way to save the data makes it very fast to read, but does not give the user additional information we have on the poses, for example, the names of the points (which can be used for more readable code), or the connection between points (can be used to visualize the data).

For that end, we expose the .poseheader file, which is the PoseHeader from https://github.com/sign-language-processing/pose

Assuming we have datum which has datum['pose'] in it, we can now construct a Pose object, by doing (pseudocode):

with open('holistic.poseheader', 'rb') as f:
  header = PoseHeader.read(BufferReader(f.read()))

body = NumPyPoseBody(fps=datum['pose']['fps'], data=datum['pose']['data'], confidence=datum['pose']['confidence'])
pose = Pose(header=header, body=body)

# Additional code here, for example, visualization...

Including this file is not mandatory in the curation of a dataset.

Anyway, what dataset did you have in mind?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants