rizkiarm / LipNet

Keras implementation of 'LipNet: End-to-End Sentence-level Lipreading'
MIT License
635 stars 226 forks source link

Expecting a directory, but getting a video in unseen speakers #24

Closed deepakgupta1313 closed 6 years ago

deepakgupta1313 commented 6 years ago

Look at the last few lines of the error.

File "/home/deepakgupta1313/Desktop/Deepak/Programs/Github/LipNet/lipnet/lipreading/generators.py", line 209, in next_train ret = self.get_batch(cur_train_index, self.minibatch_size, train=True) File "/home/deepakgupta1313/Desktop/Deepak/Programs/Github/LipNet/lipnet/lipreading/generators.py", line 147, in get_batch video = Video().from_frames(path) File "/home/deepakgupta1313/Desktop/Deepak/Programs/Github/LipNet/lipnet/lipreading/videos.py", line 114, in from_frames frames_path = sorted([os.path.join(path, x) for x in os.listdir(path)]) OSError: [Errno 20] Not a directory: '/home/deepakgupta1313/Desktop/Deepak/Programs/Github/LipNet/training/unseen_speakers/datasets/train/s1/bbal6n.mpg'

sf308 commented 6 years ago

I'm having this same problem too!

sf308 commented 6 years ago

I think Line 148 in generators.py needs to be changed so that instead of saying "from_frames" it says "from_video" and Line 149 needs to be amended to include ".split('.')[0]" at the end: for path in X_data_path: video = Video().from_video(path) align = self.get_align(path.split('/')[-1].split('.')[0]) video_unpadded_length = video.length

I di this and the problem was solved but afterwards I ran into more problems.

rizkiarm commented 6 years ago

By default, it would look for folders that contain frames of the videos. If you want it to work with videos directly, please read https://github.com/rizkiarm/LipNet#prerequisites.