Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
seranus opened this issue Jan 13, 2020 · 6 comments

Comments

@seranus
Copy link

seranus commented Jan 13, 2020

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
Copy link
Collaborator

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

@seranus
Copy link
Author

seranus commented Jan 13, 2020

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

full_frames = []

but you are referencing it later for any input

gen = datagen(full_frames.copy(), mfcc_chunks)

@prajwalkr
Copy link
Collaborator

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

@seranus
Copy link
Author

seranus commented Jan 13, 2020

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
Copy link
Collaborator

Please indicate the line you are talking about.

@seranus
Copy link
Author

seranus commented Jan 13, 2020

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

@seranus seranus closed this as completed Jan 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants