ximader

Results 3 comments of ximader

Thank you for the given formulas. It is working. Together with several points with known distance it gives proper results. def depth_to_real(midas_prediction, known_points): ''' Transfer relative MiDaS depths to real...

It can be fixed by changing `vidar\utils\config.py` (in my case it is located in C:\Users\username\\.cache\torch\hub\TRI-ML_vidar_main\vidar\utils\config.py) After lines: ``` # Create full path path = path.replace('/', '.') ``` add this: `path...

``` cap = cv2.VideoCapture('video.mp4') ret, frame = cap.read() frame = cv2.resize(frame, (640, 384)) rgb = torch.tensor(frame).permute(2,0,1).unsqueeze(0)/255. with torch.no_grad(): depth_pred = zerodepth_model(rgb, intrinsics) depthmap = depth_pred.permute(0,2,3,1).squeeze().detach().cpu().numpy() depthmap = np.uint8(depthmap/np.max(depthmap) * 255)...