---
panlei
2019-11-22 47a3f62da93acf15502c66ff387c318f942247a2
algorithm/middleware/readyData.go
@@ -21,7 +21,7 @@
func CountAreaObjs(a *structure.AreaMap,arg *structure.SdkData) {
   a.TargetNum = 0
   threshold := 80.0       // 相似度
   threshold := 70.0       // 相似度
   intersectionper := 20.0 // 占比
   size := 0.0            // 尺寸
@@ -35,7 +35,7 @@
         // 这步要备齐表达式里所需要的所有参数
         a.TargetNum++
         uuid := uuid.NewV4().String()
         arg1 := structure.Arg{obj.Id,uuid,obj.Score, ruleserver.PgsInterPercent(areaPoints, obj.Rects, widthScale, heigthScale), float64(obj.Rects.Width * obj.Rects.Height), a.AreaJson,obj.IsYolo, obj.Rects, obj.Car,obj.Feature, obj.ThftRes, []*structure.BaseInfo{},"",structure.ResultMsg{}}
         arg1 := structure.Arg{obj.Id,uuid,obj.Score, ruleserver.PgsInterPercent(areaPoints, obj.Rects, widthScale, heigthScale), float64(obj.Rects.Width * obj.Rects.Height), a.AreaJson,obj.Type, obj.Rects, obj.Car,obj.Feature, obj.ThftRes, []*structure.BaseInfo{},"",structure.ResultMsg{}}
         //logger.Println("放进去的arg:-------", arg1)
         a.Args = append(a.Args, &arg1)
         a.FilterData = append(a.FilterData, &arg1)
@@ -126,7 +126,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,Id:strconv.Itoa(int(info.ObjID))}
                  photoMap := structure.PhotoMap{Rects: rectFormat(info.RcObj), Score: float64(info.Prob) * 100, Type: "yolo",Id:strconv.Itoa(int(info.ObjID))}
                  arg.Photo = append(arg.Photo, photoMap)
                  yoloNum++
               }
@@ -155,7 +155,7 @@
            logger.Info("--------------追踪之后人脸的个数:", len(faceParam.Faces))
            for _, info := range faceParam.Faces {
               //logger.Info("_______________________________________________第一次看相似值:",info.Pos.FAngle.Confidence*100)
               photoMap := structure.PhotoMap{Id: strconv.Itoa(int(info.Pos.FaceID)) , Rects: rectFormat(info.Pos.RcFace), Score: float64(info.Pos.FAngle.Confidence * 100), IsYolo: false, ThftRes: *(info.Result), Feature: info.Feats}
               photoMap := structure.PhotoMap{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}
               arg.Photo = append(arg.Photo, photoMap)
            }
            args.Sdkdata = append(args.Sdkdata, &arg)
@@ -166,6 +166,7 @@
      if sdkinfo.Sdktype == "Plate" { // 车牌识别
         arg := structure.SdkData{}
         arg.TaskId = m.Tasklab.Taskid
         logger.Info("车牌的ipcid:",sdkinfo.Ipcid)
         arg.IpcId = sdkinfo.Ipcid
         arg.IsYolo = false
         arg.ImageWidth = int(i.Width)
@@ -178,8 +179,8 @@
               continue
            }
            for _, info := range plateIDResult.Result {
               logger.Info("接收车牌数据:",info)
               photoMap := structure.PhotoMap{Score: float64(info.NConfidence),Rects: rectFormat(info.RcLocation), IsYolo: false, Car:info}
               logger.Info("接收车牌数据:",info.FvdConf,info.NVehicleColor1,info.NPlateFlag,info.RcCarLocation)
               photoMap := structure.PhotoMap{Id: info.License,Score: float64(info.FvdConf)*100,Rects: rectFormat(info.RcCarLocation), Type: "plate", Car:info}
               arg.Photo = append(arg.Photo, photoMap)
            }
            args.Sdkdata = append(args.Sdkdata, &arg)