gevi/reproduction_effort/functions/interpolate_along_time.py
2024-02-03 12:44:36 +01:00

11 lines
325 B
Python

import torch
def interpolate_along_time(camera_sequence: list[torch.Tensor]) -> None:
camera_sequence[2][:, :, 1:] = (
camera_sequence[2][:, :, 1:] + camera_sequence[2][:, :, :-1]
) / 2.0
camera_sequence[3][:, :, 1:] = (
camera_sequence[3][:, :, 1:] + camera_sequence[3][:, :, :-1]
) / 2.0