datasets
datasets copied to clipboard
What are .poseheader files?
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?
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?