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

When using a single image UnboundLocalError: local variable 'full_frames' referenced before assignment #6

Closed seranus closed 4 years ago

seranus commented 4 years ago

When using a single image full_frames is not defined

Traceback (most recent call last): File "batch_inference.py", line 228, in <module> main() File "batch_inference.py", line 178, in main print ("Number of frames to be used for inference: "+str(len(full_frames))) UnboundLocalError: local variable 'full_frames' referenced before assignment

Also FPS is a required parameter, in the docs for image it isn't specified

prajwalkr commented 4 years ago

I have fixed both the issues now. Please let me know if it is alright :)

seranus commented 4 years ago

It does not fix my main issue, you are defining full_frames only if the input is a video

https://github.com/Rudrabha/LipGAN/blob/0cecae162e1ca19c8112d36ee46190143259f020/batch_inference.py#L166

but you are referencing it later for any input

https://github.com/Rudrabha/LipGAN/blob/0cecae162e1ca19c8112d36ee46190143259f020/batch_inference.py#L198

prajwalkr commented 4 years ago

Sorry about that. Defined full_frames for single image input as well. Any other errors?

seranus commented 4 years ago

It works now, what model goes into --checkpoint param it doesn't say in the param description. Is it the path to the LipGAN or I have to train a generator?

prajwalkr commented 4 years ago

Please indicate the line you are talking about.

seranus commented 4 years ago

Thanks, it works now. I was using the folder path instead of the LipGan file path for --checkpoint