Documentation ¶
Overview ¶
Package facenet for face detection/recognization by pigo and facenet
Index ¶
- Constants
- type Estimator
- func (ins *Estimator) AddPerson(items ...*core.Person)
- func (ins *Estimator) AddPersonSafe(items ...*core.Person)
- func (ins *Estimator) BatchTrain(split float64, iterations int, verbosity int, batch int)
- func (ins *Estimator) BatchTrainSafe(split float64, iterations int, verbosity int, batch int)
- func (ins *Estimator) DeletePerson(name string) bool
- func (ins *Estimator) DeletePersonSafe(name string) bool
- func (ins *Estimator) DetectFaces(img image.Image, minSize int) (*core.FaceMarkers, error)
- func (ins *Estimator) DetectFacesSafe(img image.Image, minSize int) (*core.FaceMarkers, error)
- func (ins *Estimator) DrawMarkers(markers *core.FaceMarkers, txtColor string, successColor string, ...) image.Image
- func (ins *Estimator) ExtractFace(person *core.Person, img image.Image, minSize int) (*core.FaceMarker, error)
- func (ins *Estimator) ExtractFaceSafe(person *core.Person, img image.Image, minSize int) (*core.FaceMarker, error)
- func (ins *Estimator) LoadDB(fname string) error
- func (ins *Estimator) Match(embedding []float32) (*core.Person, float64, error)
- func (ins *Estimator) MatchSafe(embedding []float32) (*core.Person, float64, error)
- func (ins *Estimator) People() *core.People
- func (ins *Estimator) PeopleSafe() *core.People
- func (ins *Estimator) Predict(embedding []float32) ([]*core.Person, []float64, error)
- func (ins *Estimator) PredictSafe(embedding []float32) ([]*core.Person, []float64, error)
- func (ins *Estimator) SaveDB(fname string) error
- func (ins *Estimator) SetDB(db *Storage)
- func (ins *Estimator) SetFont(data *draw2d.FontData, size float64) error
- func (ins *Estimator) SetFontCache(cache draw2d.FontCache) error
- func (ins *Estimator) SetFontPath(cachePath string) error
- func (ins *Estimator) SetFontSize(size float64)
- func (ins *Estimator) SetModel(net *core.Net)
- func (ins *Estimator) Train(split float64, iterations int, verbosity int)
- func (ins *Estimator) TrainSafe(split float64, iterations int, verbosity int)
- type Option
- type Storage
- func (s *Storage) Add(items ...*core.Person)
- func (s *Storage) BatchTrain(split float64, iterations int, verbosity int, batch int)
- func (s *Storage) Delete(name string) bool
- func (s *Storage) Load(fname string) error
- func (s *Storage) Match(input []float32) (*core.Person, float64, error)
- func (s *Storage) People() *core.People
- func (s *Storage) Predict(input []float32) ([]*core.Person, []float64, error)
- func (s *Storage) Save(fname string) error
- func (s *Storage) SetClassifier(c classifier.Classifier)
- func (s *Storage) Train(split float64, iterations int, verbosity int)
Constants ¶
const ( // PeopleFilename represents people data filename in zip PeopleFilename = "people.pb" // ClassifierFilename represents classifier data filename in zip ClassifierFilename = "classifier.model" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Estimator ¶ added in v1.1.0
type Estimator struct {
// contains filtered or unexported fields
}
Estimator represents facenet estimator
func (*Estimator) AddPersonSafe ¶ added in v1.1.0
AddPersonSafe add person to people (multithread safe)
func (*Estimator) BatchTrain ¶ added in v1.1.0
BatchTrain for trainging classifier
func (*Estimator) BatchTrainSafe ¶ added in v1.1.0
BatchTrainSafe for trainging classifier (multithread safe)
func (*Estimator) DeletePerson ¶ added in v1.1.0
DeletePerson delete a person by name
func (*Estimator) DeletePersonSafe ¶ added in v1.1.0
DeletePersonSafe delete a person by name (multithread safe)
func (*Estimator) DetectFaces ¶ added in v1.1.0
DetectFaces detect face markers from image
func (*Estimator) DetectFacesSafe ¶ added in v1.1.0
DetectFacesSafe detect face markers from image (multithread safe)
func (*Estimator) DrawMarkers ¶ added in v1.1.0
func (ins *Estimator) DrawMarkers(markers *core.FaceMarkers, txtColor string, successColor string, failedColor string, strokeWidth float64, succeedOnly bool) image.Image
DrawMarkers draw face markers on image
func (*Estimator) ExtractFace ¶ added in v1.1.0
func (ins *Estimator) ExtractFace(person *core.Person, img image.Image, minSize int) (*core.FaceMarker, error)
ExtractFace extract face for a person from image
func (*Estimator) ExtractFaceSafe ¶ added in v1.1.0
func (ins *Estimator) ExtractFaceSafe(person *core.Person, img image.Image, minSize int) (*core.FaceMarker, error)
ExtractFaceSafe extract face for a person from image (multithread safe)
func (*Estimator) MatchSafe ¶ added in v1.1.0
MatchSafe match a person with embedding (multithread safe)
func (*Estimator) PeopleSafe ¶ added in v1.1.0
PeopleSafe get people (mutlthread safe)
func (*Estimator) PredictSafe ¶ added in v1.1.0
PredictSafe returns embedding predicted results (multithread safe)
func (*Estimator) SetFontCache ¶ added in v1.1.0
SetFontCache set font cache
func (*Estimator) SetFontPath ¶ added in v1.1.0
SetFontPath set font cache with font cache path
func (*Estimator) SetFontSize ¶ added in v1.1.0
SetFontSize set font size
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option face instance option interface
type Storage ¶ added in v1.1.0
type Storage struct {
// contains filtered or unexported fields
}
Storage represents db storage
func NewStorage ¶ added in v1.1.0
func NewStorage(people *core.People, classifier classifier.Classifier) *Storage
NewStorage returns new Storage
func (*Storage) BatchTrain ¶ added in v1.1.0
BatchTrain for trainging classifier
func (*Storage) SetClassifier ¶ added in v1.1.0
func (s *Storage) SetClassifier(c classifier.Classifier)
SetClassifier set classifier
Directories ¶
Path | Synopsis |
---|---|
Package classifier include different classifiers
|
Package classifier include different classifiers |
cmd
|
|
camera/server
Package server implement server
|
Package server implement server |
camera/server/handlers
Package handlers include server handlers
|
Package handlers include server handlers |
Package core facenet core module
|
Package core facenet core module |
Package imageutil image utils func
|
Package imageutil image utils func |