fix(nodes): depth anything processor (#5956)

We were passing a PIL image when we needed to pass the np image.

Closes #5956
This commit is contained in:
psychedelicious 2024-03-14 20:14:47 +11:00
parent a386544a1d
commit fed1f983db

View File

@ -90,8 +90,8 @@ class DepthAnythingDetector:
np_image = np_image[:, :, ::-1] / 255.0
image_height, image_width = np_image.shape[:2]
np_image = transform({"image": image})["image"]
tensor_image = torch.from_numpy(image).unsqueeze(0).to(choose_torch_device())
np_image = transform({"image": np_image})["image"]
tensor_image = torch.from_numpy(np_image).unsqueeze(0).to(choose_torch_device())
with torch.no_grad():
depth = self.model(tensor_image)