You should rely on a Machine Vision API Provider like PixLab or Google Vision for such a task. I'd go with the PixLab /facecompare endpoint which perform faceĀ .