MIT License

项目介绍

jankrepl/pychubby 是一个托管在 GitHub 上的开源项目,主要使用 Python 编写,采用 MIT License 许可证,目前获得 300 个 Star、36 次 Fork。

仓库全名
jankrepl/pychubby
开源许可证
MIT License
Star 数
300
Fork 数
36
未关闭 Issue
2

README 摘要

PyChubby Tool for automated face warping Installation 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: For other platforms please consult the Cmake documentation at Description For each face in an image define what actions are to be performed on it, pychubby will do the…

完整内容见 GitHub 原始 README 或本页 。

常见问题

pychubby 用什么语言开发?

主要使用 Python 编写,采用 MIT License 许可证,目前有 300 个 Star。

pychubby 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 pychubby 的源码?

可以直接克隆仓库:git clone https://github.com/jankrepl/pychubby.git,默认分支为 master;安装与运行步骤见仓库 README。

pychubby 最近还在维护吗?

仓库最近一次更新为 2022年10月6日,当前有 2 个未关闭 Issue;Star 数为 300,可作为社区活跃度的参考。

关于

Automated face warping tool.

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

语言占比

Python

README

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]

评论

暂无评论