| | |
| | | arg := ruleserver.SdkDatas{} |
| | | //paramFormat(msg, &arg) |
| | | m := paramFormat(msg, &arg) |
| | | logger.Info("解析出来的数据:", arg) |
| | | // 进行规则处理判断(打上规则的标签) |
| | | ruleserver.Judge(&arg,&m) // 把sdkMessage传进去,方便缓存数据时拼出一个resultMag |
| | | // 把arg里的打的标签拿出来给m再封装一层 |
| | | resultMag := ruleserver.ResultMsg{SdkMessage: &m, RuleResult: arg.RuleResult} |
| | | //logger.Info("打完标签后的结果:",resultMag) |
| | | resultMsg := ruleserver.ResultMsg{SdkMessage: &m, RuleResult: arg.RuleResult} |
| | | // 将打完标签的数据插入到ES |
| | | insertdata.InsertToEs(resultMag) |
| | | insertdata.InsertToEs(resultMsg) |
| | | //事件推送 |
| | | //labelFilter.Judge(resultMsg) |
| | | } |
| | | } |
| | | } |
| | |
| | | logger.Info("--------------追踪之后yolo的个数:",len(faceParam.Faces)) |
| | | for _, info := range faceParam.Faces { |
| | | //logger.Info("_______________________________________________第一次看相似值:",info.Pos.FAngle.Confidence*100) |
| | | photoMap := ruleserver.PhotoMap{Rects: rectFormat(info.Pos.RcFace), Score: float64(info.Pos.FAngle.Confidence*100), IsYolo:false,ThftRes:*(info.Result),Feature:info.Feats} |
| | | photoMap := ruleserver.PhotoMap{Id:info.Pos.FaceID,Rects: rectFormat(info.Pos.RcFace), Score: float64(info.Pos.FAngle.Confidence*100), IsYolo:false,ThftRes:*(info.Result),Feature:info.Feats} |
| | | arg.Photo = append(arg.Photo, photoMap) |
| | | } |
| | | args.Sdkdata = append(args.Sdkdata,&arg) |