Closed ab-madabhushi closed 1 year ago
Hey! Two things:
kpms.load_keypoints(PATH, 'anipose-sleap')
to kpms.load_keypoints(PATH, 'sleap-anipose')
(n_frames, n_tracks, n_nodes, 3)
. This is what keypoint-moseq expects. If your h5 file has shape (3 x K x 1 x N ), why do you think that is? What command exactly did you use for saving it? Hi Dr. Weinreb,
I am not sure why it had a different format. My guess is I 'viewed' the file in MATLAB which apparently has a different way to read matrices compared to python (Transposed). I now generated the triangulation again and it seems to be working now! Thank you so much for your help!
From: Caleb Weinreb @.> Sent: Thursday, June 8, 2023 10:29 AM To: dattalab/keypoint-moseq @.> Cc: Madabhushi, Abhinav (madabhan) @.>; Author @.> Subject: Re: [dattalab/keypoint-moseq] plot_pcs not working wiht 3d data from SLEAP-Anipose. (Issue #60)
External Email: Use Caution
Hey! Two things:
— Reply to this email directly, view it on GitHubhttps://github.com/dattalab/keypoint-moseq/issues/60#issuecomment-1582690797, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A32COT7W6RDGDOUVCSGIPBLXKHOWFANCNFSM6AAAAAAY4UQXKA. You are receiving this because you authored the thread.Message ID: @.***>
Great!
Dear all,
I was trying to use keypoint-moseq to analyse 3d coordinate data generated from SLEAP-Anipose. I first used SLEAP to track the keypoints (2d) from multiple camera angles. I then generated a calibration.toml using checkerboard points annotated using DLT and generated coefficients for 3d reconstruction. I then modified this file to make it suitable for SLEAP-Anipose ( following this https://github.com/backyardbiomech/DLCconverterDLT/blob/master/DLTcameraPosition.py) and reconstructed xyz coordinates of the keypoints using the calibration function in SLEAP-anipose (https://github.com/talmolab/sleap-anipose). The resulting file was a .h5 file with tracks of shape (3 x K x 1 x N ) where 3 refers to the 3 coordinates, K is the number of keypoints 1 refers to the single individual tracked and N is the total no. of frames.
However, I now see this error when I try to plot PC's using keypoint-moseq.
Could you please direct me to what I can do to fix this and what is going wrong here?
Thank you very much!