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

cannot fit PCA with 0 samples < 40 observation dimensions #169

Closed
marybethcassity opened this issue Jun 12, 2024 · 3 comments · Fixed by #184
Closed

cannot fit PCA with 0 samples < 40 observation dimensions #169

marybethcassity opened this issue Jun 12, 2024 · 3 comments · Fixed by #184
Assignees
Labels
question Further information is requested

Comments

@marybethcassity
Copy link

Hi @themattinthehatt Sorry to bother again! I am now encountering the cannot fit PCA with 0 samples < 40 observation dimensions error. I have tracked it down to def _ensure_enough_data(self) in pca.py and am still working on resolving it, but in the mean time figured I would see if you would beat me to it! Thanks!

@themattinthehatt
Copy link
Collaborator

Here's some more info on the PCA loss: https://lightning-pose.readthedocs.io/en/latest/source/user_guide_advanced/unsupervised_losses.html#pose-pca

One note is that you'll probably want to remove the (what I assume are static) keypoints like camera_frontleft from columns_for_singleview_pca.

Another important thing to note is that right now we have to discard a frame for computing the PCA subspace if any of the keypoints included in columns_for_singleview_pca are missing, i.e. you didn't label the keypoint because it was occluded. Therefore you should limit the keypoints you include in the PCA loss to ones that are typically not occluded, and which you have lots of ground truth labels for. My guess is that you have lots of unlabeled keypoints in your training dataset (which is totally fine) but it means none of the frames are available for computing the PCA loss. So try removing any oft-occluded keypoints from columns_for_singleview_pca and see if that helps matters.

@marybethcassity
Copy link
Author

Thanks! I remember reading about removing keypoints with a lot of occlusion but didn't realize how important it may be! I'll let you know what I figure out works.

@marybethcassity
Copy link
Author

Excited to try this out! Thanks!

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

Successfully merging a pull request may close this issue.

2 participants