I converted this lua code (https://github.com/patniemeyer/vgg-memoji) to python code. I used weight converter and the VGG face model of this github (https://github.com/chi0tzp/PyVGGFace).
It is an algorithm that finds the most similar memoji among memojis that we have through similarity scoring. Obtain the layer immediately preceding the output layer from the pre-trained model and calculate it. It shows the top 3 of the memojis we have. The more memoji we have, we can get the more accurate memoji about the pictures. I'm also designing a function to generate memoj.
- Download this repository.
- Download pre-trained model, vggface.pth on release tab. And, put the file in "models" folder.
- Run the "compare-memoji-multi.py"
- You can add the other sample or pictures of new people by modifying "refsFolder" in "compare-memoji-multi.py" file.
I found Jonathan Ive's the most similar memoji.
Enjoy!
How can we make memoji, not select in images pool?