Roundface
Generate profile photos for all faces in a given image
Input
Output
Greyed
Requirements:
- Python 3
- OpenCV
- NumPy
Installation
pip install opencv-python roundface
Project Setup
- Clone repo
- CD in project
- Create python virtual environment:
python -m venv venv - Activate virtual environment:
venv/bin/activateorvenv\Scripts\activate - Install requirements with pip:
pip install -r requirement.txt
Usage:
roundface - s <path to image file or folder>
python roundface.py - s <path to image file or folder>
More Options:
-g or --grey Integer. 1 or 0. Specifies whether resulting photos should be greyed out.
- sz or --size Integer. Desired output size in pixels
- r or --radius Integer (Float). e.g 1.2 for 20% more than the default radius.
Faces that can't fit a particular radius will be skipped
Examples
roundface -s z://home/photos
roundface -s z://home/photos/myself.jpg
roundface -s vacation/photos - sz 400 -g 1
roundface -s vacation/photos - sz 400 -r 1.0
python roundface.py -s z://home/photos
python roundface.py -s z://home/photos/myself.jpg
python roundface.py -s vacation/photos - sz 400 -g 1
python roundface.py -s vacation/photos - sz 400 -r 1.0
A folder named roundface will in created in the same location as the image source. It will contain the output photos.
Credits:
Metadata
Release files for roundface 0.0.17
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| roundface-0.0.17.tar.gz | 5.3 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| roundface-0.0.17-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.6 MB
Release files / roundface-0.0.17.tar.gz
| Download URL | roundface-0.0.17.tar.gz |
|---|---|
| Size | 5.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f57671fdb67bec09f4cd82846900e5aa0feab5c3151a63ad67f9c12997545677
|
|
BLAKE2b-256 checksum How to use checksums |
3be2cc105083deb24ace4d82aa012d306b66880ae2dc1c111016b306efc3c087
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3
|
Release files / roundface-0.0.17-py3-none-any.whl
| Download URL | roundface-0.0.17-py3-none-any.whl |
|---|---|
| Size | 5.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5ee5048c8fa1654d0aca3670eda764dd0798efe79f61b4046c8f4788c7bc83bc
|
|
BLAKE2b-256 checksum How to use checksums |
516ec933d768d14e429972252c6c398d2a49aa19d8a2d9cdf1e98b239e867a25
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3
|