whatisgithub

What is pigo?

esimov/pigo — explained in plain English

Analysis updated 2026-06-26

4,705GoAudience · developerComplexity · 2/5LicenseSetup · easy

In one sentence

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.

Mindmap

mindmap
  root((pigo))
    What it does
      Face detection
      Pupil localization
      Landmark detection
      Real time video
    Tech stack
      Go
      WebAssembly
    Features
      No dependencies
      CLI tool
      JSON output
    Use cases
      Image analysis
      Browser detection
      Go app embedding
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

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.

USE CASE 2

Run real-time face, pupil, and eye detection on a video stream using Pigo as a library in a Go application.

USE CASE 3

Compile Pigo to WebAssembly and run face detection directly in a web browser without any server backend.

USE CASE 4

Use the Pigo command-line tool to detect faces in an image and output coordinates as JSON for downstream processing.

What is it built with?

GoWebAssembly

How does it compare?

esimov/pigorakyll/boommasterminds/sprig
Stars4,7054,7054,712
LanguageGoGoGo
Setup difficultyeasyeasyeasy
Complexity2/51/52/5
Audiencedeveloperops devopsdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

No external libraries required, installs with a single 'go get' command, cascade model files must be downloaded separately for detection.

Use freely for any purpose, including commercial use, as long as you keep the MIT copyright notice.

So what is it?

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.

Copy-paste prompts

Prompt 1
I'm building a Go web service that needs to detect faces in uploaded photos. Show me how to import Pigo, load the cascade file, and run face detection on a JPEG image returning bounding box coordinates.
Prompt 2
Using Pigo's command-line tool, how do I detect all faces in a folder of images and output the face coordinates as JSON files for each image?
Prompt 3
How do I use Pigo to also detect pupils and eye positions after finding faces, and draw markers on the eyes in the output image?
Prompt 4
I want to run Pigo's face detection in a web browser without a server. Show me how to compile it to WebAssembly and call it from JavaScript.
Prompt 5
How do I detect tilted or rotated faces with Pigo using the angle parameter, and what angle range does it support?

Frequently asked questions

What is pigo?

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.

What language is pigo written in?

Mainly Go. The stack also includes Go, WebAssembly.

What license does pigo use?

Use freely for any purpose, including commercial use, as long as you keep the MIT copyright notice.

How hard is pigo to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is pigo for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.