From 6e7080142051ab9503eae29bf2a6d6437a6d554c Mon Sep 17 00:00:00 2001
From: panlei <2799247126@qq.com>
Date: 星期二, 19 十一月 2019 14:08:30 +0800
Subject: [PATCH] ---
---
algorithm/middleware/readyData.go | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/algorithm/middleware/readyData.go b/algorithm/middleware/readyData.go
index 84ec173..339f9d8 100644
--- a/algorithm/middleware/readyData.go
+++ b/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("杞︾墝鐨刬pcid锛�",sdkinfo.Ipcid)
arg.IpcId = sdkinfo.Ipcid
arg.IsYolo = false
arg.ImageWidth = int(i.Width)
@@ -179,7 +180,7 @@
}
for _, info := range plateIDResult.Result {
logger.Info("鎺ユ敹杞︾墝鏁版嵁锛�",info)
- photoMap := structure.PhotoMap{Score: float64(info.NConfidence),Rects: rectFormat(info.RcLocation), IsYolo: false, Car:info}
+ photoMap := structure.PhotoMap{Id: info.License,Score: float64(info.NConfidence),Rects: rectFormat(info.RcLocation), Type: "plate", Car:info}
arg.Photo = append(arg.Photo, photoMap)
}
args.Sdkdata = append(args.Sdkdata, &arg)
--
Gitblit v1.8.0