Skip to content
New issue

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

morph.py give just errors #3

Open
Colliwomple opened this issue Jan 9, 2021 · 5 comments
Open

morph.py give just errors #3

Colliwomple opened this issue Jan 9, 2021 · 5 comments

Comments

@Colliwomple
Copy link

Colliwomple commented Jan 9, 2021

Hi
Executing just morph.py -s images/xxx.jpg -t images/xxx.jpg [-e 1000 -a 0.8 -m 0.8 -w 0.3] gives me just "command not found. "Executing : ./morph.py -s images/trump.jpg -t images/pence.jpg [-e 1000 -a 0.8 -m 0.8 -w 0.3] gives me this:
./morph.py: line 1: import: command not found
./morph.py: line 2: import: command not found
./morph.py: line 3: import: command not found
./morph.py: line 4: import: command not found
./morph.py: line 5: import: command not found
./morph.py: line 8: TRAIN_EPOCHS: command not found
./morph.py: line 10: im_sz: command not found
./morph.py: line 11: mp_sz: command not found
./morph.py: line 13: warp_scale: command not found
./morph.py: line 14: mult_scale: command not found
./morph.py: line 15: add_scale: command not found
./morph.py: line 16: add_first: command not found
./morph.py: line 19: @tf.function: command not found
./morph.py: line 20: syntax error near unexpected token (' ./morph.py: line 20: def warp(origins, targets, preds_org, preds_trg):'
So it doesent work for me in Ubuntu 20.04 with tensorflow 2.4.0

One step further i tried :
DiffMorph$ python3 morph.py -s images/xxx.jpg -t images/xxx.jpg [-e 1000 -a 0.8 -m 0.8 -w 0.3]
2021-01-09 16:47:46.888345: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory
2021-01-09 16:47:46.888361: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Traceback (most recent call last):
File "morph.py", line 4, in
import cv2
ModuleNotFoundError: No module named 'cv2'

Have no idea whats wrong here !

@ftalamo
Copy link

ftalamo commented Jan 9, 2021

Hi! You have to install CV module with this command:
pip install opencv-python

in my case that solve the errors.

@effdotsh
Copy link
Contributor

#6

@Colliwomple
Copy link
Author

Colliwomple commented Jan 11, 2021

Hi ftalamo
No i havent ! Will try it asap. Thx for the answer mate !
Another question . Do the pictures need special aspect ratio ? like 1024x1024 ? Or can i use any other?

@Colliwomple
Copy link
Author

Colliwomple commented Jan 11, 2021

Hi
Have installed it but still the same ...found out it has something to do with the nvidia driver cuda configuration. What do i need for ubuntu 20.04 and Gforce 2080 TI. Found so many stuff and dont know whats the right combination of tensorflow version , CUDA Version and driver version

@kenny1323
Copy link

Hi
Executing just morph.py -s images/xxx.jpg -t images/xxx.jpg [-e 1000 -a 0.8 -m 0.8 -w 0.3] gives me just
"command not found. "Executing : ./morph.py -s images/trump.jpg -t images/pence.jpg [-e 1000 -a 0.8 -m 0.8 -w 0.3] gives me this:
./morph.py: line 1: import: command not found
./morph.py: line 2: import: command not found
etc
Have no idea whats wrong here !

Say, inside the directory DiffMorph there is the file morph.py.
Run:
cd DiffMorph
python3 ./morph.py -s images/1.jpg -t images/b.jpg

Alternative
cd DiffMorph
/user/local/bin/python3 ./morph.py -s images/1.jpg -t images/b.jpg

PS. I am on linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants