reid from https://github.com/michuanhaohao/reid-strong-baseline
zhangmeng
2020-01-20 4324306f529b9bc62d7e818c0b12ff822687bb47
run.go
@@ -48,7 +48,7 @@
   "reid/rpc"
   "basic.com/libgowrapper/sdkhelper.git"
   "reid/common"
   "basic.com/valib/gogpu.git"
@@ -68,7 +68,7 @@
// Create Reid
func Create(config string, typ, id string, gpu int, shm bool, ipc2Rule string, ruleMaxSize int, fn func(...interface{}), reserved map[string]interface{}) interface{} {
   cfg, err := sdkhelper.ReadConfig(config)
   cfg, err := common.ReadConfig(config)
   if err != nil {
      fn("Reid SDK Create Error When Read Config: ", err)
      return nil
@@ -88,7 +88,7 @@
      }
   }
   gpuM := sdkhelper.Atoi(cfg.Param[sGPU])
   gpuM := common.Atoi(cfg.Param[sGPU])
   rGPU := gpu
@@ -123,8 +123,8 @@
   ipcSnd := s.ipc + postPush
   ipcRcv := s.ipc + postPull
   sndURL := sdkhelper.GetIpcAddress(true, ipcSnd)
   rcvURL := sdkhelper.GetIpcAddress(true, ipcRcv)
   sndURL := common.GetIpcAddress(true, ipcSnd)
   rcvURL := common.GetIpcAddress(true, ipcRcv)
   chSnd := make(chan []byte, 3)
   chRcv := make(chan []byte, 3)
@@ -133,7 +133,7 @@
   go recv.Run(ctx)
   chMsg := make(chan protomsg.SdkMessage, 3)
   go sdkhelper.UnserilizeProto(ctx, chRcv, chMsg, s.fnLogger)
   go common.UnserilizeProto(ctx, chRcv, chMsg, s.fnLogger)
   send := rpc.NewSender(sndURL, chSnd, true, s.fnLogger)
   go send.Run(ctx)
@@ -147,7 +147,7 @@
            s.fnLogger("reid !!!!!! Recv Msg From Humantrack Error")
            continue
         }
         i := sdkhelper.UnpackImage(msg, "reid", s.fnLogger)
         i := common.UnpackImage(msg, "reid", s.fnLogger)
         if i == nil || i.Data == nil || i.Width <= 0 || i.Height <= 0 {
            s.fnLogger("reid !!!!!! Unpack Image From Humantrack Msg Failed")
            continue