Thanks for this. I think a discussion on Loss Functions is well worthwhile.
I have had some success with the following combination:
- SSIM - main function
- MAE - 25% - secondary L1 Reg Term
- LPIPS-Alex 50% -. This function sharpens up the swap more than any other function I've seen. On its own, it is a total disaster zone though!
- FFL 100% - How much this helps/does not help I could not say at this stage, but I feel it helps.
These are just numbers I've had success with. Testing loss functions (along with all the other variables involved) does not make it a realistic endeavour for one person to undertake, so take these numbers with a grain of salt, rather than the be-all and end-all
Would be very interested to know other people's findings too.
Some screen grabs from very early in training on a custom 384px Phaze-A model trained at BS 6 with this mix shows the model learning in a very different way from more traditional functions, looking thoroughly cursed:
- early train.jpg (131.06 KiB) Viewed 32679 times
By 30k, it looked less cursed, but still weird:
- 30k.jpg (174.73 KiB) Viewed 32679 times
By 50k, it shows promise. Something interesting I found is that glasses are totally ignored with this mix (bisenet-fp obstructed weights) whilst I would get shadows with more trad. loss functions. Resembling more of an oil painting at this point:
- 50k.jpg (91.47 KiB) Viewed 32679 times
By about 150k or so I was beginning to get insane eye/mouth detail:
- eyes.jpg (8.17 KiB) Viewed 32679 times
- mouth.jpg (2.87 KiB) Viewed 32679 times
By about 260k I was getting eyelashes:
- 2601.jpg (55.83 KiB) Viewed 32679 times
- 2602.jpg (56.18 KiB) Viewed 32679 times
At this point I had to stop my experiment though.