CLI reference¶
Run uv run doppelsort --help or append --help to any command for the same
information in the terminal.
Global options¶
| Option | Description |
|---|---|
-v, --verbose |
Enable debug logging. |
-q, --quiet |
Only log errors. |
-h, --help |
Show help and exit. |
doppelsort scan¶
Scan one or more directories and create or extend a SQLite face index.
| Argument / option | Default | Description |
|---|---|---|
TARGET_DIRS |
Directories to scan recursively. | |
--db-path FILE |
faces.db |
Destination SQLite database. |
--model-name TEXT |
ArcFace |
DeepFace embedding model. |
--detector-backend |
retinaface |
One of retinaface, mtcnn, opencv, ssd, dlib, mediapipe. |
--overwrite / --append |
--append |
Clear the index first or append new faces. |
--near-duplicate-threshold INTEGER |
0 (off) |
Skip images within N bits of an indexed perceptual hash (0-64). |
--workers INTEGER |
4 |
Threads for hashing and metadata before inference (1-32). |
--json |
off | Emit a machine-readable scan report instead of the human summary. |
doppelsort compare¶
Compare two portraits.
| Option | Default | Description |
|---|---|---|
--model-name TEXT |
ArcFace |
DeepFace embedding model. |
--detector-backend |
retinaface |
Face detector backend. |
--by-similarity / --by-distance |
--by-similarity |
Sort highest similarity or lowest distance. |
--threshold FLOAT |
per model | Cosine-distance threshold for the match decision (0.0-2.0). |
--json |
off | Emit the result as JSON. |
doppelsort match¶
Match a source portrait against faces already indexed in SQLite.
| Option | Default | Description |
|---|---|---|
--db-path FILE |
required | SQLite face index created by scan. |
--top-n INTEGER |
5 |
Maximum matches to return (>=1). |
--model-name TEXT |
ArcFace |
DeepFace embedding model; must match the index. |
--detector-backend |
retinaface |
Face detector backend. |
--by-similarity / --by-distance |
--by-similarity |
Sort highest similarity or lowest distance. |
--threshold FLOAT |
per model | Cosine-distance threshold for the match decision (0.0-2.0). |
--json |
off | Emit the results as JSON. |
doppelsort db¶
db info¶
Print summary statistics for an index. See Database schema for the meaning of each count.
db optimize¶
Remove duplicate face rows, keeping the earliest record for each image and embedding. See Usage for the deduplication rules.