Skip to content

Latest commit

 

History

History
121 lines (91 loc) · 6.01 KB

GETTING_STARTED.md

File metadata and controls

121 lines (91 loc) · 6.01 KB

Installation and Getting started

  1. Create a new folder that will be your Tinder database.
mkdir tinder
cd tinder
  1. You need your Facebook auth token. There are many discussions on this on the internet to find this. You can find your facebook auth token by using a man in the middle (MITM) attack to sniff out the requests. You are looking for access_token=. The MITM attack can be conducted by creating a proxy with SSL certificate. If you are still lost, perhaps check out this or this.

  2. Create a .env file. It is recommended to copy the .env.example file. Replace TODO for the FACEBOOK_AUTH_TOKEN variable where YYYY is replaced with your facebook token in order to login using pynder e.g.

FACEBOOK_AUTH_TOKEN="YYYY"

Alternatively you can use TINDER_AUTH_TOKEN instead of FACEBOOK_AUTH_TOKEN e.g.

TINDER_AUTH_TOKEN="xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx"

Please only include one out of FACEBOOK_AUTH_TOKEN or TINDER_AUTH_TOKEN. The other one should be removed such there are no variables with the value TODO.

  1. You need to initialize git in your tinder folder which is used to track revision history. Run the following commands to initialize git.
git init
git add .
git commit -m "first commit"
  1. Download a pretrained facenet model. I recommend using this model 20170512-110547 mirror. You must download 20170512-110547.zip and extract the contents in your tinder folder. The contents will be a folder named 20170512-110547. You should specify the path to the pretrained model that you use in the .env file using the TINDETHEUS_MODEL_DIR variable. You can use other pretrained facenet models as long as you include the model directory in your folder and change the .env file accordingly.

  2. Choose between a docker container or native setup for tindetheus. Now that we have a working requirement.txt, I think a native setup is easier, but tindetheus will work either way you choose!

docker setup

  1. Pull the latest build from docker.com
docker pull cjekel/tindetheus

or you can build the Dockerfile:

# clone the repo
git clone --recursive https://github.com/cjekel/tindetheus.git
cd tindetheus
# Build the Dockerfile
docker build -t tindetheus .
# if successful you should see the new container within 
docker images
  1. Run the docker container while mounting the tinder directory to /tinder
docker run -it -v /home/cj/tinder/:/tinder cjekel/tindetheus

If you built the dockerfile yourself, then replace cjekel/tindetheus with tindetheus.

In this case /home/cj/tinder/ is the location of my tinder folder on my host machine. You should see something like the following when you run the docker container.

root@c4771abc41i9:/# 
  1. cd into the mounted tinder folder
root@c4771abc41i9:/# cd tinder
  1. Start building your database. Manually reviewing 20-40 profiles will be a good starting point, but you can do it with less. Before you start training a model you have to be sure that you've liked and disliked at leach one profile.
tindetheus browse

The profile images will show up in tinder/temp_images. To view these images open tinder/temp_images in the file explore on your host machine. This works best with large grid icons. Follow the command line instructions to like or dislike the profile.

  1. Continue to further instructions

native setup

If you use Windows you may want to read this guide on how to install tindetheus on Windows.

  1. Clone my repo
git clone https://github.com/cjekel/tindetheus.git
cd tindetheus

Note that pynder on pypi has not been updated.

  1. Install the requirements and tindetheus. Using your favorite virtual Python environment will make things easier.
python -m pip install --upgrade -r requirements.txt
  1. Start building your database. Manually reviewing 20-40 profiles will be a good starting point, but you can do it with less. Before you start training a model you have to be sure that you've liked and disliked at leach one profile.
tindetheus browse

The profile images will show up in a window. Follow the command line instructions to like or dislike the profile.

  1. Continue to further instructions

further instructions

  1. After browsing profiles you can train your personalized classification model at any time. (Make sure you have liked and disliked at least one profile each before running!) Just run
tindetheus train

to build your personalized model. With more profiles you can build a more accurate model, so feel free to browse more profiles at any time and build to your database. Newly browsed profiles aren't automatically added to the model, so you must manually run tindetheus train to update your model.

  1. You can automatically like and dislike profiles based on your trained model. To do this simply run
tindetheus like

which will use your latest trained model to automatically like and dislike profiles. The application will start with a 5 mile search radius, and automatically like and dislike the people in this radius. After running out of people, the search radius is increased by 5 miles and the processes repeats. This goes on until you've used 100 likes, at which point the application stops.

  1. This is all in the early stages, so after each session I highly recommend you backup your tinder folder by creating an archive of the folder.

  2. If you want to manually browse your database, check out this example file.