panlei
2019-12-11 4243a710f702b601b1d5a7dc2c765191c191201d
algorithm/middleware/readyData.go
@@ -2,7 +2,7 @@
import (
   "basic.com/pubsub/protomsg.git"
   logger "github.com/alecthomas/log4go"
   "basic.com/valib/logger.git"
   "github.com/golang/protobuf/proto"
   uuid "github.com/satori/go.uuid"
   "ruleprocess/ruleserver"
@@ -135,7 +135,7 @@
      logger.Info("--------------追踪之后人脸的个数:", len(faceParam.Faces))
      for _, info := range faceParam.Faces {
         //logger.Info("_______________________________________________第一次看相似值:",info.Pos.FAngle.Confidence*100)
         photoMap := structure.PhotoMap{structure.SourcePhoto{Id: strconv.Itoa(int(info.Pos.FaceID)) , Rects: rectFormat(info.Pos.RcFace), Score: float64(info.Pos.FAngle.Confidence * 100), Type: "face", ThftRes: *(info.Result), Feature: info.Feats},nil}
         photoMap := structure.PhotoMap{structure.SourcePhoto{Id: strconv.Itoa(int(info.Pos.FaceID)) , Rects: rectFormat(info.Pos.RcFace), Score: float64(info.Pos.FAngle.Confidence * 100), Type: "face", ThftRes: *(info.Result), Feature: info.Feats},structure.SourcePhoto{}}
         arg.Photo = append(arg.Photo, photoMap)
      }
      args.Sdkdata = append(args.Sdkdata, &arg)
@@ -162,7 +162,7 @@
      for _, info := range yoloParam.Infos {
         if info.Typ == 0 {
            //logger.Debug("-------------yolo的坐标有几个",info.RcObj)
            photoMap := structure.PhotoMap{structure.SourcePhoto{Rects: rectFormat(info.RcObj), Score: float64(info.Prob) * 100, Type: "yolo",Id:strconv.Itoa(int(info.ObjID))},nil}
            photoMap := structure.PhotoMap{structure.SourcePhoto{Rects: rectFormat(info.RcObj), Score: float64(info.Prob) * 100, Type: "yolo",Id:strconv.Itoa(int(info.ObjID))},structure.SourcePhoto{}}
            arg.Photo = append(arg.Photo, photoMap)
            yoloNum++
         }
@@ -193,7 +193,7 @@
         logger.Info("接收车牌数据:",info.FvdConf,info.NVehicleColor1,info.NPlateFlag,info.RcCarLocation)
         if info.NConfidence > 70 {
            logger.Info("车牌也符合的数据",info.FvdConf,info.NVehicleColor1,info.NPlateFlag,info.RcCarLocation,info.NConfidence,)
            photoMap := structure.PhotoMap{structure.SourcePhoto{Id: info.License,Score: float64(info.FvdConf)*100,Rects: rectFormat(info.RcCarLocation), Type: "plate", Car:info},nil}
            photoMap := structure.PhotoMap{structure.SourcePhoto{Id: info.License,Score: float64(info.FvdConf)*100,Rects: rectFormat(info.RcCarLocation), Type: "plate", Car:info},structure.SourcePhoto{}}
            arg.Photo = append(arg.Photo, photoMap)
         }
      }
@@ -221,8 +221,8 @@
      }
      for _, info := range Track.Result {
         logger.Info("接收跟踪数据:",info.Id,info.Confidence)
         photoMap := structure.PhotoMap{structure.SourcePhoto{Id: strconv.Itoa(int(info.Id)),Score: float64(info.Confidence)*100,Rects: rectFormat(info.RcHuman), Type: "track"},nil}
         FacePush2Body(&photoMap,m.Tasklab.Sdkinfos)
         photoMap := structure.PhotoMap{structure.SourcePhoto{Id: strconv.Itoa(int(info.Id)),Score: float64(info.Confidence)*100,Rects: rectFormat(info.RcHuman), Type: "track"},structure.SourcePhoto{}}
         //FacePush2Body(&photoMap,m.Tasklab.Sdkinfos)
         logger.Info("组装后的跟踪数据:",photoMap)
         arg.Photo = append(arg.Photo, photoMap)
      }