Coder Social home page Coder Social logo

joyhuang9473 / iffse Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kendricktan/iffse

0.0 2.0 0.0 175 KB

Instagram Facial Feature Search Engine

Home Page: https://kndrck.co/indexing-faces-on-instagram.html

License: MIT License

Python 70.48% HTML 29.52%

iffse's Introduction

IFFSE

example

Setup

The recommended way of installing a local copy of facemaps is to use a python 3.6 conda environment:

wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O conda.sh
chmod +x conda.sh
bash conda.sh
source ~/.bashrc # or `source ~/.zshrc` if you're using zsh

# Create new conda env and use it
conda create -n facemaps python=3.6 anaconda
source activate facemaps

# Annoy Issue:
# Annoy uses libstdc++, Anaconda provides its own libstdc++,
# to use annoy in Anaconda, run:
cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 $CONDA_PATH/envs/facemaps/lib 

Dependencies:

conda install -c conda-forge dlib=19.4
conda install pytorch torchvision -c soumith
pip install -r requirements.txt

Deploying a local copy

  1. Before anything, you'll need to download a copy of the pretrained weights:
git clone https://github.com/kendricktan/iffse.git
cd iffse
mkdir pretrained_weights
wget https://github.com/ageitgey/face_recognition_models/raw/master/face_recognition_models/models/shape_predictor_68_face_landmarks.dat -O ./pretrained_weights/shape_predictor_68_face_landmarks.dat
wget https://www.dropbox.com/s/lhus56cn1xikzeb/openface_cpu.pth?dl=1 -O ./pretrained_weights/openface_cpu.pth
  1. Time to scrap some data! I've written async multi-threaded scrapper that doesn't require any instagram credentials :-). The following tags are used int scrapper.py, change them to whatever tags you want to scrap (e.g. #NYC, #gymlife)
# What kind of tags do we want to scrap
tags_to_be_scraped = [
    'selfie', 'selfportait', 'dailylook', 'selfiesunday',
    'selfietime', 'instaselfie', 'shamelessselefie',
    'faceoftheday', 'me', 'selfieoftheday', 'instame',
    'selfiestick', 'selfies'
]
  1. Run python scrapper.py and wait for a few hours / days. Ideally you do this step on a C4 instance on AWS as it'll max out your cores.

  2. Run server

# If you're running it for the first time
# or want to update search indexes
python app.py --rebuild-tree

# Otherwise
python app.py

Special thanks:

OpenFacePytorch - OpenFace's nn4.small2.v1.t7 model in PyTorch

iffse's People

Contributors

kendricktan avatar

Watchers

James Cloos avatar Yu-Kai Huang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.