Giter Club home page Giter Club logo

pychubby-cu's Introduction

Build Status codecov PyPI version Documentation Status PyPI - Python Version

PyChubby

Tool for automated face warping

intro

Installation

pip install pychubby

If you get an error FileNotFoundError: [Errno 2] No such file or directory: 'cmake': 'cmake', you need to make sure cmake is installed. If you're on OSX you can install this via Homebrew with:

brew install cmake

For other platforms please consult the Cmake documentation at https://cmake.org/install/

Description

For each face in an image define what actions are to be performed on it, pychubby will do the rest.

Documentation

https://pychubby.readthedocs.io

Minimal Example

import matplotlib.pyplot as plt

from pychubby.actions import Chubbify, Multiple, Pipeline, Smile
from pychubby.detect import LandmarkFace

img_path = 'path/to/your/image'
img = plt.imread(img_path)

lf = LandmarkFace.estimate(img)

a_per_face = Pipeline([Chubbify(), Smile()])
a_all = Multiple(a_per_face)

new_lf, _ = a_all.perform(lf)
new_lf.plot(show_landmarks=False, show_numbers=False)

CLI

pychubby also comes with a CLI that exposes some of its functionality. You can list the commands with pc --help:

Usage: pc [OPTIONS] COMMAND [ARGS]...

  Automated face warping tool.

Options:
  --help  Show this message and exit.

Commands:
  list     List available actions.
  perform  Take an action.

To perform an action (Smile in the example below) and plot the result on the screen

pc perform Smile INPUT_IMG_PATH

or if you want to create a new image and save it

pc perform Smile INPUT_IMG_PATH OUTPUT_IMG_PATH

Development

git clone https://github.com/jankrepl/pychubby.git
cd pychubby
pip install -e .[dev]

pychubby-cu's People

Contributors

jankrepl avatar pzelnip avatar fgriberi avatar whatisand 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.