Set flow_init to optional

main
Ibai 3 years ago
parent d199d62b8d
commit c432996dd5
  1. 2
      nets/crestereo.py

@ -81,7 +81,7 @@ class CREStereo(nn.Module):
zero_flow = torch.cat((_x, _y), dim=1).to(fmap.device) zero_flow = torch.cat((_x, _y), dim=1).to(fmap.device)
return zero_flow return zero_flow
def forward(self, image1, image2, flow_init, iters=10, upsample=True, test_mode=False): def forward(self, image1, image2, flow_init=None, iters=10, upsample=True, test_mode=False):
""" Estimate optical flow between pair of frames """ """ Estimate optical flow between pair of frames """
image1 = 2 * (image1 / 255.0) - 1.0 image1 = 2 * (image1 / 255.0) - 1.0

Loading…
Cancel
Save