We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Here's my code. I am trying to read the optical flow to warp frame 2 back to frame 1. But the results appear to be wrong.
flo = np.load(r'E:\Dataset\SHIFT\flow\0003-17fb\00000040_flow_front.npz') flo = flo['flow'] img_1 = cv2.imread('video/00000040.jpg') img_2 = cv2.imread('video/00000041.jpg') flow_vis = flow_viz.flow_to_image(flo) cv2.imshow('flow_vis', flow_vis) cv2.imshow('img', img_1) cv2.imshow('img2', img_2) img_ten = torch.tensor(img_2).unsqueeze(dim=0).permute(0, 3, 1, 2).cuda().float() flow = torch.tensor(flo).unsqueeze(dim=0).permute(0, 3, 1, 2).cuda() * 1280 img_ten_warp = warp(img_ten, flow) img_ten_warp = img_ten_warp.squeeze(dim=0).permute(1, 2, 0).cpu().numpy().astype(np.uint8) cv2.imshow('img_ten_warp', img_ten_warp) cv2.waitKey()
The text was updated successfully, but these errors were encountered:
Hey @MiaoJieF, thanks for the question! It seems that in your code, you didn't map the optical flow range correctly. In the Carla simulator, the optical flow range is in [-2, 2] (you cloud check its official document https://carla.readthedocs.io/en/latest/ref_sensors/#optical-flow-camera). Also, the codes in carla-simulator/carla#4795 might be helpful. Please come back to me if the problem persists!
Sorry, something went wrong.
Thank you for your reply. I still have a little doubt, is the optical flow provided in SHIFT from t->t-1 or t->t+1?
t->t-1
t->t+1
No branches or pull requests
Here's my code. I am trying to read the optical flow to warp frame 2 back to frame 1. But the results appear to be wrong.
The text was updated successfully, but these errors were encountered: