Detect faces in photos from a Go program using a pure-Go library that installs with one command and needs no C or C++ dependencies.
Run real-time face, pupil, and eye detection on a video stream using Pigo as a library in a Go application.
Compile Pigo to WebAssembly and run face detection directly in a web browser without any server backend.
Use the Pigo command-line tool to detect faces in an image and output coordinates as JSON for downstream processing.
| esimov/pigo | rakyll/boom | masterminds/sprig | |
|---|---|---|---|
| Stars | 4,705 | 4,705 | 4,712 |
| Language | Go | Go | Go |
| Setup difficulty | easy | easy | easy |
| Complexity | 2/5 | 1/5 | 2/5 |
| Audience | developer | ops devops | developer |
Figures from each repo's GitHub metadata at analysis time.
No external libraries required, installs with a single 'go get' command, cascade model files must be downloaded separately for detection.
Pigo is a Go library for detecting faces in images. Given a photo, it can locate faces, find where the pupils and eyes are, and identify specific points on facial features like the corners of the mouth or the bridge of the nose. It works as both an importable library for Go programs and as a standalone command-line tool. The project exists because most face detection tools available for Go are wrappers around C or C++ libraries such as OpenCV. Using those wrappers requires installing those external libraries, which can be complicated, and the process of crossing from Go code into C code adds latency. Pigo is written entirely in Go with no external dependencies, so it installs with a single command and runs without any additional setup. The detection method is based on a published research technique called Pixel Intensity Comparison-based Object detection, which compares brightness values across small regions of an image to classify whether a region contains a face. This approach does not require the image to be preprocessed or converted into special data structures before analysis. The library can also detect faces that are tilted or rotated within the image plane by accepting an angle parameter. Pupil and eye localization was added in version 1.2.0, based on a separate published method for finding eye positions. Facial landmark detection, added in version 1.3.0, identifies specific points across the face using another academic technique. Both capabilities work on still images and can run in real time when paired with a video source. The library can be compiled to WebAssembly, which lets it run directly in a web browser without a server. Pre-built binaries are available for users who do not want to install Go. Command-line flags control minimum and maximum face sizes, the marker shape drawn around detected faces, a threshold for merging overlapping detections, and optional JSON output of detection coordinates.
Pigo is a pure-Go face detection library with no external dependencies, detect faces, pupils, eyes, and facial landmarks in images or real-time video with a single install command and no C/C++ setup.
Mainly Go. The stack also includes Go, WebAssembly.
Use freely for any purpose, including commercial use, as long as you keep the MIT copyright notice.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.