Documentation
¶
Overview ¶
Package pipeline orchestrates the end-to-end 1:1 verification flow:
image -> detect -> crop -> quality -> embed -> compare -> result
It is deliberately decoupled from the public package so that the detector, embedder and matcher can be swapped (e.g. mocks in tests) without touching the public API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNoFaceDetected is returned when no face is found in an input image. ErrNoFaceDetected = errors.New("gofacekit: no face detected") // ErrMultipleFacesDetected is reserved for stricter modes that reject // images containing more than one face. It is not enforced in v0.1. ErrMultipleFacesDetected = errors.New("gofacekit: multiple faces detected") // ErrInvalidImage is returned when an input image cannot be decoded. ErrInvalidImage = imageproc.ErrInvalidImage // ErrEmbeddingFailed is returned when the embedder cannot produce a vector. ErrEmbeddingFailed = errors.New("gofacekit: embedding failed") // ErrVectorMismatch is returned when two embeddings cannot be compared. ErrVectorMismatch = errors.New("gofacekit: embedding vector mismatch") // ErrQualityCheckFailed is returned when an input image fails the quality // gate (only when quality checks are enabled). ErrQualityCheckFailed = errors.New("gofacekit: quality check failed") )
Pipeline errors. The public package re-exports these so library users can match on them with errors.Is.
Functions ¶
This section is empty.
Types ¶
type FaceResult ¶
FaceResult describes the chosen face from a single input image.
type Options ¶
type Options struct {
Threshold float64
MinFaceSize int
EnableQualityCheck bool
QualityThresholds quality.Thresholds
}
Options configures a Pipeline.
type Pipeline ¶
type Pipeline struct {
// contains filtered or unexported fields
}
Pipeline runs verification using an injected detector and embedder.
func (*Pipeline) VerifyBytes ¶
VerifyBytes decodes both images from memory and verifies them.
type Result ¶
type Result struct {
Match bool
Similarity float64
Threshold float64
ReferenceFace FaceResult
ProbeFace FaceResult
Quality quality.Result
}
Result is the internal verification result. The public package maps it onto the exported VerificationResult type.