Add files via upload

This commit is contained in:
David Rotermund 2024-02-23 10:39:00 +01:00 committed by GitHub
parent 7d4cef92f6
commit 621d188c87
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 13 deletions

View file

@ -18,7 +18,7 @@ def preprocess_camera_sequence(
camera_sequence = camera_sequence / camera_sequence[
:, :, first_none_ramp_frame:
].mean(
].nanmean(
dim=2,
keepdim=True,
)

View file

@ -18,8 +18,6 @@ def preprocessing(
temporal_width: float,
target_camera: list[str],
regressor_cameras: list[str],
donor_correction_factor: torch.Tensor,
acceptor_correction_factor: torch.Tensor,
dtype: torch.dtype = torch.float32,
) -> tuple[torch.Tensor, torch.Tensor, torch.Tensor]:
@ -72,14 +70,4 @@ def preprocessing(
)
results.append(output)
donor_factor: torch.Tensor = (
donor_correction_factor + acceptor_correction_factor
) / (2 * donor_correction_factor)
acceptor_factor: torch.Tensor = (
donor_correction_factor + acceptor_correction_factor
) / (2 * acceptor_correction_factor)
results[0] *= acceptor_factor * mask.unsqueeze(-1)
results[1] *= donor_factor * mask.unsqueeze(-1)
return results[0], results[1], mask