| | |
| | | package main |
| | | |
| | | import ( |
| | | "encoding/base64" |
| | | "facecompare/sdkcompare" |
| | | "basic.com/pubsub/cache.git" |
| | | ) |
| | | |
| | | func main() { |
| | | var tableId []string |
| | | tableId[0] = "sadasdasdasd" |
| | | tableId[1] = "sadasdasdasd" |
| | | faceFeatureByte := "dsfsdafdsfdsfsdfsdfsdfsafsadfsafsadf" |
| | | faceFeature, err := base64.StdEncoding.DecodeString(faceFeatureByte) |
| | | if err != nil { |
| | | println("解码失败") |
| | | } |
| | | sdkcompare.GetComparePersonBaseInfo(tableId, faceFeature, 70) |
| | | cache.Init() |
| | | tableId := make([]string, 10) |
| | | //tableId[0] = "8fe053e4-f093-4c3c-a0f3-098c322f453e" |
| | | tableId[0] = "323c4e02-e83c-4f0d-806d-ac5a462de5ea" |
| | | faceFeature := "dsfsdafdsfdsfsdfsdfsdfsafsadfsafsadf" |
| | | sdkcompare.GetComparePersonBaseInfo(nil, []byte(faceFeature), 70) |
| | | } |
| | |
| | | "basic.com/valib/gosdk.git" |
| | | "encoding/base64" |
| | | "encoding/json" |
| | | "facecompare/cache" |
| | | "basic.com/pubsub/cache.git" |
| | | "fmt" |
| | | ) |
| | | |
| | |
| | | } else { |
| | | for _, tid := range tableid { |
| | | shardins, ok := cache.Cmap.Cam[tid] |
| | | fmt.Println(ok) |
| | | if !ok { |
| | | fmt.Println("get shad error by id", shardins) |
| | | continue |
| | |
| | | } |
| | | } |
| | | |
| | | fmt.Println(totalmap) |
| | | |
| | | buf, err := json.Marshal(totalmap) |
| | | if err != nil { |
| | | fmt.Println("map to json error!", err) |