Update run_svd.py

This commit is contained in:
David Rotermund 2023-07-14 18:58:15 +02:00 committed by GitHub
parent efb19c39f2
commit 4c0b9d63ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -82,6 +82,17 @@ if __name__ == "__main__":
print("Calculate to_remove")
data = torch.tensor(input, device=torch_device)
for id in range(0, data.shape[0]):
data[id, ...] = tv.transforms.functional.affine(
img=data[id, ...].unsqueeze(0),
angle=0,
translate=[tvec[id, 1], tvec[id, 0]],
scale=1.0,
shear=0,
fill=fill_value,
).squeeze(0)
to_remove_data = to_remove(data, whiten_k, whiten_mean)
data -= to_remove_data