Visitar URL original
docs: swap demo faces to famous public-domain paintings (recognizing … · mudler/face-detect.cpp@abb714d · GitHub
Skip to content

Commit abb714d

Browse files
committed
docs: swap demo faces to famous public-domain paintings (recognizing the masters)
Replace the politician/group-photo faces with 10 famous public-domain artworks (Mona Lisa, Vermeer, Rembrandt, Van Gogh, the Laughing Cavalier, Napoleon, ...), all real facedetect-cli output: SCRFD fires on classic realist oil portraits with sane 5-point landmarks. Header 'recognizing the masters'; the age/gender is the model's literal reading of a painting (charming honest mis-reads, labeled as such). Verify beat is real (Mona Lisa vs Girl with a Pearl Earring -> DIFFERENT, dist 0.82). Re-render carousel cols+square + the Mona Lisa still. Artworks are PD-Art faithful reproductions from Wikimedia Commons (provenance in art/sources.txt), downscaled for repo size. No politics, no privacy, no em-dashes. Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Assisted-by: Claude:claude-opus-4-8 [Claude Code]
1 parent 5cc3f5a commit abb714d

24 files changed

Lines changed: 194 additions & 110 deletions

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
face-detect.cpp is a from-scratch C++17 port of the [insightface](https://github.com/deepinsight/insightface) buffalo face-recognition pipeline, built on [ggml](https://github.com/ggml-org/ggml). It runs the full chain (SCRFD detection, 5-landmark similarity-transform alignment to 112x112, ArcFace embedding) from a single self-contained GGUF file, with no Python, no PyTorch, and no onnxruntime at inference time. The honest headline is not raw CPU speed (on CPU it trails onnxruntime's MLAS conv kernels, and we say so below): it is simplicity, breadth, and bit-exact parity. One small `libfacedetect.so` does detect, align, recognize, age/gender, anti-spoof, and dense landmarks across six model packs, with detector boxes and landmarks matching insightface to within 1 px and the recognition embedding matching to cosine 1.000000. It is the native replacement for LocalAI's Python `insightface` backend, consumed through a flat C ABI (`include/facedetect_capi.h`) via purego / dlopen.
1010

11-
![face-detect.cpp: live face recognition across 10 real faces, detect plus 5 landmarks plus recognize plus age and gender, one binary, no Python](benchmarks/media/face_carousel.gif)
11+
![face-detect.cpp: live face recognition across 10 famous paintings, detect plus 5 landmarks plus recognize plus age and gender, one binary, no Python](benchmarks/media/face_carousel.gif)
1212

13-
Live face recognition across 10 real faces: detect, 5-landmark align, recognize, and age and gender, all from one self-contained binary with no Python ([full clip](benchmarks/media/face_carousel.mp4), [square version for social](benchmarks/media/face_carousel_square.mp4)). The full per-face output on a single photo:
13+
Live face recognition on 10 famous public-domain paintings (the Mona Lisa, Vermeer, Rembrandt, Van Gogh and more): detect, 5-landmark align, recognize, and age and gender, all from one self-contained binary with no Python ([full clip](benchmarks/media/face_carousel.mp4), [square version for social](benchmarks/media/face_carousel_square.mp4)). The age and gender are the model's literal reading of a painting, which makes for some charming honest mis-reads. The full per-face output, here on the Mona Lisa:
1414

1515
<p align="center">
1616
<img src="benchmarks/media/face_demo.png" width="92%" alt="the full pipeline output on one photo: detect box, 5 landmarks, recognition, age and gender, and verify">

‎benchmarks/demo/art/botticelli.jpg‎

167 KB
Loading

‎benchmarks/demo/art/durer.jpg‎

138 KB
Loading
151 KB
Loading

‎benchmarks/demo/art/ingres.jpg‎

190 KB
Loading
194 KB
Loading

‎benchmarks/demo/art/madame_x.jpg‎

76.8 KB
Loading

‎benchmarks/demo/art/mona_lisa.jpg‎

214 KB
Loading

‎benchmarks/demo/art/napoleon.jpg‎

121 KB
Loading
231 KB
Loading

0 commit comments

Comments
 (0)