Awesome
Project Oxford Emotion API for Golang
This package is Project Oxford Face API in Golang
What is Project Oxford Emotion API
Project Oxford is a web services from Microsoft. It contains following services. (refer from this page.)
Installation
go get github.com/kkdai/oxford-emotion
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.