From 9b01e3eec13fae6c8e855fe2f4b331b9b20ce638 Mon Sep 17 00:00:00 2001 From: zhangmeng <775834166@qq.com> Date: 星期二, 14 一月 2020 14:02:16 +0800 Subject: [PATCH] switch to yolo debug --- run.go | 26 +++++++++++++++++++++----- 1 files changed, 21 insertions(+), 5 deletions(-) diff --git a/run.go b/run.go index 488f9b2..0a78442 100644 --- a/run.go +++ b/run.go @@ -6,6 +6,7 @@ "fmt" "io/ioutil" "os" + "time" "unsafe" "basic.com/libgowrapper/sdkhelper.git" @@ -87,8 +88,13 @@ return default: - msg, err = c.Recv() - if err != nil { + for { + msg, err = c.Recv() + if err == nil { + break + } + s.fnLogger("REID~~~~~~Recv From HumanTrack error: ", err) + time.Sleep(5 * time.Millisecond) continue } @@ -119,7 +125,7 @@ s.fnLogger("REID~~~~~~Run Reid Use GPU: ", s.gpu) ///////////////////////////////// - if f, err := os.Create("./origin-feat.txt"); err == nil { + if f, err := os.Create("./reid-feat.txt"); err == nil { defer f.Close() w := bufio.NewWriter(f) @@ -133,8 +139,18 @@ } buf := float32SliceAsByteSlice(feat) - ioutil.WriteFile("./feat.txt", buf, 0644) - c.Send(buf) + ioutil.WriteFile("./reid-feat-byte.txt", buf, 0644) + + for { + err = c.Send(buf) + if err == nil { + break + } + s.fnLogger("REID~~~~~~Send HumanTrack error: ", err) + time.Sleep(5 * time.Millisecond) + continue + } + } } -- Gitblit v1.8.0