princeton-vl / RAFT

BSD 3-Clause "New" or "Revised" License
3.27k stars 633 forks source link

ModuleNotFoundError: No module named 'utils.utils' #173

Open Bobby-youngking opened 1 year ago

Bobby-youngking commented 1 year ago

File "demo2.py", line 12, in from raft import RAFT File "/mnt/date1/wb_workspace/foshan/RAFT-master/core/raft.py", line 8, in from corr import CorrBlock, AlternateCorrBlock File "/mnt/date1/wb_workspace/foshan/RAFT-master/core/corr.py", line 3, in from utils.utils import bilinear_sampler, coords_grid ModuleNotFoundError: No module named 'utils.utils' can anyone help me ?

noelshin commented 1 year ago

I've encountered the same error. I think by this time you perhaps have figured it out, but as a future reference for other people who run into the same issue:

Adding "core." before the import line that starts with "utils" would fix it. For example,

change from utils.utils import bilinear_sampler, coords_grid to from core.utils.utils import bilinear_sampler, coords_grid

Jdiaz031 commented 6 months ago

If raft from RAFT is working appropriately, I would suggest replacing

from utils.utils import bilinear_sampler, coords_grid

with

from raft.utils.utils import bilinear_sampler, coords_grid