From e3c33684b4907cc338866623d2362eb85100387d Mon Sep 17 00:00:00 2001 From: panlei <2799247126@qq.com> Date: 星期一, 28 十月 2019 16:35:08 +0800 Subject: [PATCH] 修改一下推送成功条件 --- main.go | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/main.go b/main.go index fa28b33..5fc3011 100644 --- a/main.go +++ b/main.go @@ -7,16 +7,18 @@ "net/http" _ "net/http/pprof" "ruleprocess/insertdata" + "ruleprocess/labelFilter" "ruleprocess/structure" "ruleprocess/util" "time" + "basic.com/valib/logger.git" //"bufio" //"bytes" "flag" "fmt" "github.com/golang/protobuf/proto" - "basic.com/valib/logger.git" + "github.com/spf13/viper" //"gocv.io/x/gocv" //"image" //"image/color" @@ -24,7 +26,6 @@ "ruleprocess/cache" "ruleprocess/ruleserver" "sync" - "github.com/spf13/viper" ) var dbIp = flag.String("dbIp", "127.0.0.1", "dbserver ip") @@ -106,7 +107,7 @@ insertdata.InsertToEs(resultMsg) logger.Debug("鎻掑叆瀹孍s鎵�鐢ㄦ椂闂达細", time.Since(start)) //浜嬩欢鎺ㄩ�� - //go labelFilter.Judge(resultMsg) + go labelFilter.Judge(resultMsg) //}(msg) } } @@ -117,7 +118,7 @@ // 灏嗗閮ㄤ紶杩涙潵鐨剅ect锛坱op,bottom,left,right锛夎浆鍖栦负鑷繁鍐呴儴鐨剅ect(left top width height) func rectFormat(rcobj *protomsg.Rect) structure.Rect { //logger.Info("++++++++++++++++++++++++++++++鏀跺埌鐨剏olo鐨勫尯鍩熷潗鏍囷細",rcobj) - rect := ruleserver.Rect{} + rect := structure.Rect{} rect.X = float64(rcobj.Left) rect.Y = float64(rcobj.Top) rect.Width = float64(rcobj.Right - rcobj.Left) @@ -183,7 +184,7 @@ for _, info := range yoloParam.Infos { if info.Typ == 0 { //logger.Debug("-------------yolo鐨勫潗鏍囨湁鍑犱釜",info.RcObj) - photoMap := structure.PhotoMap{Rects: rectFormat(info.RcObj), Score: float64(info.Prob) * 100, IsYolo: true} + photoMap := structure.PhotoMap{Rects: rectFormat(info.RcObj), Score: float64(info.Prob) * 100, IsYolo: true,Id:info.ObjID} arg.Photo = append(arg.Photo, photoMap) yoloNum++ } -- Gitblit v1.8.0