From cd982114434e2fa2617ccdf02ea49e162c09a464 Mon Sep 17 00:00:00 2001 From: zhangmeng <775834166@qq.com> Date: 星期一, 16 十二月 2019 15:39:45 +0800 Subject: [PATCH] bug fixed --- work/sdk/facetrack.go | 8 ++-- work/sdk/humantrack.go | 6 +- libgowrapper/humantrack | 2 libgowrapper/gitpush.sh | 14 +++++++ work/sdk/ydetect.go | 6 +- libgowrapper/yolo | 2 runtime/libyolo.so | 0 work/sdk/fdetect.go | 8 ++-- libgowrapper/gitpull.sh | 12 ++++++ runtime/libface.so | 0 runtime/libvehicle.so | 0 libgowrapper/vehicle | 2 work/sdk/vdetect.go | 6 +- libgowrapper/face | 2 14 files changed, 47 insertions(+), 21 deletions(-) diff --git a/libgowrapper/face b/libgowrapper/face index f1e6adc..fcc639d 160000 --- a/libgowrapper/face +++ b/libgowrapper/face @@ -1 +1 @@ -Subproject commit f1e6adc90c273250b24cdd0883ad45a94ba48940 +Subproject commit fcc639d40cab8217c001870ce0ee834c440b3647 diff --git a/libgowrapper/gitpull.sh b/libgowrapper/gitpull.sh new file mode 100755 index 0000000..750f2fe --- /dev/null +++ b/libgowrapper/gitpull.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +cur=`pwd` + +for v in `ls`; do + if [ ! -d $cur"/"$v ]; then + continue + fi + cd $v + git pull + cd .. +done diff --git a/libgowrapper/gitpush.sh b/libgowrapper/gitpush.sh new file mode 100755 index 0000000..ba2b340 --- /dev/null +++ b/libgowrapper/gitpush.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +cur=`pwd` + +for v in `ls`; do + if [ ! -d $cur"/"$v ]; then + continue + fi + cd $v + git add . + git commit -m 'update' + git push + cd .. +done diff --git a/libgowrapper/humantrack b/libgowrapper/humantrack index e36c6d3..10177de 160000 --- a/libgowrapper/humantrack +++ b/libgowrapper/humantrack @@ -1 +1 @@ -Subproject commit e36c6d3247a5c782de39b9174000555099d9bdb0 +Subproject commit 10177de713116924d36fe6da555808a54ffe2c5c diff --git a/libgowrapper/vehicle b/libgowrapper/vehicle index 2d3cff9..803c42b 160000 --- a/libgowrapper/vehicle +++ b/libgowrapper/vehicle @@ -1 +1 @@ -Subproject commit 2d3cff9c46ab33fad5dfdb1e0c40a7f77074ffbd +Subproject commit 803c42b87028b139e4ac87f920cb479d5ba0c0f2 diff --git a/libgowrapper/yolo b/libgowrapper/yolo index c01f7d9..1c07e97 160000 --- a/libgowrapper/yolo +++ b/libgowrapper/yolo @@ -1 +1 @@ -Subproject commit c01f7d960ac5ec3ec37f8434de099166475cdac5 +Subproject commit 1c07e97d2981ae1daadc55224d59caa1b91ee10f diff --git a/runtime/libface.so b/runtime/libface.so index 54421f9..80dfe0a 100644 --- a/runtime/libface.so +++ b/runtime/libface.so Binary files differ diff --git a/runtime/libvehicle.so b/runtime/libvehicle.so index 32350a1..46677fc 100644 --- a/runtime/libvehicle.so +++ b/runtime/libvehicle.so Binary files differ diff --git a/runtime/libyolo.so b/runtime/libyolo.so index e128834..06c6aad 100644 --- a/runtime/libyolo.so +++ b/runtime/libyolo.so Binary files differ diff --git a/work/sdk/facetrack.go b/work/sdk/facetrack.go index 0c1b998..20e76ea 100644 --- a/work/sdk/facetrack.go +++ b/work/sdk/facetrack.go @@ -109,10 +109,10 @@ } // conv to bgr24 and resize imgW, imgH := int(i.Width), int(i.Height) - ret := e.fnTrackerResize(e.handle, e.ftrackChannels[rMsg.Msg.Cid], imgW, imgH) - logo.Infof("ResizeFaceTracker: cid:%s, chan:%d, wXh:%d x %d ,result:%d\n", - rMsg.Msg.Cid, e.ftrackChannels[rMsg.Msg.Cid], imgW, imgH, ret) - go e.detectTrackOneChn(ctx, e.ftrackChans[rMsg.Msg.Cid], out, typ, e.ftrackChannels[rMsg.Msg.Cid]) + ret := e.fnTrackerResize(e.handle, imgW, imgH, chn) + logo.Infof("ResizeFaceTracker: cid:%s, chan:%d, wXh:%d x %d ,result:%t\n", + rMsg.Msg.Cid, chn, imgW, imgH, ret) + go e.detectTrackOneChn(ctx, e.ftrackChans[rMsg.Msg.Cid], out, typ, chn) e.ftrackChans[rMsg.Msg.Cid] <- rMsg } } diff --git a/work/sdk/fdetect.go b/work/sdk/fdetect.go index 87635b2..4798f90 100644 --- a/work/sdk/fdetect.go +++ b/work/sdk/fdetect.go @@ -31,7 +31,7 @@ chnLock sync.Mutex handle interface{} - fnInit func() interface{} + fnInit func(func(...interface{})) interface{} fnFree func(interface{}) fnRun func(interface{}, []byte, int, int, int, int) []sdkstruct.CFaceResult fnTrackerResize func(interface{}, int, int, int) bool @@ -70,7 +70,7 @@ sampleSize: samp, handle: nil, - fnInit: fnInit.(func() interface{}), + fnInit: fnInit.(func(func(...interface{})) interface{}), fnFree: fnFree.(func(interface{})), fnRun: fnRun.(func(interface{}, []byte, int, int, int, int) []sdkstruct.CFaceResult), fnTrackerResize: fnTrackerResize.(func(interface{}, int, int, int) bool), @@ -97,9 +97,9 @@ gpu = gogpu.ValidGPU(2048) } - e.handle = e.fnInit() + e.handle = e.fnInit(logo.Infoln) - if !e.fnTracker(e.handle, 1280, 720, e.faceNum, e.interval, e.sampleSize, e.threads, gpu) { + if !e.fnTracker(e.handle, 1280, 720, e.faceNum, e.interval, 720, e.threads, gpu) { logo.Errorln("FACE TRACKER CREATE ERROR") } logo.Infoln("Face Tracker Use GPU: ", gpu) diff --git a/work/sdk/humantrack.go b/work/sdk/humantrack.go index 446c8a6..8c5c3fd 100644 --- a/work/sdk/humantrack.go +++ b/work/sdk/humantrack.go @@ -21,7 +21,7 @@ flag int handle interface{} - fnInit func(int, int, int) interface{} + fnInit func(int, int, int, func(...interface{})) interface{} fnFree func(interface{}) fnRun func(interface{}, []byte, int, int, int) []sdkstruct.FgResult fnProcess func(interface{}, []sdkstruct.SDKImage) ([]sdkstruct.FgResult, error) @@ -52,7 +52,7 @@ flag: flag, handle: nil, - fnInit: fnInit.(func(int, int, int) interface{}), + fnInit: fnInit.(func(int, int, int, func(...interface{})) interface{}), fnFree: fnFree.(func(interface{})), fnRun: fnRun.(func(interface{}, []byte, int, int, int) []sdkstruct.FgResult), fnProcess: fnProc.(func(interface{}, []sdkstruct.SDKImage) ([]sdkstruct.FgResult, error)), @@ -71,7 +71,7 @@ if gpu == -1 { gpu = gogpu.ValidGPU(2048) } - h := t.fnInit(gpu, t.batchSize, t.flag) + h := t.fnInit(gpu, t.batchSize, t.flag, logo.Infoln) logo.Infoln("HumanTrack USE GPU: ", gpu) if h == nil { diff --git a/work/sdk/vdetect.go b/work/sdk/vdetect.go index 00c6a38..2c63000 100644 --- a/work/sdk/vdetect.go +++ b/work/sdk/vdetect.go @@ -19,7 +19,7 @@ modelPath string handle interface{} - fnInit func(int, int, string, string) interface{} + fnInit func(int, int, string, string, func(...interface{})) interface{} fnFree func(interface{}) fnRun func(interface{}, []byte, int, int, int, int, int, int, int) []sdkstruct.CVehicleITSResult } @@ -43,7 +43,7 @@ modelPath: model, handle: nil, - fnInit: fnInit.(func(int, int, string, string) interface{}), + fnInit: fnInit.(func(int, int, string, string, func(...interface{})) interface{}), fnFree: fnFree.(func(interface{})), fnRun: fnRun.(func(interface{}, []byte, int, int, int, int, int, int, int) []sdkstruct.CVehicleITSResult), } @@ -51,7 +51,7 @@ // Init impl func (d *VehicleDetector) Init() bool { - h := d.fnInit(2, 0, d.licSrvPath, d.modelPath) + h := d.fnInit(2, 0, d.licSrvPath, d.modelPath, logo.Infoln) if h == nil { logo.Errorln("INIT VEHICLE SDK ERROR") return false diff --git a/work/sdk/ydetect.go b/work/sdk/ydetect.go index 737b41a..922186c 100644 --- a/work/sdk/ydetect.go +++ b/work/sdk/ydetect.go @@ -28,7 +28,7 @@ cond bool handle interface{} - fnInit func(string, string, string, int) interface{} + fnInit func(string, string, string, int, func(...interface{})) interface{} fnFree func(interface{}) fnRun func(interface{}, string, []byte, int, int, int, float32, int) ([]sdkstruct.CObjTrackInfo, []sdkstruct.CObjTrackInfo) } @@ -57,7 +57,7 @@ cond: false, handle: nil, - fnInit: fnInit.(func(string, string, string, int) interface{}), + fnInit: fnInit.(func(string, string, string, int, func(...interface{})) interface{}), fnFree: fnFree.(func(interface{})), fnRun: fnRun.(func(interface{}, string, []byte, int, int, int, float32, int) ([]sdkstruct.CObjTrackInfo, []sdkstruct.CObjTrackInfo)), } @@ -70,7 +70,7 @@ if gpu == -1 { gpu = gogpu.ValidGPU(2048) } - h := y.fnInit(y.cfg, y.weights, y.name, gpu) + h := y.fnInit(y.cfg, y.weights, y.name, gpu, logo.Infoln) logo.Infoln("YOLO USE GPU: ", gpu) if h == nil { -- Gitblit v1.8.0