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

New data fit the old model brought more syllables. #176

Open
seesaw1992 opened this issue Oct 16, 2024 · 3 comments
Open

New data fit the old model brought more syllables. #176

seesaw1992 opened this issue Oct 16, 2024 · 3 comments

Comments

@seesaw1992
Copy link

Hi, I applied new data to the existing model, but the results shows more syllables than the previous fitting. My code is:

model = kpms.load_checkpoint(project_dir, model_name)[0]
pca = kpms.load_pca(project_dir)


# load new data (e.g. from deeplabcut)
new_data = new_data  # can be a file, a directory, or a list of files
coordinates, confidences, bodyparts = kpms.load_keypoints(new_data, 'deeplabcut')
data, metadata = kpms.format_data(coordinates, confidences, **config())

# apply saved model to new data
#results = kpms.apply_model(model, pca, data, metadata, project_dir, model_name)
results = kpms.apply_model(model, data, metadata, project_dir, model_name, **config())


# Save results
kpms.save_results_as_csv(results, project_dir, model_name)
@calebweinreb
Copy link
Contributor

What do you mean by "show more syllables"? It is possible that some previously rare syllables are now more common so are becoming included. By the way, we have occasionally noticed some differences between the way syllables are assigned during training vs. applying the model, so I would recommend applying the model to all your data, including the original data.

@seesaw1992
Copy link
Author

What do you mean by "show more syllables"? It is possible that some previously rare syllables are now more common so are becoming included. By the way, we have occasionally noticed some differences between the way syllables are assigned during training vs. applying the model, so I would recommend applying the model to all your data, including the original data.

Thank you for bringing the idea of including all experimental data. I tried this method, unfortunately the dataset is too big ( 100 videos, 30 minutes long, 60 Hz, 5 deeplabcut tracking points). The kernel crushed on colab, and it crushed on HPC ( 128 G CPU2, GPU2).

I'm wondering if the syllable remain the same meaning for the new data applied to the trained model?

@calebweinreb
Copy link
Contributor

For applying the model it doesn't matter if the you run it for all the data at once or for one session at a time. So you could write a loop and crunch the data in batches.

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

No branches or pull requests

2 participants