panlei
2019-11-16 90f568cf48fcc3131b45a2081dea40015eae5c5b
insertdata/insertDataToEs.go
@@ -233,7 +233,7 @@
            ageDescription := getDescription(face.ThftRes.Age)
            logger.Info(ageDescription)
            var target = new(Target)
            target.TargetId = strconv.FormatUint(face.Id, 10)
            target.TargetId = face.Id
            target.TargetScore = face.Score
            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}}
            //logger.Info("人脸的id:",strconv.FormatUint(face.Id, 10))
@@ -397,14 +397,14 @@
                     // 去重添加
                     var flag = true
                     for _, selectTarget := range targetInfos {
                        if strconv.FormatUint(target.Id, 10) == selectTarget.TargetId {
                        if target.Id == selectTarget.TargetId {
                           flag = false
                           break
                        }
                     }
                     if flag {
                        var target1 = new(Target)
                        target1.TargetId = strconv.FormatUint(target.Id, 10)
                        target1.TargetId = target.Id
                        target1.TargetScore = target.Score
                        target1.TargetLocation = Points{TopLeft: Point{target.Location.X, target.Location.Y}, BottomRight: Point{target.Location.X + target.Location.Width, target.Location.Y + target.Location.Height}}
                        targetInfos = append(targetInfos, *target1)
@@ -812,14 +812,14 @@
                  // 去重添加
                  var flag = true
                  for _, selectTarget := range targetInfos {
                     if strconv.FormatUint(target.Id, 10) == selectTarget.TargetId {
                     if target.Id == selectTarget.TargetId {
                        flag = false
                        break
                     }
                  }
                  if flag {
                     var target1 = new(Target)
                     target1.TargetId = strconv.FormatUint(target.Id, 10)
                     target1.TargetId = target.Id
                     target1.TargetScore = target.Score
                     target1.TargetLocation = Points{TopLeft: Point{target.Location.X, target.Location.Y}, BottomRight: Point{target.Location.X + target.Location.Width, target.Location.Y + target.Location.Height}}
                     targetInfos = append(targetInfos, *target1)