| | |
| | | "basic.com/pubsub/protomsg.git" |
| | | "basic.com/valib/deliver.git" |
| | | "ruleprocess/insertdata" |
| | | "ruleprocess/labelFilter" |
| | | "ruleprocess/util" |
| | | |
| | | //"bufio" |
| | |
| | | // 将打完标签的数据插入到ES |
| | | insertdata.InsertToEs(resultMsg) |
| | | //事件推送 |
| | | labelFilter.Judge(resultMsg) |
| | | //go labelFilter.Judge(resultMsg) |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | i := protomsg.Image{} |
| | | err = proto.Unmarshal(bdata, &i) |
| | | logger.Info("接到数据,摄像机为:",m.Cid,"图片的id为:",i.Id) |
| | | //logger.Info("----------------看看有几个算法:",len(m.Tasklab.Sdkinfos)) |
| | | for _, sdkinfo := range m.Tasklab.Sdkinfos { // yolo算法 |
| | | if sdkinfo.Sdktype == "Yolo" { |
| | |
| | | arg.TaskId = m.Tasklab.Taskid |
| | | arg.IpcId = sdkinfo.Ipcid |
| | | arg.IsYolo = true |
| | | bdata, err := util.UnCompress(m.Data) |
| | | if err != nil { |
| | | panic("解压缩图片时出现错误") |
| | | } |
| | | i := protomsg.Image{} |
| | | err = proto.Unmarshal(bdata, &i) |
| | | //bdata, err := util.UnCompress(m.Data) |
| | | //if err != nil { |
| | | // panic("解压缩图片时出现错误") |
| | | //} |
| | | //i := protomsg.Image{} |
| | | //err = proto.Unmarshal(bdata, &i) |
| | | arg.ImageWidth = int(i.Width) |
| | | arg.ImageHeight = int(i.Height) |
| | | // 暂时写死,sdk还没有这俩算法 |
| | |
| | | arg.TaskId = m.Tasklab.Taskid |
| | | arg.IpcId = sdkinfo.Ipcid |
| | | arg.IsYolo = false |
| | | bdata, err := util.UnCompress(m.Data) |
| | | if err != nil { |
| | | panic("解压缩图片时出现错误") |
| | | } |
| | | i := protomsg.Image{} |
| | | err = proto.Unmarshal(bdata, &i) |
| | | //bdata, err := util.UnCompress(m.Data) |
| | | //if err != nil { |
| | | // panic("解压缩图片时出现错误") |
| | | //} |
| | | //i := protomsg.Image{} |
| | | //err = proto.Unmarshal(bdata, &i) |
| | | arg.ImageWidth = int(i.Width) |
| | | arg.ImageHeight = int(i.Height) |
| | | // 暂时写死,sdk还没有这俩算法 |
| | |
| | | logger.Info("解析FACE sdk数据时出现错误", err) |
| | | continue |
| | | } |
| | | logger.Info("--------------追踪之后yolo的个数:",len(faceParam.Faces)) |
| | | logger.Info("--------------追踪之后人脸的个数:",len(faceParam.Faces)) |
| | | for _, info := range faceParam.Faces { |
| | | //logger.Info("_______________________________________________第一次看相似值:",info.Pos.FAngle.Confidence*100) |
| | | 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} |