Where's Tyler?


Outtrolling a troll.

The Process

Pre-requisite Installations

  1. Install Homebrew

    Install Homebrew using this ruby script:

    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  2. Install CMake

    Install CMake using homebrew: brew install cmake

  3. Install Dlib

    Clone the Dlib repository, and build/install the library:
    git clone https://github.com/davisking/dlib.git
    cd dlib
    mkdir build; cd build; cmake .. -DDLIB_USE_CUDA=0 -DUSE_AVX_INSTRUCTIONS=1; cmake --build .
    cd ..
    python setup.py install --yes USE_AVX_INSTRUCTIONS --no DLIB_USE_CUDA

  4. Install pip (if you have not already)

    Check if you have installed pip: pip --version
    If you received the version, proceed to step 5.
    If you received an error, install pip with the following script: sudo easy_install pip

  5. Install face_recognition

    Install face_recognition as follows: sudo pip install face_recognition

Onwards!

Install OpenCV

  1. Install XCode

    If you haven't already, navigate to the App Store and install XCode. Accept the build license once the installation has completed.

  2. Install Apple Command Line Tools

    Install Apple Command Line Tools with sudo xcode-select --install

  3. Install OpenCV

    Install OpenCV with brew install opencv

  4. Check installations

    Verify the installations by running the following line from your command line: python -c "import cv2, os, pickle, subprocess, sys, face_recognition"

    If you get an error and do not know how to fix it, please let me know

All good!

Cloning wherestyler.py

  1. Clone the repository

    Navigate to your home folder (cd ~) and clone the repository as follows: git clone https://github.com/aj8uppal/wherestyler.git

  2. Verify files

    Enter the cloned repository (cd wherestyler) and check the contents (ls).
    The file encodings.txt contains the encodings of each face; the program stores the encodings in this file simply because processing the images is time-consuming and we don't want to do that every iteration of the program.
    There are 6 existing images in the folder, {person1.jpg, person2.jpg... person6.jpg}. 3 of these are Tyler, 2 are Jordan, 1 is me.
    Whenever you add a new image to the directory, please follow the directions outlined in wherestyler.py.

Got it! ;)

Running the program

  1. Run the program

    Enter the following line into your interpreter: python wherestyler.py

  2. Follow Instructions

    Follow the onscreen instructions, which tell you how to add a new face. You must name your image file exactly as instructed and make sure it is a jpg otherwise it will not work. Furthermore, make sure to add your name to the array.

    In case you want to add more faces after, simply add them as shown (a subsequent n satisfying the formula person{n}.jpg, and make sure to add their names to the array, with respect to the order of the images.

Let's do this!

Enjoy trolling!

Ping me at aj8uppal@gmail.com if you have any questions.

Background


Where's Tyler was the brainchild of an annoyed individual who kept falling for Tyler's many pranks.

Armed with this tool, we hope that we have finally outtrolled the troll.

Questions?


Ping me at aj8uppal@gmail.com.