gevi/reproduction_effort/functions/interpolate_along_time.py

12 lines
325 B
Python
Raw Normal View History

2024-02-03 12:44:36 +01:00
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