Question about Phaze-A model scaling

Want to understand the training process better? Got tips for which model to use and when? This is the place for you


Forum rules

Read the FAQs and search the forum before posting a new topic.

This forum is for discussing tips and understanding the process involved with Training a Faceswap model.

If you have found a bug are having issues with the Training process not working, then you should post in the Training Support forum.

Please mark any answers that fixed your problems so others can find the solutions.

Locked
User avatar
Atticus
Posts: 2
Joined: Wed Sep 01, 2021 8:11 am
Has thanked: 1 time

Question about Phaze-A model scaling

Post by Atticus »

How is the scaling determined for the different Phaze-A models? I'm testing out models not included in keras, but not sure what to put for scaling or when to leave it blank. I see that "some models expect different scaling" I'm just not sure how to know. https://github.com/deepfakes/faceswap/b ... _a.py#L587

User avatar
torzdf
Posts: 2651
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 129 times
Been thanked: 622 times

Re: Question about Phaze-A model scaling

Post by torzdf »

Ha! Your link just showed me a bug in my -1 to 1 scaling (now fixed), so thanks for that.

I just pulled this information from keras applications, for example this for efficientnet (https://www.tensorflow.org/api_docs/pyt ... cientNetB0):

Note: each Keras Application expects a specific kind of input preprocessing. For EfficientNet, input preprocessing is included as part of the model (as a Rescaling layer), and thus tf.keras.applications.efficientnet.preprocess_input is actually a pass-through function. EfficientNet models expect their inputs to be float tensors of pixels with values in the [0-255] range.

Faceswap, by default, normalizes to the 0-1 range, so when using encoders in an alternative numeric range, we need to change our inputs. For different encoders you will need to refer to the original code/documentation to see what numeric range is required, and what adjustments would need to be made.

As an aside, I would be very interested in seeing anything you are working on and results that it achieves.

My word is final

User avatar
Atticus
Posts: 2
Joined: Wed Sep 01, 2021 8:11 am
Has thanked: 1 time

Re: Question about Phaze-A model scaling

Post by Atticus »

This is super helpful, thanks! I'll share any good or interesting results I come across.

Locked