This is yet another problem that can be solved using Microsoft Cognitive Services. One of the services available in this group, called Face API, provides algorithms for detecting faces, gender, age, emotion, and various face landmarks and attributes, as well as the ability to find face similarities, identify people, group pictures based on visual faces similarities, and others.
Similar to the Text Translate API, there is a free plan that allows up to 30,000 transactions per month, but only 20 every minute. A transaction is basically an API call. There are several paid plans that allow for more transactions per month and per minute, but for the purpose of this problem, you can use the free tier. There is also ...