qianqianwang68 / omnimotion

Apache License 2.0
2.07k stars 121 forks source link

ModuleNotFoundError: No module named 'vision_transformer' #19

Open zussini opened 10 months ago

zussini commented 10 months ago

I have installed vision_transformer from this site: https://github.com/google-research/vision_transformer/tree/main

but I still get the error: ImportError: cannot import name 'RAFT' from 'raft' (/home/piotr/anaconda3/envs/omnimotion/lib/python3.8/site-packages/raft/init.py) Traceback (most recent call last): File "extract_dino_features.py", line 27, in import vision_transformer as vits ModuleNotFoundError: No module named 'vision_transformer'

Do you have any idea what did I wrong ? I am trying to preprocess my own sequences.

qianqianwang68 commented 10 months ago

Did you do this step https://github.com/qianqianwang68/omnimotion/tree/main/preprocessing#preparation? What command did you run and what does the file structure look like?

zussini commented 10 months ago

Partially :) I mean I have changed a bit to sth like:

cd preprocessing/

cp exhaustive_raft.py filter_raft.py chain_raft.py RAFT/;

with below line I had problems as I did not find any

download_models.sh should I prepare it by myself ?

cd RAFT; ./download_models.sh; cd ../

cp extract_dino_features.py dino/

the sequence folder is in the preprocessing folder

regards

Piotr

wt., 29 sie 2023 o 22:39 Qianqian Wang @.***> napisał(a):

Did you do this step https://github.com/qianqianwang68/omnimotion/tree/main/preprocessing#preparation ? What command did you run and what does the file structure look like?

— Reply to this email directly, view it on GitHub https://github.com/qianqianwang68/omnimotion/issues/19#issuecomment-1698096600, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2KC3H73255BR7I4LRRRXTXXZHPVANCNFSM6AAAAAA4DQBB4U . You are receiving this because you authored the thread.Message ID: @.***>

zussini commented 10 months ago

oh and the error was after executing this command: python main_processing.py --data_dir /absolute-dir-to-sequence/ --chain

qianqianwang68 commented 10 months ago

not exactly sure why. If you go to the RAFT folder and run python exhaustive_raft.py --data_dir /absolute-dir-to-sequence/, do you get the same error?

zussini commented 10 months ago

when I run this python exhaustive_raft.py --data_dir /absolute-dir-to-sequence/ I get only error about RAFT Traceback (most recent call last): File "exhaustive_raft.py", line 18, in from raft import RAFT ImportError: cannot import name 'RAFT' from 'raft' (/home/piotr/anaconda3/envs/omnimotion/lib/python3.8/site-packages/raft/init.py)

qianqianwang68 commented 10 months ago

Hi are RAFT and dino folders empty before you copy the files? You would need to use --recurse-submodules in git clone --recurse-submodules https://github.com/qianqianwang68/omnimotion/ to also clone the submodules of RAFT and dino.

zussini commented 10 months ago

Yes, they were empty. I will follow suggestions and let know. Thanks!

śr., 30 sie 2023, 19:56 użytkownik Qianqian Wang @.***> napisał:

Hi are RAFT and dino folders empty before you copy the files? You would need to use --recurse-submodules in git clone --recurse-submodules https://github.com/qianqianwang68/omnimotion/ to also clone the submodules of RAFT and dino.

— Reply to this email directly, view it on GitHub https://github.com/qianqianwang68/omnimotion/issues/19#issuecomment-1699611671, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2KC3ATFN4KOPJULCYQJX3XX55FDANCNFSM6AAAAAA4DQBB4U . You are receiving this because you authored the thread.Message ID: @.***>

zussini commented 10 months ago

I have reiterated the whole process on another machine and it went smoothly as it seems. If I will find what was the problem on the other machine I will get back with the feedback. Probably some error on my side, but will try to find out.

Best Regards