Add files via upload
This commit is contained in:
parent
7d4cef92f6
commit
621d188c87
2 changed files with 1 additions and 13 deletions
|
@ -18,7 +18,7 @@ def preprocess_camera_sequence(
|
|||
|
||||
camera_sequence = camera_sequence / camera_sequence[
|
||||
:, :, first_none_ramp_frame:
|
||||
].mean(
|
||||
].nanmean(
|
||||
dim=2,
|
||||
keepdim=True,
|
||||
)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue