Refactor/predict multianimal by juan-cobos · Pull Request #3220 · DeepLabCut/DeepLabCut
@juan-cobos , great well-scoped PR, thanks!
I checked the code and everything is consistent now with the old behavior (except one print statement, which I think you improved).
Please see my comments.
Also, one minor other suggestion:
Since this function writes many different output files with a similar base, it might be helpful to define all output paths at the beginning in one single go. This makes the output contract obvious in one glance (and could avoids filename typos in future refactors):
basename = f"{video.stem}{DLCscorer}" paths = { "h5": destfolder / f"{basename}.h5", "full_pickle": destfolder / f"{basename}_full.pickle", "meta_pickle": destfolder / f"{basename}_meta.pickle", "assemblies_pickle": destfolder / f"{basename}_assemblies.pickle", "bpt_features_pickle": destfolder / f"{basename}_bpt_features.pickle", }