yoyo-nb / Thin-Plate-Spline-Motion-Model

[CVPR 2022] Thin-Plate Spline Motion Model for Image Animation.
MIT License
3.39k stars 555 forks source link

ModuleNotFoundError: No module named 'skimage' #37

Open wedgeewoo opened 1 year ago

wedgeewoo commented 1 year ago

A:\Thin-Plate-Spline-Motion-Model>set CUDA_VISIBLE_DEVICES=0 & python run.py --config config/vox-256.yaml --checkpoint checkpoints/vox.pth.tar --source_image assets/source.png --driving_video assets/driving.mp4 --find_best_frame --result_video SD_Avatar_Video.mp4 Traceback (most recent call last): File "A:\Thin-Plate-Spline-Motion-Model\run.py", line 9, in from frames_dataset import FramesDataset File "A:\Thin-Plate-Spline-Motion-Model\frames_dataset.py", line 2, in from skimage import io, img_as_float32 ModuleNotFoundError: No module named 'skimage'

How do i fix this? is this a dependency that can be added in the requirements.txt or is this something more complicated?

yoyo-nb commented 1 year ago

pip install scikit-image

wedgeewoo commented 1 year ago

Do i install this in the /modules or in the main directory

yoyo-nb commented 1 year ago

It doesn't matter, pip install or conda install is global

wedgeewoo commented 1 year ago

now im getting this File "A:\Thin-Plate-Spline-Motion-Model\logger.py", line 7, in from skimage.draw import circle ImportError: cannot import name 'circle' from 'skimage.draw' (C:\Users####\AppData\Local\Programs\Python\Python310\lib\site-packages\skimage\draw__init__.py) This is allowed in my PATH environment variable so idk

yoyo-nb commented 1 year ago

Maybe we are using different versions, you can try this pip install -U scikit-image==0.18.3

wedgeewoo commented 1 year ago

AssertionError: Torch not compiled with CUDA enabled

BTW im using Python 3.10 and not 3.9. would this cause an issue?

yoyo-nb commented 1 year ago

you installed the cpu version of torch, you can follow the instructions on pytorch.org to install the appropriate version of torch

or you can run the code with cpu mode

python demo.py --config config/vox-256.yaml --checkpoint checkpoints/vox.pth.tar --source_image assets/source.png --driving_video assets/driving.mp4 --mode relative --find_best_frame --result_video SD_Avatar_Video.mp4 --cpu
wedgeewoo commented 1 year ago

i did cpu mode after trying to get gpu to work. I was able to get the cpu mode working after installing face alignment (pip install face-alignment==1.1.1), used your commands and i was able to render a video! Thanks for the help

wedgeewoo commented 1 year ago

https://user-images.githubusercontent.com/112199050/195016496-e726098c-ef49-4799-aaab-303b69a821b6.mp4

wedgeewoo commented 1 year ago

Im missing something about the gpu version of pytorch, im sure i followed the instructions correctly but I'm still unable to use the GPU. Still though thanks for the awesome repo