Made in Python using OpenCV, Tkinter, PIL, and lots of Photoshop. Thanks for watching!
See more cool stuff at http://carolinehermans.com
How I do my calculations/recommendations:
An oval face corresponds to a face length that is 1.5x greater than face width. A heart face corresponds to a forehead width that is more than marginally greater than the chin width. A square face corresponds to a face where the forehead width and chin width are approximately the same, and a round face corresponds to a chin width slightly less than the forehead width. FourEyes turns the two measured facial distances into ratios and goes through several checks of how similar the ratios are to the various target ratios. My program categorizes the user’s face based on the ratios and their similarity to ideal oval, square, heart, and round shapes. I’ve tested it extensively on photos from google images and also on my friends, and it consistently gives reliable and varied results.
Luckily, recommending glasses from there is logically straightforward. All of the sources I looked at recommended a very clear relationship between face shape and glasses frames. Oval faces correspond to square frames, round goes to rectangular frames, heart goes to thin frames, and square goes to round frames.