派生自 libgowrapper/face

zhangmeng
2020-01-13 40841b4987c4b13cb6534f4ff652f5aa0b075d32
run.go
@@ -28,11 +28,11 @@
   shm                 bool
   ipc2Rule            string
   ruleMsgMaxCacheSize int
   reserved            map[string]string
   reserved            map[string]interface{}
}
// Create create sdk
func Create(config string, typ, id string, gpu int, shm bool, ipc2Rule string, ruleMaxSize int, fn func(...interface{}), reserved map[string]string) interface{} {
func Create(config string, typ, id string, gpu int, shm bool, ipc2Rule string, ruleMaxSize int, fn func(...interface{}), reserved map[string]interface{}) interface{} {
   handle := NewSDK(fn)
   if handle == nil {
@@ -194,6 +194,7 @@
         }
         if _, ok := f.ftrackChans[rMsg.Cid]; ok {
            f.fnLogger("Face Cache Size: ", len(f.ftrackChans))
            f.ftrackChans[rMsg.Cid] <- rMsg
         } else {
@@ -253,6 +254,8 @@
         // conv to bgr24 and resize
         imgW, imgH := int(i.Width), int(i.Height)
         f.fnLogger("Face Start Run:", dtchn, "CAMERAID: ", rMsg.Cid)
         count, data, _ := f.handle.Run(i.Data, imgW, imgH, 3, dtchn)
         sdkhelper.EjectResult(data, rMsg, out)
@@ -260,7 +263,7 @@
         if rMsg.Tasklab != nil {
            id, name = rMsg.Tasklab.Taskid, rMsg.Tasklab.Taskname
         }
         f.fnLogger("CAMERAID: ", rMsg.Cid, " TASKID: ", id, " TASKNAME: ", name, " DETECT ", f.typ, " COUNT: ", count)
         f.fnLogger("Chan:", dtchn, "CAMERAID: ", rMsg.Cid, " TASKID: ", id, " TASKNAME: ", name, " DETECT ", f.typ, " COUNT: ", count)
         sc++
         if sc == 25 {