Skip to content
/ autocrop Public
forked from leblancfg/autocrop

🆔 Automatically crops faces from batches of pictures

License

Notifications You must be signed in to change notification settings

CSCG/autocrop

Repository files navigation

autocrop

Travis Build Status AppVeyor Build Status PyPI version

Perfect for batch work for ID cards or profile picture processing for your website, autocrop will output images centered around the biggest face detected.

Use

usage: autocrop [-h] [-p PATH] [-w WIDTH] [-H HEIGHT] [-v]

optional arguments:
  -h, --help            show this help message and exit
  -p PATH, --path PATH  folder where images to crop are located. Default:
                        photos/
  -w WIDTH, --width WIDTH
                        width of cropped files in px. Default: 500
  -H HEIGHT, --height HEIGHT
                        height of cropped files in px. Default: 500
  -v, --version         show program's version number and exit

Installation

Simple! In your command line, type:

pip install autocrop

Gotchas

Autocrop uses OpenCV to perform face detection, which is installed through binary wheels. If you already have OpenCV 3+ installed, you may wish to uninstall the additional OpenCV installation: pip uninstall opencv-python.

conda

Development of a conda-forge package for the Anaconda Python distribution is also currently slated for development. Please leave feedback on issue #7 if you are insterested in helping out.

Installing directly

In some cases, you may wish the package directly, instead of through PyPI:

cd ~
git clone https://github.com/leblancfg/autocrop
cd autocrop
pip install .

Requirements

Best practice for your projects is of course to use virtual environments. At the very least, you will need to have pip installed.

Autocrop is currently being tested on:

  • Python:
    • 2.7
    • 3.4
    • 3.5
    • 3.6
  • OS:
    • Linux
    • macOS
    • Windows

More Info

Check out:

Adapted from:

About

🆔 Automatically crops faces from batches of pictures

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%