faces

package
v0.0.0-...-ae3587a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2020 License: LGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	FaceRecognitionClient proto.FaceRecognizerClient
	ESClient              *elasticsearch.Client
}

Client searches elasticsearch for similar faces to the faces given in an image

func (*Client) FindSimilarFacesInImage

func (c *Client) FindSimilarFacesInImage(imgURL string, maxHitsPerFace int) ([]FoundFace, error)

FindSimilarFacesInImage finds faces in the given image and searches for faces similar to the ones in the given image the url should be downloadable by the face recognizer, i.e. a signed url for s3 or for the imgproxy

type FaceDoc

type FaceDoc struct {
	PostID   int    `json:"post_id"`
	X        int    `json:"x"`
	Y        int    `json:"y"`
	Width    int    `json:"Width"`
	Height   int    `json:"Height"`
	Encoding string `json:"encoding_vector"`
}

FaceDoc is the face hit that elasticsearch returned for the search

type FoundFace

type FoundFace struct {
	FaceDoc
	Score         float32
	MaxScoreShare float32
}

FoundFace includes scoring information

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL