UniDepth
UniDepth copied to clipboard
The depth color is opposite to the sample given
` import numpy as np from PIL import Image import torch import h5py import os import numpy as np import cv2
device = torch.device("cuda" if torch.cuda.is_available() else "cpu") model = model.to(device) rgb = torch.from_numpy(np.array(orgin_rgb_data)).permute(2, 0, 1) # C, H, W predictions = model.infer(rgb) depth = predictions["depth"] depth=np.array(depth.cpu().squeeze()) xyz = predictions["points"] intrinsics = predictions["intrinsics"]`
The color of the obtained depth image is opposite to that of the image given in the sample. The color of the far position in the sample is dark, while the color of the near position is light, as shown in the following figure1
figure1
figure 2 was generated by me using the UniDepthV1 model. How should I adjust the parameters to obtain the same results as in the example (darker color in far positions and lighter color in near positions)