Rudrabha / LipGAN

This repository contains the codes for LipGAN. LipGAN was published as a part of the paper titled "Towards Automatic Face-to-Face Translation".
http://cvit.iiit.ac.in/research/projects/cvit-projects/facetoface-translation
MIT License
578 stars 122 forks source link

Issue with running python Google Collab notebook #28

Closed contentcreatorstories closed 4 years ago

contentcreatorstories commented 4 years ago

Hi, upon running the following cell:

!python3 batch_inference.py --checkpoint_path logs/lipgan_residual_mel.h5 --model residual --face "/content/output_00006.mp4" --fps 25 --audio /content/t.wav --results_dir /content

I get the following errors:

Using TensorFlow backend. Number of frames available for inference: 0 Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/librosa/core/audio.py", line 127, in load with sf.SoundFile(path) as sf_desc: File "/usr/local/lib/python3.6/dist-packages/soundfile.py", line 629, in init self._file = self._open(file, mode_int, closefd) File "/usr/local/lib/python3.6/dist-packages/soundfile.py", line 1184, in _open "Error opening {0!r}: ".format(self.name)) File "/usr/local/lib/python3.6/dist-packages/soundfile.py", line 1357, in _error_check raise RuntimeError(prefix + _ffi.string(err_str).decode('utf-8', 'replace')) RuntimeError: Error opening '/content/t.wav': System error.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "batch_inference.py", line 217, in main() File "batch_inference.py", line 166, in main wav = audio.load_wav(args.audio, 16000) File "/content/LipGAN/audio.py", line 10, in load_wav return librosa.core.load(path, sr=sr)[0] File "/usr/local/lib/python3.6/dist-packages/librosa/core/audio.py", line 142, in load y, sr_native = audioread_load(path, offset, duration, dtype) File "/usr/local/lib/python3.6/dist-packages/librosa/core/audio.py", line 164, in __audioread_load with audioread.audio_open(path) as input_file: File "/usr/local/lib/python3.6/dist-packages/audioread/init__.py", line 111, in audio_open return BackendClass(path) File "/usr/local/lib/python3.6/dist-packages/audioread/rawread.py", line 62, in init self._fh = open(filename, 'rb') FileNotFoundError: [Errno 2] No such file or directory: '/content/t.wav'

I ran all the existing cells before this, do you know what the issue would be?

prajwalkr commented 4 years ago

Hello, we have not tested the Google Colab Code. It says the audio file path is not found. Please check that.

wanfuse123 commented 3 years ago

I have found the reason why one cant mount ones own google drive for these things is because of a race condition with google . First it was suggested that changing the mount location from /content/gdrive to /content/something else but this didnt fix it. What I ended up doing was copying manually the files that are copied to google drive, then installing the google drive desktop application I would then in windows 10 go to the folder which is now located on google drive and disable file permissions inheritance and then manually putting full control rights on the folder to the users group and to authenticated users group. This seems to have fixed this for me. Other times I have noticed with these colabs (not this one in particular but some of the components used like the trained models are missing from the repository (as if they had been removed) Only solution for this is to look around for other sources of these files. This includes scurrying through google search engine and also looking at the git checkout level to find branches besides master and also looking for projects that cloned the project on github to see if they still include the files. Hope this helps!