zhangmeng
2020-01-06 a10f7bf10c195421b089cda0c13f2195c614cb80
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
package util
 
// FetchServerInfo 从sqlite的服务器获取同步信息的服务
type FetchServerInfo struct {
    IP       string
    HTTPort  int
    HBPort   int //心跳端口
    DataPort int //数据端口
}
 
// SDKFaceInfo face
type SDKFaceInfo struct {
    DetectThrd    int
    DetectNum     int
    DetectAngle   int
    PropThrd      int
    ExtractThrd   int
    TrackInterval int
    SampleSize    int
}
 
// SDKCarInfo car
type SDKCarInfo struct {
    LicenseServerPath string
    Model             string
    MaxImageWidth     int
    MaxImageHeight    int
}
 
var (
    // FSI 同步服务器信息
    FSI = &FetchServerInfo{
        IP:       "127.0.0.1",
        HTTPort:  8001,
        HBPort:   40007,
        DataPort: 50007,
    }
 
    // SFI 人脸信息
    SFI = &SDKFaceInfo{
        DetectThrd:    16,
        DetectNum:     30,
        DetectAngle:   60,
        PropThrd:      16,
        ExtractThrd:   16,
        TrackInterval: 3,
        SampleSize:    720,
    }
 
    // SCI sdkcarinfo
    SCI = &SDKCarInfo{
        LicenseServerPath: "./vtr.key",
        Model:             "./data/model",
        MaxImageWidth:     4096,
        MaxImageHeight:    2160,
    }
 
    // ToRuleIPC to ruleprocess
    ToRuleIPC = "ipc:///tmp/sdk-2-rules-process.ipc"
 
    // RunParams slave进程需要的参数,从master传入
    RunParams []string
 
    // MapParames 保存参数map,备更新
    MapParames = make(map[string]string)
 
    // LogFile log
    LogFile string
)
 
const (
    FeatAll  = "all"
    FeatFace = "face"
    FeatYolo = "yolo"
 
    FakeSdkID = "FakeSdkID"
)
 
const (
    RuleIPC = "rule-ipc"
 
    FetchSrvIP            = "fetch-server-ip"
    FetchSrvPort          = "fetch-server-port"
    FetchSrvHeartbeatPort = "fetch-server-heartbeat-port"
    FetchSrvDataPort      = "fetch-server-data-port"
 
    FaceDetectThread   = "face-detect-thread"
    FaceDetectNum      = "face-detect-num"
    FaceDetectAngle    = "face-detect-angle"
    FacePropertyThread = "face-property-thread"
    FaceExtractThread  = "face-extract-thread"
    FaceTrackInterval  = "face-track-interval"
    FaceTrackSample    = "face-track-sample"
 
    CarSDKLicense     = "car-sdk-license"
    CarMaxImageWidth  = "car-max-image-width"
    CarMaxImageHeight = "car-max-image-height"
    CarSDKModel       = "car-sdk-model"
)