Install Homebrew using this ruby script:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install CMake using homebrew: brew install cmake
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
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
face_recognition
Install face_recognition
as follows: sudo pip install face_recognition
If you haven't already, navigate to the App Store and install XCode. Accept the build license once the installation has completed.
Install Apple Command Line Tools with sudo xcode-select --install
Install OpenCV with brew install opencv
Verify the installations by running the following line from your command line: python -c "import cv2, os, pickle, subprocess, sys, face_recognition"
wherestyler.py
Navigate to your home folder (cd ~
) and clone the repository as follows: git clone https://github.com/aj8uppal/wherestyler.git
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
.
Enter the following line into your interpreter: python wherestyler.py
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.
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.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.