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

Add skeleton metadata to exported files #55

Open
talmo opened this issue Aug 13, 2024 · 0 comments
Open

Add skeleton metadata to exported files #55

talmo opened this issue Aug 13, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@talmo
Copy link
Contributor

talmo commented Aug 13, 2024

Currently, when saving triangulations or reprojections, we don't store metadata about the skeleton (nodes and edges):

with h5py.File(fname, "w") as f:
f.create_dataset(
"tracks",
data=points_3d,
chunks=True,
compression="gzip",
compression_opts=1,
)
if type(p2d) == str:
tracks_descriptor = (
"Shape: (n_frames, n_tracks, n_nodes, 3). "
f"In calibration camera order: {cam_order}, "
f"In session camera order: {[x.name for x in track_order]}"
)
else:
tracks_descriptor = (
"Shape: (n_frames, n_tracks, n_nodes, 3). "
f"In calibration camera order: {cam_order}."
)
f["tracks"].attrs["Description"] = tracks_descriptor
if frames:
f.create_dataset(
"frames", data=frames, compression="gzip", compression_opts=1
)
f["frames"].attrs[
"Description"
] = "Range, inclusive to exclusive, of frames triangulated over."

This would be great to have as metadata for downstream use.

@talmo talmo added the enhancement New feature or request label Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant