-
Notifications
You must be signed in to change notification settings - Fork 80
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
ValueError: cannot reshape array of size 10752 into shape (64,64,3) #8
Comments
What is the size of source2.png? |
original size is 534x471, I resized it to 64x64 using !convert source2.png -resize 64x64 source2.png |
It tells that the size is something like (56,64,3) |
I am trying to make this into a google colab notebook can share if you can take a look to see the problem? |
Can you send me resized image and driving video? |
@AliaksandrSiarohin see this i am getting a different error now https://colab.research.google.com/drive/12FNlYX_inn3j-9fyxCW_ibs0i4kcNvEL |
tried it with a different image Traceback (most recent call last): |
@AliaksandrSiarohin now getting this error with that image THCudaCheck FAIL file=/pytorch/aten/src/THC/THCGeneral.cpp line=663 error=11 : invalid argument |
Seems like problem with cuda library. Probably pytorch does not match. Try to remove pytorch from the requirements.txt and run again. |
I removed both torch==0.4.1 |
@AliaksandrSiarohin seems it worked but the demo.gif result is weird |
This can happen because model is trained on nemo dataset. It is most likely not generalise outside of this dataset. It expects black bg and proper image crop. To validate this you can check if it works with image from the test part of nemo datarset. If you want a model that work on arvitrarrry faces dataset like vox celeb should be used. |
@AliaksandrSiarohin I tried it with vox.yaml and vox-full.yaml and get this error Traceback (most recent call last): |
I did not publish checkpoints for vox. So you can not try it now. You can try to retrain the network with 64x64 vox. This should work, however larger resulution is not that great with a current code. I'm working on improved version of this work, I will publish all the checkpoint when it will be ready. |
If it is urgent and you do not have access to gpu, I can try to train 64x64 vox for you. |
@AliaksandrSiarohin I am trying to setup a colab notebook which uses a t4 gpu, if I can get training running on it as well, I can start training different models and share it, also suggest adding a google colab notebook to the repo as it makes them more reproducible much easier |
I try to test on faces to get demo.gif result on a 64x64 input image but it I get this error
File "demo.py", line 62, in
source_image = VideoToTensor()(read_video(opt.source_image, opt.image_shape + (3,)))['video'][:, :1]
File "/content/monkey-net/frames_dataset.py", line 28, in read_video
video_array = video_array.reshape((-1,) + image_shape)
ValueError: cannot reshape array of size 10752 into shape (64,64,3)
using this command
!python demo.py --config config/nemo.yaml --driving_video sup-mat/driving.png --source_image source2.png --checkpoint /content/nemo-ckp.pth.tar --image_shape 64,64
The text was updated successfully, but these errors were encountered: