From 35f6dd60f51b44b1e6b4ddaacd17f95b9aa87edc Mon Sep 17 00:00:00 2001 From: panlei <2799247126@qq.com> Date: 星期一, 16 十二月 2019 15:22:50 +0800 Subject: [PATCH] 特征值从开始时就存为string --- algorithm/middleware/insertDataToEs.go | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/algorithm/middleware/insertDataToEs.go b/algorithm/middleware/insertDataToEs.go index af27a79..0ff5d3b 100644 --- a/algorithm/middleware/insertDataToEs.go +++ b/algorithm/middleware/insertDataToEs.go @@ -1,7 +1,6 @@ package main import ( - "encoding/base64" "encoding/json" "errors" "net" @@ -9,15 +8,15 @@ "strconv" "time" + "basic.com/valib/logger.git" "github.com/golang/protobuf/proto" "github.com/satori/go.uuid" - "basic.com/valib/logger.git" - "ruleprocess/cache" - "ruleprocess/structure" - "basic.com/pubsub/protomsg.git" "basic.com/pubsub/esutil.git" + "basic.com/pubsub/protomsg.git" + "ruleprocess/cache" "ruleprocess/ruleserver" + "ruleprocess/structure" "ruleprocess/util" ) @@ -171,10 +170,10 @@ target.TargetId = face.Id target.TargetScore = face.Score target.TargetType = face.Type - target.Feature = base64.StdEncoding.EncodeToString(face.Feature) + target.Feature = face.Feature target.PicSmUrl = resp["fileUrl"].(string) target.TargetLocation = Points{TopLeft: Point{face.Location.X, face.Location.Y}, BottomRight: Point{face.Location.X + face.Location.Width, face.Location.Y + face.Location.Height}} - target.AttachTarget = SourceTarget{face.AttachArg.Id,face.AttachArg.Score,face.AttachArg.Type,base64.StdEncoding.EncodeToString(face.AttachArg.Feature),"",Points{TopLeft: Point{face.AttachArg.Location.X, face.AttachArg.Location.Y}, BottomRight: Point{face.AttachArg.Location.X + face.AttachArg.Location.Width, face.AttachArg.Location.Y + face.AttachArg.Location.Height}}} + target.AttachTarget = SourceTarget{face.AttachArg.Id,face.AttachArg.Score,face.AttachArg.Type,face.AttachArg.Feature,"",Points{TopLeft: Point{face.AttachArg.Location.X, face.AttachArg.Location.Y}, BottomRight: Point{face.AttachArg.Location.X + face.AttachArg.Location.Width, face.AttachArg.Location.Y + face.AttachArg.Location.Height}}} var targetInfos []Target targetInfos = append(targetInfos, *target) @@ -186,7 +185,8 @@ case "plate": sdkname = "杞︾墝璇嗗埆" case "track": - sdkname = "浜哄憳璺熻釜" + sdkname = "璺熻釜" + logger.Info("鏁版嵁鍒颁簡姝ゅ") if len(face.Liker) == 1{ id = face.Liker[0].TargetId } -- Gitblit v1.8.0