dgs.utils.state.State.keypoints_and_weights_from_paths¶
- State.keypoints_and_weights_from_paths(paths: tuple[str, ...], save_weights: bool = True) torch.Tensor [source]¶
Given a tuple of paths, load the (local) key-points and weights from these paths. Does change
self.joint_weight
, but does not changeself.keypoints
orself.keypoints_local
respectively.- Parameters:
paths – A tuple of paths to the .pt files containing the key-points and weights.
save_weights – Whether to save the weights if they were provided.
- Returns:
The (local) key-points as
Tensor
.- Raises:
ValueError – If the number of paths does not match the batch size.
FileExistsError – If one of the paths does not exist.