From 7d57c67a1c98b9f8c0256b95999c3e801d90b3f4 Mon Sep 17 00:00:00 2001
From: panlei <2799247126@qq.com>
Date: 星期四, 07 十一月 2019 19:30:51 +0800
Subject: [PATCH] ---
---
ruleserver/readyDataForRule.go | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/ruleserver/readyDataForRule.go b/ruleserver/readyDataForRule.go
index 3ea7715..07ff10a 100644
--- a/ruleserver/readyDataForRule.go
+++ b/ruleserver/readyDataForRule.go
@@ -285,11 +285,11 @@
areaPoints := Json2points(a.AreaJson)
logger.Info("鐪嬬湅鍥剧墖鐨剋idth鍜宧eight:",arg.ImageWidth,arg.ImageHeight)
- widthScale := float64(arg.ImageWidth / 960)
- heigthScale := float64(arg.ImageHeight / 540)
+ widthScale := float64(arg.ImageWidth) / 960
+ heigthScale := float64(arg.ImageHeight) / 540
for _, obj := range arg.Photo {
//logger.Info("------------------鐪嬬湅sdkData:", arg.SdkName, "鐨凱hoto鏁版嵁----------------", obj, "----椤轰究鐪嬬湅鍗犳瘮-----锛�", PgsInterPercent(areaPoints, obj.Rects, widthScale, heigthScale))
- if threshold <= obj.Score && size <= float64(obj.Rects.Width*obj.Rects.Height) && intersectionper <= PgsInterPercent(areaPoints, obj.Rects, widthScale, heigthScale) {
+ if obj.Score >= threshold && float64(obj.Rects.Width*obj.Rects.Height) >= size && PgsInterPercent(areaPoints, obj.Rects, widthScale, heigthScale) >= intersectionper {
// 杩欐瑕佸榻愯〃杈惧紡閲屾墍闇�瑕佺殑鎵�鏈夊弬鏁�
a.TargetNum++
arg1 := structure.Arg{obj.Id,obj.Score, PgsInterPercent(areaPoints, obj.Rects, widthScale, heigthScale), float64(obj.Rects.Width * obj.Rects.Height), obj.IsYolo, obj.Rects, obj.Feature, obj.ThftRes, []*structure.BaseInfo{}}
--
Gitblit v1.8.0