How to detect and remove fake profiles on dating websites
It is important for a dating site to delete fake profiles. On average 1 in 10 dating profiles created are fake.
There are two common types of fake profiles: scammers and impersonators.
A scammer is someone who makes money using illegal methods, especially by tricking people. One of the most common techniques is to build up trust with the person by messaging for weeks or even months before suddenly having an emergency and asking for money.
There are multiple ways to detect scammer profiles: IP detection, natural language processing, behavior analysis etc. One way that is rarely automated is by analyzing the submitted profile images.
Once a profile image has been used by scammers across different dating websites, it can be flagged and later recognized as such. Face Recognition can even help detect images of the same person in other settings.
Impersonators are users who pretend to be someone else. Impersonators will often use photos stolen on the web, such as celebrity pictures.
Having celebrity pictures on a dating website is a sign of poor quality and will turn down users.
For example, pictures of actress Natalie Portman are often used on dating sites.
Remove fake profiles
Setting up an automated image moderation system is a good practice for dating websites that have more than several thousand submissions per day and need to publish them quickly. In this article we will see how to implement this method.
We are going to use an API called Sightengine that can detect scammers and celebrities in images and videos.
Sightengine provides several SDKS in the following languages: PHP, Node.js and Python. In this article we will use the Python SDK as an example.
You must first register on Sightengine’s website, it’s totally free. Just click on the get started button and create an account.
Sightengine works with two keys, we will need these keys to use the SDK in our application. Be careful, do not share them, they are secret keys.
We need to install the SDK. This SDK allow us to use the API in your application.
pip install sightengine
We will send our images to Sightengine. Sightengine will analyze the images and detect if there are celebrities or scammers.
Sightengine return a JSON, in this JSON there is a scam prob attribute that indicates if the image contains a scammer or not. The JSON contains also an an attributes faces that is an array.
This array contains an object for each person present on the image. In this object you can retrieve the position of the face, the position of the attributes of the face and a celebrity attribute that is an array containing multiple celebrities with a probability for each celebrity.
Here is an example of the JSON:
The API is very easy to use. Let say you want moderate the following image:
The only thing to do is to add your credentials and send the url of an image to the API.
Here is the result:
Celebrity detected: Johnny Depp
Celebrity detected: Amber Heard
If you send an image of a scammer, the result will be:
Scammer detected !
The api is really simple to use do not hesitate to try your own images. The API can also detect other elements such as nudity or weapons but this is not part of this article :-)