iPERDance / iPERCore

Liquid Warping GAN with Attention: A Unified Framework for Human Image Synthesis
https://iperdance.github.io/work/impersonator-plus-plus.html
Apache License 2.0
2.42k stars 316 forks source link

JSONDecodeError #108

Closed Vladut41 closed 3 years ago

Vladut41 commented 3 years ago

raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

d1ddle commented 3 years ago

Can I add to this?

./assets/executables/ffmpeg-4.3.1-win64-static/bin/ffprobe.exe -show_entries stream=codec_type -of json ./assets/samples/references/akun_2.mp4 -loglevel error '.' is not recognized as an internal or external command, operable program or batch file.

[...]

File "C:\Users\hayde\Documents\Motion_Imitate\iPERCore\iPERCore\tools\utils\multimedia\video.py", line 680, in check_video_has_audio result_params = json.loads(results.stdout) File "c:\python38\lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Edit: See my next comment for fix

StevenLiuWen commented 3 years ago

@d1ddle, https://github.com/iPERDance/iPERCore/blob/main/docs/install.md#download-checkpoints-and-samples. you need to download the sampels.zip and unzip the samples.zip to assets which contains the example videos.

d1ddle commented 3 years ago

Hi, @StevenLiuWen Unfortunately that didn't solve the issue, and I ended up having to alter video.py a bit:

Replace line 676 in .\iPERCore\iPERCore\tools\utils\multimedia\video.py with: cmd = f""""{ffprobe_exe_path}" -show_entries stream=codec_type -of json "{video_path}" -loglevel error"""

@Vladut41 let me know if this fixes your issue

I'm trying to run from source on Windows but have some other issues #107

justinjohn0306 commented 3 years ago

Same here...

On Tue, Apr 20, 2021, 8:23 PM d1ddle @.***> wrote:

Hi, @StevenLiuWen https://github.com/StevenLiuWen Unfortunately that didn't solve the issue, and I ended up having to alter video.py a bit: Replace line 676 in .\iPERCore\iPERCore\tools\utils\multimedia\video.py with: cmd = f""""{ffprobe_exe_path}" -show_entries stream=codec_type -of json "{video_path}" -loglevel error"""

I'm trying to run from source on Windows but have some other issues #107 https://github.com/iPERDance/iPERCore/issues/107

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/iPERDance/iPERCore/issues/108#issuecomment-823339964, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIDVKQ3X6J2A27GD2GKAE73TJWIOTANCNFSM43GEDUDQ .

Vladut41 commented 3 years ago

Hi, @StevenLiuWen Unfortunately that didn't solve the issue, and I ended up having to alter video.py a bit:

Replace line 676 in .\iPERCore\iPERCore\tools\utils\multimedia\video.py with: cmd = f""""{ffprobe_exe_path}" -show_entries stream=codec_type -of json "{video_path}" -loglevel error"""

@Vladut41 let me know if this fixes your issue

I'm trying to run from source on Windows but have some other issues #107

I still get the same issue

d1ddle commented 3 years ago

Just above where your error occurred in your previous comment, what error were you getting?

Vladut41 commented 3 years ago

Just above where your error occurred in your previous comment, what error were you getting?

error1

d1ddle commented 3 years ago

That's weird; at first I commented but then realised in line 1 that the command was called right, but it still errors in the same place. Maybe it's something to do with anaconda.

EDIT: Make sure you have downloaded the samples and checkpoint files like @StevenLiuWen said; I can see a System cannot find the path specified

Don't need this but I'll leave it My environment was setup with the pip library virtualenv. pip install virtualenv virtualenv venv cd ./venv/scripts activate.bat Virtual environment!

I have never used anaconda, so I'm not quite sure how it works compared to virtualenv.

Vladut41 commented 3 years ago

That's weird; at first I commented but then realised in line 1 that the command was called right, but it still errors in the same place. ~Maybe it's something to do with anaconda.~

EDIT: Make sure you have downloaded the samples and checkpoint files like @StevenLiuWen said; I can see a System cannot find the path specified

Don't need this but I'll leave it My environment was setup with the pip library virtualenv. pip install virtualenv virtualenv venv cd ./venv/scripts activate.bat Virtual environment!

I have never used anaconda, so I'm not quite sure how it works compared to virtualenv.

Ok so, I removed the ".mp4" after the name of the video in the code and it worked, but now I have No module named 'mmedit' error... Edit: I solved that problem by downloading the "mmedit" but now I get this: FileNotFoundError: [WinError 2] The system cannot find the file specified Edit2: I solved that by downloading the executables but now anaconda can't find the ref_path

d1ddle commented 3 years ago

Compiling from Windows will always get you issues I assume. As far as I know, the mmcv-full=1.2.0+torch=0.7.0+cu101 for Windows doesn't exist, and doesn't compile the wheel properly on Windows and therefore stopped me from progressing furtur with the installation. However since last week I might have another go at this with the following:

StevenLiuWen commented 3 years ago

Hi @Vladut41 @d1ddle @justinjohn0306, we have fixed the bugs in Windows, https://github.com/iPERDance/iPERCore/commit/1c15b8208a4313c91ce6bf7a97a15fe43cee4a74 and try to update the codes to the latest version.

Vladut41 commented 3 years ago

@StevenLiuWen Thanks! It's working now, but when I use two source images I'm getting this error "RuntimeError: cuda runtime error (100) : no CUDA-capable device is detected at ..\aten\src\THC\THCGeneral.cpp:47"

StevenLiuWen commented 3 years ago

Hi @Vladut41, changing the --gpu_ids 2 to --gpu_ids 0.