zhanglonghao1992 / One-Shot_Free-View_Neural_Talking_Head_Synthesis

Pytorch implementation of paper "One-Shot Free-View Neural Talking-Head Synthesis for Video Conferencing"
Other
735 stars 141 forks source link

How to solve "ValueError: ImageIO does not generally support reading folders."~Thank you very much~ #41

Closed 805094591 closed 2 years ago

805094591 commented 2 years ago

python demo.py --config config/a.yaml --checkpoint c heckpoint/00000500-checkpoint.pth.tar --source_image photo/a.jpg --driving_video driving_video/a.mp4 demo.py:28: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. config = yaml.load(f) /apply/anaconda3/envs/One-Shot_Free-View_Neural_Talking_Head_Synthesis/lib/python3.6/site-packages/torch/functional.py:445: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:2157.) return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined] demo.py:290: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. config = yaml.load(f) estimate jacobian: False demo.py:75: UserWarning: Implicit dimension choice for softmax has been deprecated. Change the call to include dim=X as an argument. pred = F.softmax(pred) 0%| | 0/986 [00:00<?, ?it/s]/apply/anaconda3/envs/One-Shot_Free-View_Neural_Talking_Head_Synthesis/lib/python3.6/site-packages/torch/nn/functional.py:4004: UserWarning: Default grid_sample and affine_grid behavior has changed to align_corners=False since 1.3.0. Please specify align_corners=True if the old behavior is desired. See the documentation of grid_sample for details. "Default grid_sample and affine_grid behavior has changed " /apply/anaconda3/envs/One-Shot_Free-View_Neural_Talking_Head_Synthesis/lib/python3.6/site-packages/torch/nn/functional.py:1806: UserWarning: nn.functional.sigmoid is deprecated. Use torch.sigmoid instead. warnings.warn("nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.") 100%|█████████████████████████████████| 986/986 [02:06<00:00, 7.81it/s] Traceback (most recent call last): File "demo.py", line 304, in imageio.mimsave(opt.result_video, [img_as_ubyte(frame) for frame in predictions], fps=fps) File "/apply/anaconda3/envs/One-Shot_Free-View_Neural_Talking_Head_Synthesis/lib/python3.6/site-packages/imageio/core/functions.py", line 283, in mimwrite with imopen(uri, "wI", plugin=format) as file: File "/apply/anaconda3/envs/One-Shot_Free-View_Neural_Talking_Head_Synthesis/lib/python3.6/site-packages/imageio/core/imopen.py", line 223, in imopen raise err_type(err_msg) ValueError: ImageIO does not generally support reading folders. Limited support may be available via specific plugins. Specify the plugin explicitly using the plugin kwarg, e.g. plugin='DICOM'

805094591 commented 2 years ago

That phenomenon disappeared and the project ran well by reinstalling the system~Thank you~

Amazingren commented 2 years ago

That phenomenon disappeared and the project ran well by reinstalling the system~Thank you~

Hey man, I got the same problem as yours, what's your mean reinstalling the system? The system on your server?

please let me know, thanks very much~

805094591 commented 2 years ago

I am sorry I did not solve this phenomenon due to I confused two projects when I comment on project issues, but another project(https://github.com/zhengkw18/face-vid2vid) which is similar with this project could run well~ I suggest you to try another project(https://github.com/zhengkw18/face-vid2vid)~ I reinstall Ubuntu on computer and another project(https://github.com/ZPdesu/Barbershop) can run well~ This reinstalling method is for another project(https://github.com/ZPdesu/Barbershop)~ Thank you~

Amazingren commented 2 years ago

I am sorry I did not solve this phenomenon due to I confused two projects when I comment on project issues, but another project(https://github.com/zhengkw18/face-vid2vid) which is similar with this project could run well~ I suggest you to try another project(https://github.com/zhengkw18/face-vid2vid)~ I reinstall Ubuntu on computer and another project(https://github.com/ZPdesu/Barbershop) can run well~ This reinstalling method is for another project(https://github.com/ZPdesu/Barbershop)~ Thank you~

Thank you very much for the kindly patient reply. After reading these projects I gave a comparison between the one-shot (https://github.com/zhanglonghao1992/One-Shot_Free-View_Neural_Talking_Head_Synthesis ) and the fomm (https://github.com/AliaksandrSiarohin/first-order-model). I found that this problem can be solved by just simply modifying this line: parser.add_argument("--result_video", default='', help="path to output") to: parser.add_argument("--result_video", default='result.mp4', help="path to output")

Then I can successfully generate some demo videos.

Anyway, thanks a lot and best regards!

805094591 commented 2 years ago

Thank you for your helpful advice~ Good luck~

leetesla commented 1 year ago

@Amazingren Thanks for your advice, it works.

xaddwell commented 1 year ago

i got the same problem, but i found that the format of the file was not image, so maybe you make the same mistake like me.