Hello, thank you for your kind words!
But I have a question while using it. In the code, when normalizing the image, is the order of mean = torch.tensor([123.675, 116.28, 103.53])
in RGB or BGR?
I found that the line of code rgb_origin = cv2.imread(an['rgb'])[:, :, ::-1].copy().astype(np.float32)
in
|
rgb_origin = cv2.imread(an['rgb'])[:, :, ::-1].copy() |
has already converted the default BGR format, which is read by cv2.imread(), to RGB when reading the image.
Then, in this line of code rgb = cv2.cvtColor(rgb, cv2.COLOR_BGR2RGB)
in https://github.com/YvanYin/Metric3D/blob/377e6c6642d0aca7aaa5a19e58fdcf5d0fd3d910/mono/utils/do_test.py#L189C5-L189C47, there is another conversion, which means the image is converted back to the BGR order. However, your comment says "BGR->RGB", so I would like to know whether the mean used for normalization is in RGB order or BGR order?
If I understand correctly, this normalization method is used to match the pre-trained ConvNext. However, it seems there is ambiguity here. Did you normalize the data in the training process in the same way, following the BGR order?