dattalab / moseq2-app

MoSeq2 Jupyter Notebook platform used to run all of the MoSeq2 tools in a GUI.
Other
32 stars 10 forks source link

kpms.fit_pca error #281

Open CoderYangQi opened 1 week ago

CoderYangQi commented 1 week ago

Hi, thanks for your code! When I run the code(docs\keypoint_moseq_colab.ipynb) with dlc_example_project, I got the error in kpms.fit_pca. Could you help me?:

File "D:\USERS\yq\code\MotionTracking\keypoint-moseq\YQScripts\colabTest.py", line 63, in pca = kpms.fit_pca(data, config()) File "d:\Tools\Anaconda_envs\envs\keypoint_moseq\lib\site-packages\jax_moseq\models\keypoint_slds\alignment.py", line 312, in fit_pca Y_flat = preprocess_for_pca( File "d:\Tools\Anaconda_envs\envs\keypoint_moseq\lib\site-packages\jax_moseq\models\keypoint_slds\alignment.py", line 388, in preprocess_for_pca Y_aligned, v, h = align_egocentric(Y, anterior_idxs, posterior_idxs) File "d:\Tools\Anaconda_envs\envs\keypoint_moseq\lib\site-packages\jax_moseq\models\keypoint_slds\alignment.py", line 429, in align_egocentric Y_aligned = inverse_rigid_transform(Y, v, h) File "d:\Tools\Anaconda_envs\envs\keypoint_moseq\lib\site-packages\jax_moseq\models\keypoint_slds\alignment.py", line 172, in inverse_rigid_transform return apply_rotation(Y - v[..., na, :], -h) File "d:\Tools\Anaconda_envs\envs\keypoint_moseq\lib\site-packages\jax_moseq\models\keypoint_slds\alignment.py", line 214, in apply_rotation return jnp.einsum("...kj,...ij->...ki", Y, rot_matrix) File "d:\Tools\Anaconda_envs\envs\keypoint_moseq\lib\site-packages\jax_src\numpy\lax_numpy.py", line 2923, in einsum operands, contractions = contract_path( File "d:\Tools\Anaconda_envs\envs\keypoint_moseq\lib\site-packages\opt_einsum\contract.py", line 324, in contract_path raise ValueError( ValueError: Size of label 'd' for operand 1 (70) does not match previous terms (10030).

Your Environment

calebweinreb commented 1 week ago

Hi,

This is the repo for depth MoSeq... Issues related to keypoint moseq should be raised here https://github.com/dattalab/keypoint-moseq

Also, the colab notebook is mostly meant for google colab. I would follow the tutorial if working on your own computer. To debug this, I would recommend running the colab notebook on google colab. The error shouldn't occur there, and then you check if there was some issue with ho you loaded the data which produced the error above.