facesim

package
v0.0.0-...-21979d2 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Conf config.Config
}

type Facesim

type Facesim struct {
	// contains filtered or unexported fields
}

func New

func New(c Config) (res Facesim)

func (Facesim) Close

func (f Facesim) Close() (err error)

func (Facesim) HandleFaceSim

func (f Facesim) HandleFaceSim(req FacesimRequest) (res FacesimResult, err error)

type FacesimRequest

type FacesimRequest struct {
	Images []string `json:"images"`
}

type FacesimResource

type FacesimResource interface {
	GetImagesByteFromUrl([]string) ([]image.Image, error)
	GetFacesFromImages([]image.Image) ([]image.Image, error)
	GetFacesEmbeddings([]image.Image) ([][]float32, error)
	Close() error
}

type FacesimResult

type FacesimResult struct {
	Verdict          bool               `json:"verdict"`
	Similarity       float32            `json:"average_similarity"`
	DetailSimilarity map[string]float32 `json:"details"`
}

Jump to

Keyboard shortcuts

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