| | |
| | | import ( |
| | | "basic.com/dbapi.git" |
| | | "basic.com/pubsub/protomsg.git" |
| | | "basic.com/valib/logger.git" |
| | | logger "github.com/alecthomas/log4go" |
| | | "encoding/json" |
| | | "errors" |
| | | "fmt" |
| | |
| | | if err != nil || len(table) == 0 { |
| | | logger.Error("根据id查询底库信息出错!", err, "--返回值长度为:", len(table)) |
| | | } |
| | | logger.Debug("看看这个base的对比值是多少:", Decimal(m[baseinfo.Id].CompareScore)) |
| | | //logger.Debug("看看这个base的对比值是多少:", Decimal(m[baseinfo.Id].CompareScore)) |
| | | base := structure.BaseInfo{TableId: baseinfo.TableId, TableName: table[0].TableName, BwType: table[0].BwType, CompareScore: Decimal(m[baseinfo.Id].CompareScore), TargetId: baseinfo.Id, TargetName: baseinfo.PersonName, TargetPicUrl: baseinfo.PersonPicUrl, MonitorLevel: baseinfo.MonitorLevel, Content: baseinfo.Reserved,DbLabel: baseinfo.PhoneNum+"/"+baseinfo.Sex+"/"+baseinfo.IdCard,} |
| | | //os.Exit(1) |
| | | arg.Liker = append(arg.Liker, &base) |
| | |
| | | logger.Info("没有配置对比底库参数") |
| | | return |
| | | } |
| | | logger.Debug("=====配置的阈值为:", threshold) |
| | | //logger.Debug("=====配置的阈值为:", threshold) |
| | | for j := 0; j < len(groupRule.Rules); j++ { |
| | | if groupRule.Rules[j].SdkId == "812b674b-2375-4589-919a-5c1c3278a972" { |
| | | for _, sdkData := range args.Sdkdata { |
| | | if sdkData.IpcId == "A8B73405-373D-4F23-CED2-A617EBD7EC55" { // 搜索到人脸检测的sdkdata 现在关于人脸的只有他一个sdk,全找他 |
| | | logger.Info("============================================进行人脸对比") |
| | | //logger.Info("============================================进行人脸对比") |
| | | for _, areaMap := range sdkData.AreaMapList { |
| | | // 拿区域中每个人脸特征值去对比,填充其liker |
| | | if groupRule.Rules[j].PolygonId == areaMap.AreaId { |