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

Error on "Load driving video and source image" section of colab #217

Open
MaalikN opened this issue Aug 7, 2020 · 13 comments
Open

Error on "Load driving video and source image" section of colab #217

MaalikN opened this issue Aug 7, 2020 · 13 comments

Comments

@MaalikN
Copy link

MaalikN commented Aug 7, 2020


RuntimeError Traceback (most recent call last)
in ()
9
10 source_image = imageio.imread('/content/gdrive/My Drive/first-order-motion-model/ev2.jpg')
---> 11 driving_video = imageio.mimread('/content/gdrive/My Drive/first-order-motion-model/brnew.mp4')
12
13

/usr/local/lib/python3.6/dist-packages/imageio/core/functions.py in mimread(uri, format, memtest, **kwargs)
305 ims[:] = [] # clear to free the memory
306 raise RuntimeError(
--> 307 "imageio.mimread() has read over 256 MiB of "
308 "image data.\nStopped to avoid memory problems."
309 " Use imageio.get_reader() or memtest=False."

RuntimeError: imageio.mimread() has read over 256 MiB of image data.
Stopped to avoid memory problems. Use imageio.get_reader() or memtest=False.

@MaalikN
Copy link
Author

MaalikN commented Aug 7, 2020

driving_video = imageio.mimread('/content/gdrive/My Drive/first-order-motion-model/brnew.mp4', memtest=False)
seems to work, is there a reason not to add memtest=False?
The also seems to be slowed down, why is this?

@AliaksandrSiarohin
Copy link
Owner

AliaksandrSiarohin commented Aug 7, 2020

If size of the video is too large it will cause notebook to crash.
Which cell is slowed down?

@MaalikN
Copy link
Author

MaalikN commented Aug 8, 2020

The result from "Load driving video and source image" and the end result of the animated image. The original video is around 29 seconds, the end result is 44.

@AliaksandrSiarohin
Copy link
Owner

You should set fps. Imageio.mimsave(...,fps=...)

@MaalikN
Copy link
Author

MaalikN commented Aug 8, 2020

I ended up cloning the git via anaconda and running it locally. Now it works great! Is there a tutorial on how to get face-swap to work?

@animemoeus
Copy link

Same problem.
From the documentation here, I just tried to disable memtest and its work for me.

@alexjavorski
Copy link

alexjavorski commented Aug 27, 2020

Did you disable the memtest with memtest=False?
If so where and how did you use this line?
@animemoeus

@animemoeus
Copy link

Did you disable the memtest with memtest=False?
If so where and how did you use this line?
@animemoeus

Screenshot_20200827_083158

@alexjavorski
Copy link

Really? Then I mist be doing something else wrong. Thanks

@kcrank1
Copy link

kcrank1 commented Aug 28, 2020

@MaalikN did you solve your video slowing down issue? I was able to bypass the error with memtest=False but I still get a 23 sec video rather than 15 sec as my original video is

@MaalikN
Copy link
Author

MaalikN commented Aug 29, 2020

@kcrank1 I ended up just setting it up on my own computer to run on my hardware instead of google colab. When running on my own gpu it doesn't slow the video down. A solution that I used previously though, was to compare the length of the driving video and the length of the produced video to find what percent the produced one was slowed down by. Then you can speed it up by the exact amount in most editing software.

@kcrank1
Copy link

kcrank1 commented Aug 29, 2020

@MaalikN that's a great workaround. What I ended up doing to get around the problem was noticing that the output video was 20fps, if I edited my input video to be 20fps going in it preserved the speed.

@Wei-En-Chen
Copy link

Wei-En-Chen commented Dec 5, 2020

How can I solve this problem?
The video length of my training data and test data is about 10 seconds. There are 2000 training data and 500 test data.
dataset is mp4 file, picture length:1920 picture width:1080 fps:60
image

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

6 participants