Closed HardikJain02 closed 5 months ago
Basic resizing worked.
resized_valid_depth_pred = F.interpolate(valid_depth_pred.unsqueeze(0), size=(192, 256), mode='bilinear', align_corners=False).squeeze(0)
segmentation = (plane_seg[:valid_num].argmax(dim=0)[:,:,None] == torch.arange(valid_num).to(plane_seg)).permute(2, 0, 1) # [h, w, 1] == [] -> [valid_plane_num, h, w]
print(f"Segmentation size: {segmentation.size()}, Valid_depth_pred: {resized_valid_depth_pred.size()}")
inferred_seg_depth = (segmentation * resized_valid_depth_pred).sum(0) # [h, w]
Cannot Inference on these pretrained models: PlaneRecTR_swinb_pretrained.pth & PlaneRecTR_hrnet32_pretrained.pth