This package is Project Oxford Face API in Golang
Project Oxford is a web services from Microsoft. It contains following services. (refer from this page.)
To detect human faces in image with face rectangles and face attributes including face landmarks, pose, and machine learning-based predictions of gender and age.
To check two faces belonging to same person or not, with confidence score.
To find similar-looking faces from many faces by a query face.
To organize many faces into face groups based on their visual similarity.
To search which specific person entity a query face belongs to, from user-provided person-face data.
go get github.com/kkdai/oxford-face
Sign-up for Microsoft Translator API (see here for more detail) and get your developer credentials. Use the client ID and secret to instantiate a translator as shown below.
package main
import (
"fmt"
"os"
. "github.com/kkdai/oxford-face"
)
func main() {
key := os.Getenv("MSFT_KEY")
if key == "" {
fmt.Println("Please export your key to environment first, `export MSFT_KEY=12234`")
return
}
f := NewFace(key)
//Detect
ret, err := f.DetectFile(nil, "./1.jpg")
fmt.Println("ret:", ret, " err=", err)
}
Please open up an issue on GitHub before you put a lot efforts on pull request.
The code submitting to PR must be filtered with gofmt
It is one of my project 52.
This package is licensed under MIT license. See LICENSE for details.