xy-guo / MVSNet_pytorch

PyTorch Implementation of MVSNet
621 stars 93 forks source link

RuntimeError: Tensors must have same number of dimensions: got 4 and 3 #47

Open WesternTrail opened 1 year ago

WesternTrail commented 1 year ago

When I set the Model = MVSNET (Refine = TRUE), an error occurs: Runtimeerror: Tensors Must has number of diarsions: Got 4 and 3?IntersectionIntersectionDoes the Internet do not support the Refinement part

Innocence4822 commented 1 year ago

Have you solved this problem?

mumuliu66 commented 1 year ago

me too

Zhaoyibinn commented 2 months ago
    if not self.refine:
        return {"depth": depth, "photometric_confidence": photometric_confidence}
    else:
        resize_transform = torchvision.transforms.Resize(size=(depth.shape[1], depth.shape[2]))
        resized_img = resize_transform(imgs[0][0])
        refined_depth = self.refine_network(resized_img.unsqueeze(0), depth.unsqueeze(0))
        return {"depth": depth, "refined_depth": refined_depth, "photometric_confidence": photometric_confidence}