| | |
| | | fmt.Println("解析YOLO sdk数据时出现错误", err) |
| | | continue |
| | | } |
| | | log.Println("--------------------看看yolo中有几个目标:",len(yoloParam.Infos)) |
| | | log.Println("------当前算法name",sdkinfo.SdkName,"--------------看看yolo中有几个目标:",len(yoloParam.Infos)) |
| | | for _, info := range yoloParam.Infos { |
| | | if info.Typ == 0 { |
| | | photoMap := ruleserver.PhotoMap{Rects: rectFormat(info.RcObj), Score: float64(info.Prob)*100,IsYolo:true} |
| | |
| | | |
| | | // } |
| | | for _, obj := range arg.Photo { |
| | | log.Println("------------------看看sdkData的Photo数据----------------", obj, "----顺便看看占比-----:", PgsInterPercent(areaPoints, obj.Rects, widthScale, heigthScale)) |
| | | //log.Println("------------------看看sdkData的Photo数据----------------", 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) { |
| | | // 这步要备齐表达式里所需要的所有参数 |
| | | a.targetNum++ |