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](./download/file.php?id=703&sid=10f5b3cf000c184d591054d90eaffe7e)
- early train.jpg (131.06 KiB) Viewed 31924 times
By 30k, it looked less cursed, but still weird:
![30k.jpg](./download/file.php?id=704&sid=10f5b3cf000c184d591054d90eaffe7e)
- 30k.jpg (174.73 KiB) Viewed 31924 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](./download/file.php?id=705&sid=10f5b3cf000c184d591054d90eaffe7e)
- 50k.jpg (91.47 KiB) Viewed 31924 times
By about 150k or so I was beginning to get insane eye/mouth detail:
![eyes.jpg](./download/file.php?id=706&sid=10f5b3cf000c184d591054d90eaffe7e)
- eyes.jpg (8.17 KiB) Viewed 31924 times
![mouth.jpg](./download/file.php?id=707&sid=10f5b3cf000c184d591054d90eaffe7e)
- mouth.jpg (2.87 KiB) Viewed 31924 times
By about 260k I was getting eyelashes:
![2601.jpg](./download/file.php?id=708&sid=10f5b3cf000c184d591054d90eaffe7e)
- 2601.jpg (55.83 KiB) Viewed 31924 times
![2602.jpg](./download/file.php?id=709&sid=10f5b3cf000c184d591054d90eaffe7e)
- 2602.jpg (56.18 KiB) Viewed 31924 times
At this point I had to stop my experiment though.