zhangmeng
2019-12-11 b4f22e68212f45aa685e27b2e83be5f82b3a8a3f
copy from VAProcess
1个文件已删除
8个文件已修改
65 ■■■■ 已修改文件
README.md 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
proc/proc.go 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
proc/sdk.go 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
runtime/libdarknet.so 补丁 | 查看 | 原始文档 | blame | 历史
work/ipcreciever.go 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
work/ipcsender.go 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
work/sdk/facetrack.go 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
work/sdk/plateIDdetect.go 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
work/sdk/yolotrack.go 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
README.md
File was deleted
proc/proc.go
@@ -36,6 +36,7 @@
)
func prepare(name string, gpu int) (string, bool) {
    return initSDK(name, gpu)
}
proc/sdk.go
@@ -16,6 +16,7 @@
        os.Exit(130)
        return nil, false
    }
    thrds := threads
    if thrds > sdk.MaxFaceDetectThreadNum {
        thrds = sdk.MaxFaceDetectThreadNum
runtime/libdarknet.so
Binary files differ
work/ipcreciever.go
@@ -86,7 +86,7 @@
                    logo.Infoln("ANALYSIS CREATE SHM")
                } else {
                    if d != nil {
                        logo.Infoln("~~~~~~shm recv image:", len(d))
                        logo.Infoln("~~~shm recv image:", len(d))
                        dataChan <- d
                    }
                }
@@ -94,7 +94,7 @@
                if msg, err := i.Recv(); err != nil {
                    // logo.Errorln("recv error : ", err, " url: ", r.ipcURL)
                } else {
                    logo.Infoln("~~~~~~mangos recv image:", len(msg))
                    logo.Infoln("~~~mangos recv image:", len(msg))
                    dataChan <- msg
                }
            }
work/ipcsender.go
@@ -1,7 +1,6 @@
package work
import (
    "analysis/goconv"
    "analysis/logo"
    "context"
@@ -80,26 +79,7 @@
            if int(i.Msg.Tasklab.Index+1) == len(i.Msg.Tasklab.Sdkinfos) {
                if s.fn != nil {
                    imgInfo := unpackImage(i, "sender")
                    if imgInfo.Data == nil {
                        continue
                    }
                    imgProto := protomsg.Image{
                        Data:      goconv.YUV2BGR(imgInfo.Data, int(imgInfo.Width), int(imgInfo.Height)),
                        Width:     int32(imgInfo.Width),
                        Height:    int32(imgInfo.Height),
                        Timestamp: imgInfo.Timestamp,
                        Id:        imgInfo.Id,
                        Cid:       imgInfo.Cid,
                    }
                    var sendData []byte
                    if b, err := proto.Marshal(&imgProto); err == nil {
                        i.Msg.Data = b
                        sendData, err = proto.Marshal(&i.Msg)
                        if err != nil {
                            continue
                        }
                    }
                    sFlag := true
                    for _, v := range i.Msg.Tasklab.Sdkinfos {
                        if len(v.Sdkdata) < 2 {
@@ -107,7 +87,7 @@
                            break
                        }
                    }
                    s.fn(sendData, sFlag)
                    s.fn(d, sFlag)
                }
            }
work/sdk/facetrack.go
@@ -30,7 +30,6 @@
*/
import "C"
import (
    "analysis/goconv"
    "analysis/logo"
    "analysis/work"
    "context"
@@ -156,8 +155,8 @@
    for {
        select {
        case <-ctx.Done():
            goconv.Free()
            return
        case rMsg := <-in:
            if !validRemoteMessage(rMsg, typ) {
@@ -175,12 +174,8 @@
            // conv to bgr24 and resize
            imgW, imgH := int(i.Width), int(i.Height)
            bgrData := goconv.YUV2BGR(i.Data, imgW, imgH)
            if bgrData == nil {
                ejectResult(nil, rMsg, out)
                continue
            }
            img := gosdk.SDKImage{Data: bgrData, Width: imgW, Height: imgH}
            img := gosdk.SDKImage{Data: i.Data, Width: imgW, Height: imgH}
            detect := gosdk.FaceTrackSimple(img, dtchn)
work/sdk/plateIDdetect.go
@@ -1,7 +1,6 @@
package sdk
import (
    "analysis/goconv"
    "analysis/logo"
    "analysis/work"
    "context"
@@ -98,7 +97,6 @@
    for {
        select {
        case <-ctx.Done():
            goconv.Free()
            return
        default:
            rMsg := <-in
@@ -114,12 +112,7 @@
            }
            imgW, imgH := int(i.Width), int(i.Height)
            bgrData := goconv.YUV2BGR(i.Data, imgW, imgH)
            if bgrData == nil {
                ejectResult(nil, rMsg, out)
                continue
            }
            img := gosdk.SDKImage{Data: bgrData, Width: imgW, Height: imgH}
            img := gosdk.SDKImage{Data: i.Data, Width: imgW, Height: imgH}
            rcDetect := gosdk.CRECT{
                Left:   0,
work/sdk/yolotrack.go
@@ -1,7 +1,6 @@
package sdk
import (
    "analysis/goconv"
    "analysis/logo"
    "analysis/work"
    "context"
@@ -54,7 +53,6 @@
    for {
        select {
        case <-ctx.Done():
            goconv.Free()
            return
        default:
@@ -100,12 +98,8 @@
    // conv to bgr24 and resize
    imgW, imgH := int(i.Width), int(i.Height)
    bgrData := goconv.YUV2BGR(i.Data, imgW, imgH)
    if bgrData == nil {
        ejectResult(nil, rMsg, out)
        return
    }
    img := gosdk.SDKImage{Data: bgrData, Width: imgW, Height: imgH}
    img := gosdk.SDKImage{Data: i.Data, Width: imgW, Height: imgH}
    v, ok := y.tracker[rMsg.Msg.Cid]
    if !ok {
@@ -152,7 +146,6 @@
        id, name = rMsg.Msg.Tasklab.Taskid, rMsg.Msg.Tasklab.Taskname
    }
    logo.Infoln("CAMERAID: ", rMsg.Msg.Cid, " TASKID: ", id, " TASKNAME: ", name, " DETECT YOLO COUNT: ", len(allO))
}
func convert2ProtoYoloTrack(obj []gosdk.CObjTrackInfo, fx, fy float64) []*protomsg.ObjInfo {