api

package
v0.0.0-...-1f5ce45 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2019 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClassifyHandler

func ClassifyHandler(classifiers map[string]gildasai.Classifier, html bool) gin.HandlerFunc

func FaceCroppedHandler

func FaceCroppedHandler(batches map[string]*gildasai.Batch) gin.HandlerFunc

func FaceSourceHandler

func FaceSourceHandler(batches map[string]*gildasai.Batch) gin.HandlerFunc

func FaceSwapHandler

func FaceSwapHandler(extractor *gildasai.Extractor, detector gildasai.Landmark) gin.HandlerFunc

func FacesGetBatchHandler

func FacesGetBatchHandler(batches map[string]*gildasai.Batch) gin.HandlerFunc

func FacesHomeHandler

func FacesHomeHandler(batches map[string]*gildasai.Batch) gin.HandlerFunc

func FacesPostBatchHandler

func FacesPostBatchHandler(extractor *gildasai.Extractor, batches map[string]*gildasai.Batch) gin.HandlerFunc

func FacesearchAgainstHandler

func FacesearchAgainstHandler(store *sqlite.Store) gin.HandlerFunc

func FacesearchDetectionHandler

func FacesearchDetectionHandler(store *sqlite.Store, clusters *FaceClusters) gin.HandlerFunc

func FacesearchDetectionImageHandler

func FacesearchDetectionImageHandler() gin.HandlerFunc

func FacesearchHandler

func FacesearchHandler(store *sqlite.Store, clusters *FaceClusters) gin.HandlerFunc

func FacesearchLandmarkImageHandler

func FacesearchLandmarkImageHandler(store *sqlite.Store) gin.HandlerFunc

func GetPhotoHandler

func GetPhotoHandler(store gildasai.PredictionStore) gin.HandlerFunc

func MaskHandler

func MaskHandler(detector Detector, store map[string]MaskResult) gin.HandlerFunc

func MaskImageHandler

func MaskImageHandler(store map[string]MaskResult) gin.HandlerFunc

func PhotosHandler

func PhotosHandler(store gildasai.PredictionStore) gin.HandlerFunc

Types

type Detection

type Detection struct {
	DetectionID                string
	ID, Network, DetectionJSON string
	Distance                   float32
	Score                      float32
	Class                      float32
}

type Detector

type Detector interface {
	Detect(img image.Image) ([]gildasai.Mask, error)
}

type FaceClusters

type FaceClusters struct {
	Clusters map[string]*Matches
}

func CalculateClusters

func CalculateClusters(store *sqlite.Store) (*FaceClusters, error)

func (*FaceClusters) Best

func (fc *FaceClusters) Best(n int) []*Matches

func (*FaceClusters) Find

func (fc *FaceClusters) Find(detectionID string) *Matches

type MaskResult

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

type Matches

type Matches struct {
	Detection
	Matches     int
	AvgDistance float32
	Detections  []Detection
}

Jump to

Keyboard shortcuts

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