machinebox

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package machinebox provides access to Facebox Remoto services.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckFaceprintRequest

type CheckFaceprintRequest struct {
	// Faceprints is a list of Faceprints to check.
	Faceprints []string
}

CheckFaceprintRequest is the request object for CheckFaceprint calls.

type CheckFaceprintResponse

type CheckFaceprintResponse struct {
	// Faces is a list of faces checked from Faceprints.
	Faces []FaceprintFace
}

CheckFaceprintResponse is the response object for CheckFaceprint calls.

type CheckFileRequest

type CheckFileRequest struct {
	// File is the image to check for faces.
	File remototypes.File
}

CheckFileRequest is the request object for CheckFile calls.

type CheckFileResponse

type CheckFileResponse struct {
	// Faces is a list of faces that were found.
	Faces []Face
}

CheckFileResponse is the response object for CheckFile calls.

type CheckURLRequest

type CheckURLRequest struct {
	// URL is the address of the image to check.
	URL string
}

CheckURLRequest is the request object for CheckURL calls.

type CheckURLResponse

type CheckURLResponse struct {
	// Faces is a list of faces that were found.
	Faces []Face
}

CheckURLResponse is the response object for CheckURL calls.

type Face

type Face struct {
	// ID is the identifier of the source that was matched.
	ID string
	// Name is the name of the identified person.
	Name string
	// Matched is whether the face was recognized or not.
	Matched bool
	// Faceprint is the Facebox Faceprint of this face.
	Faceprint string
	// Rect is where the face appears in the source image.
	Rect Rect
}

Face describes a face.

type Facebox

type Facebox interface {

	// TeachFile teaches Facebox a new face from an image file.
	TeachFile(TeachFileRequest) TeachFileResponse

	// TeachURL teaches Facebox a new face from an image on the web.
	TeachURL(TeachURLRequest) TeachURLResponse

	// TeachFaceprint teaches Facebox about a face from a Faceprint.
	TeachFaceprint(TeachFaceprintRequest) TeachFaceprintResponse

	// CheckFile checks an image file for faces.
	CheckFile(CheckFileRequest) CheckFileResponse

	// CheckURL checks a hosted image file for faces.
	CheckURL(CheckURLRequest) CheckURLResponse

	// CheckFaceprint checks to see if a Faceprint matches any known
	// faces.
	CheckFaceprint(CheckFaceprintRequest) CheckFaceprintResponse

	// SimilarID checks for similar faces by ID.
	SimilarID(SimilarIDRequest) SimilarIDResponse

	// SimilarFile checks for similar faces from the face in an image file.
	SimilarFile(SimilarFileRequest) SimilarFileResponse

	// SimilarURL checks for similar faces in a hosted image file.
	SimilarURL(SimilarURLRequest) SimilarURLResponse

	// Rename changes a person's name.
	Rename(RenameRequest) RenameResponse

	// RenameID changes the name of a previously taught face, by ID.
	RenameID(RenameIDRequest) RenameIDResponse

	// RemoveID removes a face with the specified ID.
	RemoveID(RemoveIDRequest) RemoveIDResponse

	// FaceprintCompare compares faceprints to a specified target describing
	// similarity.
	FaceprintCompare(FaceprintCompareRequest) FaceprintCompareResponse

	// GetState gets the Facebox state file.
	GetState(GetStateRequest) remototypes.FileResponse

	// PutState sets the Facebox state file.
	PutState(PutStateRequest) PutStateResponse
}

Facebox provides facial detection and recognition in images.

type FaceprintCompareRequest

type FaceprintCompareRequest struct {
	// Target is the target Faceprint to which the Faceprints will be compared.
	Target string
	// Faceprints is a list of Faceprints that will be compared to Target.
	Faceprints []string
}

FaceprintCompareRequest is the request object for FaceprintCompare calls.

type FaceprintCompareResponse

type FaceprintCompareResponse struct {
	// Confidences is a list of confidence values.
	// The order matches the order of FaceprintCompareRequest.Faceprints.
	Confidences []float64
}

FaceprintCompareResponse is the response object for FaceprintCompare calls.

type FaceprintFace

type FaceprintFace struct {
	// Matched is whether the face was recognized or not.
	Matched bool
	// Confidence is a numerical value of how confident the AI
	// is that this is a match.
	Confidence float64
	// ID is the identifier of the source that matched.
	ID string
	// Name is the name of the person recognized.
	Name string
}

FaceprintFace is a face.

type GetStateRequest

type GetStateRequest struct{}

GetStateRequest is the request object for GetState calls.

type PutStateRequest

type PutStateRequest struct {
	// StateFile is the Facebox state file to set.
	StateFile remototypes.File
}

PutStateRequest is the request object for PutState calls.

type PutStateResponse

type PutStateResponse struct{}

PutStateResponse is the response object for PutState calls.

type Rect

type Rect struct {
	// Top is the starting Y coordinate.
	Top int
	// Left is the starting X coordinate.
	Left int
	// Width is the width.
	Width int
	// Height is the height.
	Height int
}

Rect is a bounding box describing a rectangle of an image.

type RemoveIDRequest

type RemoveIDRequest struct {
	// ID is the identifier of the source to remove.
	ID string
}

RemoveIDRequest is the request object for RemoveID calls.

type RemoveIDResponse

type RemoveIDResponse struct{}

RemoveIDResponse is the response object for RemoveID calls.

type RenameIDRequest

type RenameIDRequest struct {
	// ID is the identifier of the source to rename.
	ID string
	// Name is the new name to assign to the item matching ID.
	Name string
}

RenameIDRequest is the request object for RenameID calls.

type RenameIDResponse

type RenameIDResponse struct{}

RenameIDResponse is the response object for RenameID calls.

type RenameRequest

type RenameRequest struct {
	// From is the original name.
	From string
	// To is the new name.
	To string
}

RenameRequest is the request object for Rename calls.

type RenameResponse

type RenameResponse struct{}

RenameResponse is the response object for Rename calls.

type SimilarFace

type SimilarFace struct {
	// Rect is where the face appears in the image.
	Rect Rect
	// SimilarFaces is a list of similar faces.
	SimilarFaces []Face
}

SimilarFace is a detected face with similar matching faces.

type SimilarFileRequest

type SimilarFileRequest struct {
	File remototypes.File
}

SimilarFileRequest is the request object for SimilarFile calls.

type SimilarFileResponse

type SimilarFileResponse struct {
	Faces []SimilarFace
}

SimilarFileResponse is the response object for SimilarFile calls.

type SimilarIDRequest

type SimilarIDRequest struct {
	// ID is the identifier of the source to look for similar faces of.
	ID string
}

SimilarIDRequest is the request object for SimilarID calls.

type SimilarIDResponse

type SimilarIDResponse struct {
	// Faces is a list of similar faces.
	Faces []SimilarFace
}

SimilarIDResponse is the response object for SimilarID calls.

type SimilarURLRequest

type SimilarURLRequest struct {
	URL string
}

SimilarURLRequest is the request object for SimilarURL calls.

type SimilarURLResponse

type SimilarURLResponse struct {
	Faces []SimilarFace
}

SimilarURLResponse is the response object for SimilarURL calls.

type TeachFaceprintRequest

type TeachFaceprintRequest struct {
	ID        string
	Name      string
	Faceprint string
}

TeachFaceprintRequest is the request object for TeachFaceprint calls.

type TeachFaceprintResponse

type TeachFaceprintResponse struct{}

TeachFaceprintResponse is the response object for TeachFaceprint calls.

type TeachFileRequest

type TeachFileRequest struct {
	// ID is an identifier describing the source, for example the filename.
	ID string
	// Name is the name of the person in the image.
	Name string
	// File is the image containing the face to teach.
	File remototypes.File
}

TeachFileRequest is the request object for TeachFile calls.

type TeachFileResponse

type TeachFileResponse struct{}

TeachFileResponse is the response object for TeachFile calls.

type TeachURLRequest

type TeachURLRequest struct {
	// ID is an identifier describing the source, for example the filename.
	ID string
	// Name is the name of the person in the image.
	Name string
	// URL is the address of the image.
	URL string
}

TeachURLRequest is the request object for TeachURL calls.

type TeachURLResponse

type TeachURLResponse struct{}

TeachURLResponse is the response object for TeachURL calls.

Directories

Path Synopsis
client
server
facebox
Package machinebox contains the HTTP server for machinebox services.
Package machinebox contains the HTTP server for machinebox services.

Jump to

Keyboard shortcuts

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