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.)
go get github.com/kkdai/oxford-emotion
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.