Documentation ¶
Index ¶
- Variables
- func DrawMasks(dst image.Image, masks []Mask) image.Image
- func ExtractFacesFromFolder(path string, extractor *Extractor, store FaceStore) (current chan string, errs chan error, done chan bool, total int, err error)
- func FaceSwap(extractor *Extractor, detector Landmark, dest, src image.Image, blur float64) (image.Image, error)
- type Batch
- type BatchError
- type BatchItem
- type Classifier
- type Descriptor
- type Descriptors
- type Detection
- type Detector
- type Extractor
- type FaceDistanceStore
- type FaceItem
- type FaceStore
- type Landmark
- type Landmarks
- func (l *Landmarks) Center(cropped, full image.Image) image.Image
- func (l *Landmarks) Confidence() float32
- func (l *Landmarks) DrawOnFullImage(cropped, full image.Image) image.Image
- func (l *Landmarks) DrawOnImage(img image.Image) image.Image
- func (l *Landmarks) PointsOnImage(img image.Image) []image.Point
- type Mask
- type MaskDetector
- type Prediction
- type PredictionItem
- type PredictionStore
- type Predictions
- type Progress
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoFaceDetected = errors.New("no face detected")
)
Functions ¶
func ExtractFacesFromFolder ¶
Types ¶
type Batch ¶
type Classifier ¶
type Classifier interface {
Classify(input image.Image) (Predictions, error)
}
type Descriptor ¶
type Descriptor interface {
Compute(img image.Image) (Descriptors, error)
}
type Descriptors ¶
type Descriptors []float32
func (Descriptors) DistanceTo ¶
func (d Descriptors) DistanceTo(d2 Descriptors) (float32, error)
type Extractor ¶
type Extractor struct { Network string Detector Detector Landmark Landmark Descriptor Descriptor }
func (*Extractor) ExtractLandmarks ¶
func (*Extractor) ExtractPrimitives ¶
type FaceDistanceStore ¶
type FaceItem ¶
type FaceItem struct { Identifier string Network string Detection Detection Landmarks Landmarks Descriptors Descriptors }
type Landmarks ¶
type Landmarks struct {
Coords []float32
}
func (*Landmarks) Confidence ¶
func (*Landmarks) DrawOnFullImage ¶
type Prediction ¶
type PredictionItem ¶
type PredictionItem struct { Identifier string Predictions Predictions }
type PredictionStore ¶
type PredictionStore interface { GetPrediction(id string) (*PredictionItem, bool, error) StorePrediction(id string, item *PredictionItem) error SearchPrediction(query, after string, n int) ([]*PredictionItem, error) }
type Predictions ¶
type Predictions []Prediction
func (Predictions) Above ¶
func (p Predictions) Above(threshold float32) []Prediction
func (Predictions) Best ¶
func (p Predictions) Best(n int) []Prediction
Source Files ¶
Click to show internal directories.
Click to hide internal directories.