Pigo detects faces, eyes or pupils, and facial landmarks in Go without OpenCV. It embeds cascade models and supports WASM for browsers.
Overview
Pigo is a Go library for face detection, pupil or eye localization, and facial landmark point detection. It implements ideas from pixel-intensity comparison research so detection runs in pure Go without binding to OpenCV or other native vision stacks.
Detection uses embedded cascade data in a binary tree structure, so callers do not need integral images, image pyramids, or HOG pyramids. The library can find in-plane rotated faces, localize eyes, and mark landmark points using additional bundled cascades. A command-line utility ships with the module for batch image processing and JSON output.
Because it is pure Go, projects avoid cgo latency and heavy native dependencies. The same core can compile to WebAssembly for browser demos that run detection from a webcam. Examples show calling Pigo as a shared library from Python, although that path trades performance for interoperability.
Typical integration converts source images to grayscale, runs the cascade classifier, and consumes detections as rows, columns, scale, and score tuples. Releases provide standalone binaries for users without a Go toolchain installed.
Key features
- Pure Go face detection cascades
- No OpenCV or third-party vision modules
- Pupil and eye localization support
- Facial landmark point detection
- In-plane rotated face detection
- Embedded cascade model data
- WebAssembly port for browsers
- Bundled command-line detection utility
Use cases
- Webcam face detection in Go services
- Browser demos via WebAssembly builds
- Batch image annotation pipelines
- Embeding detection via shared objects