sony / nnabla-examples

Neural Network Libraries https://nnabla.org/ - Examples
Apache License 2.0
306 stars 93 forks source link

First Order Motion Model ERROR at play_video #386

Open marujunmac opened 1 year ago

marujunmac commented 1 year ago

Run First Order Motion Model at Google Colab. When run "play_video('result/arbitrary/sample_src.png_by_sample_drv.mp4')", export error below.


FileNotFoundError Traceback (most recent call last) in <cell line: 1>() ----> 1 play_video('result/arbitrary/sample_src.png_by_sample_drv.mp4')

in play_video(filename, height, width) 4 5 def play_video(filename, height=512, width=512): ----> 6 mp4 = open(filename, 'rb').read() 7 data_url = "data:video/mp4;base64," + b64encode(mp4).decode() 8 return HTML(f"""

FileNotFoundError: [Errno 2] No such file or directory: 'result/arbitrary/sample_src.png_by_sample_drv.mp4'

Please teach me how to result this problem.

TomonobuTsujikawa commented 1 year ago

Sorry for my late response.

When you click "RESTART RUNTIME" button, the current directory is changed to default (=/content ). So, you need to change the directory again by %cd nnabla-examples/facial-motion-transfer/first-order-model.

But I find that updated scikit-image removed circle, and this causes another error. So, here is the instruction to overcome these issues:

At first, run the following code (Installing scikit-image will take time on python3.10 environment) :

!pip install -U Pillow
!pip install -U scikit-image~=0.18.0

(RESTART RUNTIME might be needed)

Then, install nnabla and clone examples repository. Finally, you need to change directory after clicking "RESTARTING RUNTIME".

We will update to be able to use latest scikit-image, but please try this instruction as of now.

Sorry for inconvenience.

pdachiang commented 1 year ago

thank you for your reply! after i run the code you uploaded, the error has been fixed it almost take 10 mins to realize the

!pip install -U scikit-image~=0.18.0

TomonobuTsujikawa commented 1 year ago

Thank you for confirming! Now we are updating our code to be able to use latest scikit-image by https://github.com/sony/nnabla-examples/pull/389, but this needs updated nnabla to be able to work this in Colab, so please wait a moment until v1.36.0 is released.