You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is coming from the fact that self.net_actions=NetAction class is not initialized correctly. So, to solve this issue change the eval code like this:
import netdef_slim as nd
img0 = 'path to image 0 path'
img1 = 'path to image 1 path'
c_model = nd.load_module(path='full path to controller.py, avoid the relational path')
c = c_model.Controller()
c_net = c.net_actions(net_dir=c.base_path)
out = c_net.eval(img0, img1)
out_flow = out['flow[0].fwd'][0]
# You can use flowlib.py/flow_to_image() from FlowNet2 or other packages to visualize the results.
# Don't forget to do the dimension correction. Curent dimension are [2,w,h] and 2 for (u,v) pairs
# out is an OrderedDict with the following structure
#OrderedDict(['flow[0].fwd', np.array[...],
'occ[0].fwd', np.array[...],
'occ_soft[0].fwd', np.array[...],
'mb[0].fwd', np.array[...],
'mb_soft[0].fwd', np.array[...],
])
out = c.net_actions.eval(img0, img1)
returns:(using tried with img0 and img1 as path to the image and as numpy array)
The text was updated successfully, but these errors were encountered: