Awesome
Project Oxford Face API for Golang
This package is Project Oxford Face API in Golang
What is Project Oxford Face API
Project Oxford is a web services from Microsoft. It contains following services. (refer from this page.)
Face Detection
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.
Face Verification
To check two faces belonging to same person or not, with confidence score.
Similar Face Searching
To find similar-looking faces from many faces by a query face.
Face Grouping
To organize many faces into face groups based on their visual similarity.
Face Identification
To search which specific person entity a query face belongs to, from user-provided person-face data.
Installation
go get github.com/kkdai/oxford-face
How to use it
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)
}
Contribute
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
Inspired
Project52
It is one of my project 52.
License
This package is licensed under MIT license. See LICENSE for details.