| | |
| | | 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 { |
| | |
| | | } |
| | | |
| | | if _, ok := f.ftrackChans[rMsg.Cid]; ok { |
| | | f.fnLogger("Face Cache Size: ", len(f.ftrackChans)) |
| | | f.ftrackChans[rMsg.Cid] <- rMsg |
| | | } else { |
| | | |
| | |
| | | // 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) |
| | |
| | | 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 { |