A CLI tool that groups photos by person using offline face recognition.
Project description
face-organizer
A CLI tool that groups photos by person using offline face recognition.
Installation
# Default (dlib backend)
pipx install face-grouper
# With ArcFace support (more accurate, recommended)
pipx install "face-grouper[arcface]"
# Upgrade (core only)
pipx upgrade face-grouper
# Upgrade with ArcFace support
pipx install "face-grouper[arcface]" --force
Compile error? Install CMake first:
brew install cmake(macOS),sudo apt install cmake build-essential(Linux), or Visual Studio Build Tools (Windows).
Don't have pipx? brew install pipx && pipx ensurepath (macOS) or pip install --user pipx && pipx ensurepath (Linux/Windows).
Usage
# ⭐ Quick start — named clusters, flat output, include single-photo people
fgroup group ./photos --reference-dir ./refs --output ./sorted --backend arcface --mode rename --min-samples 1
# Basic grouping into person_1/, person_2/, ... subfolders
fgroup group ./photos --output ./sorted
# Pass individual files
fgroup group a.jpg b.jpg c.jpg --output ./sorted
# Disable multi-face export (legacy: one output per photo)
fgroup group ./photos --output ./sorted --no-multi-export
Originals are never modified. Supported formats: .jpg .jpeg .png .webp .bmp
Parameters
| Option | Default | Description |
|---|---|---|
INPUTS... |
(required) | Directories or image files to scan (recursive) |
--output / -o |
(required) | Output directory |
--backend |
dlib |
dlib (fast, 128-D) or arcface (accurate, 512-D, downloads ~300 MB on first run) |
--mode |
group |
group → person_N/ subfolders; rename → flat person_N_img_M.ext files |
--keep-originals |
false |
Accepted for compatibility — originals are never modified in any mode |
--eps |
0.5 |
DBSCAN max distance between embeddings for same person. Raise to merge split clusters, lower to split merged ones. Use --debug to calibrate |
--min-samples |
2 |
Min photos to form a cluster. People below threshold go to unknown/. Set to 1 to keep solo faces |
--reference-dir |
none | Folder of named reference images. john.jpg → cluster named john. Multiple photos per person supported: john_1.jpg, john_2.jpg, … all map to john |
--no-multi-export |
false |
Only use the largest face per photo. By default every detected face is exported independently — a photo with two people lands in both person folders. |
--model |
hog |
dlib only: hog (fast) or cnn (accurate, GPU recommended) |
--upsample |
1 |
dlib only: upsample N times before detection — finds smaller faces, ~4× cost per level |
--dry-run |
false |
Preview planned operations without copying anything |
--debug |
false |
Print pairwise distance stats to help choose --eps |
Dev mode
git clone https://github.com/your-username/face-organizer.git
cd face-organizer
pip install -e .
Changes to face_grouper/*.py take effect immediately — no reinstall needed. Only re-run pip install -e . if you change pyproject.toml (e.g. new dependency or entry point).
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file face_grouper-0.2.0.tar.gz.
File metadata
- Download URL: face_grouper-0.2.0.tar.gz
- Upload date:
- Size: 15.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11d6f03916f1c150d0df4fc6564753727f6ac6a4bd1fb954d1394ccb21da53dc
|
|
| MD5 |
da4cf25305447dd6209a359f3682fb21
|
|
| BLAKE2b-256 |
af89e8d8e4333dcd04e47bb67b9abedcca609924e4366be9401346e4b0c5c472
|
Provenance
The following attestation bundles were made for face_grouper-0.2.0.tar.gz:
Publisher:
publish.yml on dinhanhthi/face-organizer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
face_grouper-0.2.0.tar.gz -
Subject digest:
11d6f03916f1c150d0df4fc6564753727f6ac6a4bd1fb954d1394ccb21da53dc - Sigstore transparency entry: 1420021881
- Sigstore integration time:
-
Permalink:
dinhanhthi/face-organizer@01a428f788c1c309692ac1fe3ab4d4f781d08ce2 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/dinhanhthi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@01a428f788c1c309692ac1fe3ab4d4f781d08ce2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file face_grouper-0.2.0-py3-none-any.whl.
File metadata
- Download URL: face_grouper-0.2.0-py3-none-any.whl
- Upload date:
- Size: 16.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d26eff2f076b32dc9efac76b6a24aa8c119961f4e3fac04ea9e3241ae614372f
|
|
| MD5 |
096f50f5cc120a8d2a2ea8c5079602c8
|
|
| BLAKE2b-256 |
a637fc7251f4f98cc47e1bff6ae1532aa94411bfcc4423488b0fcf77c82f2abf
|
Provenance
The following attestation bundles were made for face_grouper-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on dinhanhthi/face-organizer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
face_grouper-0.2.0-py3-none-any.whl -
Subject digest:
d26eff2f076b32dc9efac76b6a24aa8c119961f4e3fac04ea9e3241ae614372f - Sigstore transparency entry: 1420022001
- Sigstore integration time:
-
Permalink:
dinhanhthi/face-organizer@01a428f788c1c309692ac1fe3ab4d4f781d08ce2 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/dinhanhthi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@01a428f788c1c309692ac1fe3ab4d4f781d08ce2 -
Trigger Event:
push
-
Statement type: