HypoX64 / DeepMosaics

Automatically remove the mosaics in images and videos, or add mosaics to them.
GNU General Public License v3.0
2.13k stars 441 forks source link

JSONDecodeError when running from Source #94

Closed Lukas-52 closed 2 years ago

Lukas-52 commented 2 years ago

After attempting to change the ffmpeg parameters in the pre build version, unsuccessful, i am now trying to run DeepMasaics from source.

So far i stuck to the installation guide on the front page, i cloned the repository and installed all the dependencies. When im trying to run it from the command line (i'm using Power Shell) i get this error: --------------BUG-------------- Error Type: <class 'json.decoder.JSONDecodeError'> Expecting value: line 1 column 1 (char 0) <FrameSummary file V:\DeepMosaics\deepmosaic.py, line 77 in <module>> <FrameSummary file V:\DeepMosaics\deepmosaic.py, line 51 in main> <FrameSummary file V:\DeepMosaics\cores\clean.py, line 169 in cleanmosaic_video_fusion> <FrameSummary file V:\DeepMosaics\cores\init.py, line 8 in video_init> <FrameSummary file V:\DeepMosaics\util\ffmpeg.py, line 63 in get_video_infos> <FrameSummary file C:\Users\First User\AppData\Local\Programs\Python\Python39\lib\json\__init__.py, line 346 in loads> <FrameSummary file C:\Users\First User\AppData\Local\Programs\Python\Python39\lib\json\decoder.py, line 337 in decode> <FrameSummary file C:\Users\First User\AppData\Local\Programs\Python\Python39\lib\json\decoder.py, line 355 in raw_decode> Please press any key to exit.

This is what i have installed: (im Running Windows 10) --------------Environment-------------- DeepMosaics: 0.5.1 Python: 3.9.4 (tags/v3.9.4:1f2e308, Apr 6 2021, 13:40:21) [MSC v.1928 64 bit (AMD64)] Pytorch: 1.10.0+cu102 OpenCV: 4.5.5

This is the command im running from within the DeepMosaics Folder: python deepmosaic.py --mode clean --media_path V:\test.mp4 --model_path V:\DeepMosaics\pretrained_models\clean_youknow_video.pth --fps 0 --gpu_id 0 -ss 00:00:00 -t 00:00:00 --result_dir V:\DeepResult\ --mask_threshold 64 --tempimage_type png

To me it looks like it cant get useful data from the video, but its a bog standard h264 encoded .mp4 (SD resolution, constant frame rate)

suphamster commented 2 years ago

As far as I know it has problems with running on Python > 3.7 so far I installed Python 3.6,8 and it worked fine for me. Also in releases thread recommended to install Cuda v11.0 version (at least GUI version not working with greater CUDA version for sure). image

Lukas-52 commented 2 years ago

I switched to python 3.6.8 and installed the specific version requested by the requirements.txt from the repo, but im getting the exact same Error :( --------------Environment-------------- DeepMosaics: 0.5.1 Python: 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 24 2018, 00:16:47) [MSC v.1916 64 bit (AMD64)] Pytorch: 1.7.1+cu110 OpenCV: 4.5.1

EDIT:

Found the Problem: To do some sanity checking i tried to check Versions for everything manually and noticed that Powershell didn't know ffmpeg. The old cmd console however does, so i had to fix the ffmpeg install in the system User Path variable...