Code Monkey home page Code Monkey logo

vgg-memoji's Introduction

Generating Memoji from Photos

This is the source code used in my article about generating Memoji from photos. Please refer to the original article for context:

https://patniemeyer.github.io/2018/10/29/generating-memoji-from-photos.html

eval-memoji.lua

This script grabs screenshots from a specified region of the screen, scores them with VGG Face against a folder of reference photos, and saves each captured image to a folder naming the file with its score. The script waits for you to hit enter on the keyboard for each capture.

compare-memoji-multi.lua

This script takes a folder of references and a folder of target photos and uses VGG Face to rank the targets based on the output of a selected layer of the network and a simple dot product similarity measure. The top three matching images are displayed along with their scores.

If you have a folder of ranked output from eval-memoji.lua representing e.g. a Memoji with each feature variation, you can run this script on that output folder to match new reference files or experiment with other similarity metrics.

Installing on Mac OS

Homebrew

If you don't have it yet, install the Homebrew package manager:

https://brew.sh/

Torch

Clone the torch repo to a folder called distro. (Some of the install scripts insist on finding this name in the path.)

git clone https://github.com/torch/torch7.git ./distro

Run the install-deps script.

If anything important reports as outdated you can use brew upgrade package to update it.

Run the install script.

Install loadcaffe for loading models:

luarocks install loadcaffe

If you have trouble with qlua insisting on version 4 of Qt you can switch your installed version to 4 with brew :

brew switch qt 4.8.7_2

vgg-memoji's People

Contributors

patniemeyer avatar

Watchers

James Cloos 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.