Fix - setting cropping parameters in `analyze_videos` for PyTorch models by n-poulsen · Pull Request #2849 · DeepLabCut/DeepLabCut

Addresses issue #2847 - the cropping parameter wasn't given to the video iterator correctly.

Additionally, an issue was noted when predicting pose from heatmaps on an MPS device:

  • the device for the pose array was not set, while the device for the x, y and dz arrays could be either cpu, cuda or mps
  • this could lead to issues where the assignment pose[:, :, :, 0] = x would silently fail, with only a portion of the x array being assigned to the pose array

This issue was also resolved.