-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
wuqingtao
committed
Dec 26, 2019
1 parent
471d6ac
commit 0d3b38a
Showing
4 changed files
with
30 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// Package aip 当前实现部分人脸库管理的api | ||
package aip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,33 @@ | ||
# baiduaip 实现人脸识别所使用的接口sdk | ||
|
||
运行`go test`前, 在baidu/aip/client/testdata目录下创建`key.json`, 内容如下: | ||
[![GoDoc](https://godoc.org/github.com/antlinker/baiduaip/baidu/aip?status.svg)](https://godoc.org/github.com/antlinker/baiduaip/baidu/aip) | ||
|
||
```go | ||
import ( | ||
"github.com/antlinker/baiduaip/baidu/aip/client" | ||
) | ||
|
||
func main() { | ||
// InitBaiduFaceOptions 初始化百度人脸服务的客户端 | ||
func InitBaiduFaceOptions(opt *client.Option) { | ||
client.Init(opt) | ||
// ... | ||
} | ||
``` | ||
注: 运行`go test`前, 需要在baidu/aip/testdata目录下创建`key.json`和测试图片, 内容如下: | ||
```json | ||
{ | ||
"AppID": "APPID", | ||
"APIKey": "APIKEY", | ||
"SecretKey": "SECRETKEY" | ||
} | ||
``` | ||
``` | ||
```shell | ||
ls ./baidu/aip/testdata | ||
|
||
cp.jpeg EF2B8C2B8BCD43DA931B218759D59C22.jpeg key.json man4.jpg tom.jpeg | ||
``` |