Closed mbcooper97 closed 2 months ago
Does coordinates
contain both the new and old data?
(closing because of inactivity)
during the tutorial, at the step where you can apply to new data I believe there should be a line added to update the coordinates file to contain both the old key points and the new ones, unless I missed somewhere else it can be updated `new_data = 'new_data_file.predictions.analysis.h5'
coordinates, confidences, bodyparts = kpms.load_keypoints(new_data, 'sleap')
original_data = 'original_data_file.predictions.analysis.h5'
coordinates2, confidences2, bodyparts2 = kpms.load_keypoints(original_data, 'sleap')
coordinates.update(coordinates2)`
That line would be useful if you wanted to simultaneously apply the model to new data AND re-apply it to the the original data. That's not the use case documented in the tutorial, but definitely a reasonable thing to do!
when applying the model to new data, does apply_model refit the original model? Then to get the trajectory and grid movie plots for each set of data we should reload the coordinates for each set and also pass their respective part of the results.h5 file?
apply_model
doesn't refit the original model, so in theory you don't need to reapply to the original data. Although anecdotally it seems that the results do shift slightly so using apply_model to re-infer syllables for the original data isn't a bad idea.
I am using out cluster (A100 GPU + Linux HPC Desktop). I trained a model, then applied that model on new data, and when I tried to generate grid movies + dendrograms of the new and original data I get the following error:
>>> kpms.generate_trajectory_plots(coordinates, results, project_dir, model_name, **config())
Saving trajectory plots to /home/mbullock/Desktop/Glacier_KPMS/2024_02_09-13_20_39/trajectory_plots Traceback (most recent call last): File "