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

"Weights file not found." despite them being present #29

Closed
Irastris opened this issue Jan 29, 2018 · 10 comments
Closed

"Weights file not found." despite them being present #29

Irastris opened this issue Jan 29, 2018 · 10 comments

Comments

@Irastris
Copy link

try:
	encoder.load_weights("models/encoder.h5")
	decoder_A.load_weights("models/decoder_A.h5")
	decoder_B.load_weights("models/decoder_B.h5")
	# netDA.load_weights("models/netDA.h5") 
	# netDB.load_weights("models/netDB.h5") 
	print("model loaded.")
except:
	print("weights file not found.")
	pass

At this point in the code, it always fails, saying it couldn't find the weight files. They are located at ./faceswap-GAN-master/models/. Is this incorrect? I should note that the model is the Trump to Cage model from the deepfakes/faceswap project, and that I commented out netDA and netDB because they do not exist.

Any help? Thank you.

@Irastris
Copy link
Author

Apologies, I figured out where I was going wrong.

@shaoanlu
Copy link
Owner

shaoanlu commented Jan 30, 2018

Thanks for the feedback. I'll modify the error message to prevent confusion.

@vamzii
Copy link

vamzii commented Feb 28, 2018

screenshot 2
screenshot 3
screenshot 4
screenshot 5
screenshot 1

"Error occurs during loading weights files."

i placed the training files too, then too getting this error, any help?

@shaoanlu
Copy link
Owner

shaoanlu commented Mar 1, 2018

@vamzii It seems like you have the wrong model. Where are those weights files come from? It is not compatible with other repo's pre-trained weights.

@vamzii
Copy link

vamzii commented Mar 1, 2018

i copied the model files from fakeapp 1.1,where should i get the actual models from mate??

@kayleeliyx
Copy link

kayleeliyx commented Jan 11, 2019

I got the same error
image

How should I arrange the file path?
I download the file from https://anonfile.com/p7w3m0d5be/face-swap.zip
image

and then I arrange the file path like this:
image

May I ask how can I fix it? Is there anything wrong with the model?

@kayleeliyx
Copy link

try:
	encoder.load_weights("models/encoder.h5")
	decoder_A.load_weights("models/decoder_A.h5")
	decoder_B.load_weights("models/decoder_B.h5")
	# netDA.load_weights("models/netDA.h5") 
	# netDB.load_weights("models/netDB.h5") 
	print("model loaded.")
except:
	print("weights file not found.")
	pass

At this point in the code, it always fails, saying it couldn't find the weight files. They are located at ./faceswap-GAN-master/models/. Is this incorrect? I should note that the model is the Trump to Cage model from the deepfakes/faceswap project, and that I commented out netDA and netDB because they do not exist.

Any help? Thank you.

Would you please tell me what's wrong with it?

@shaoanlu
Copy link
Owner

faceswap-GAN model weights files are not compatible with deepfakes'.

@kayleeliyx
Copy link

kayleeliyx commented Jan 11, 2019

faceswap-GAN model weights files are not compatible with deepfakes'.

Oh! Thank you so much for your help! May I ask where can I get the model weights file? Thank you so much for helping beginners.
By the way, is there any great dataset? I try to input video by myself.
The original image is:
image

The result is really bad and I only get this in raw-image:
image

Here is the aligned image
image

@kayleeliyx
Copy link

kayleeliyx commented Jan 14, 2019

try:
	encoder.load_weights("models/encoder.h5")
	decoder_A.load_weights("models/decoder_A.h5")
	decoder_B.load_weights("models/decoder_B.h5")
	# netDA.load_weights("models/netDA.h5") 
	# netDB.load_weights("models/netDB.h5") 
	print("model loaded.")
except:
	print("weights file not found.")
	pass

At this point in the code, it always fails, saying it couldn't find the weight files. They are located at ./faceswap-GAN-master/models/. Is this incorrect? I should note that the model is the Trump to Cage model from the deepfakes/faceswap project, and that I commented out netDA and netDB because they do not exist.

Any help? Thank you.

May I ask where can I download model weights? Thank you so much for your help. The weights for GAN

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

4 participants