Closed lencriv closed 12 months ago
Hmm that's odd. I am happy to suggest some debugging steps but the easiest thing would be for you to send me the files necessary to run the above code on my end... Would that be OK? Just send to calebsw@gmail.com (any method you prefer).
Thanks! I emailed you
Hi Caleb,
note that I fixed this by specifying the parameters as shown below
results = kpms.apply_model(
coordinates=coordinates,
confidences=confidences,
project_dir=project_dir,
name=name,
results_path=new_data,
pca=kpms.load_pca(project_dir),
params=checkpoint['params'],
hypparams=checkpoint['hypparams'],
**config())
issue resolved! I appreciate your prompt reply.
Glad its resolved! The issue was states
being passed from checkpoint
(i.e. a bug in how we wrote the function+example). It's addressed in https://github.com/dattalab/keypoint-moseq/commit/ab627d83525c4e0d462b1660b38b83583d57ca01 which will be part of the next release.
Also when using "apply_model", make sure you used "syllables" and not "syllables_reindexed" in the results that get output. And make sure to set "use_reindexed=False" for all the visualization functions. This is because of a subtle issue with reindexing (see https://github.com/dattalab/keypoint-moseq/issues/72). We're going to phase out "syllables_reindexed" in the next release.
Hello,
I am trying to apply a model I have trained to new data from a sleap .h5 file when I run the following code...
I receive the following value error