-
Notifications
You must be signed in to change notification settings - Fork 0
/
client.go
59 lines (53 loc) · 1.04 KB
/
client.go
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
package GoDeepStack
type DeepStack struct {
Addr string
Port int
ApiKey string
SSL bool
}
func NewDeepStackClient(addr string, port int, ssl bool, apiKey string) *DeepStack {
return &DeepStack{
Addr: addr,
Port: port,
SSL: ssl,
ApiKey: apiKey,
}
}
func (d *DeepStack) NewObjectDetector() *ObjectDetector {
od := &ObjectDetector{
AbstractDetector: &AbstractDetector{
Client: d,
},
confidence: 0.5,
}
od.AbstractDetector.Detector = od
return od
}
func (d *DeepStack) NewFaceDetector() *FaceDetector {
fd := &FaceDetector{
AbstractDetector: &AbstractDetector{
Client: d,
},
confidence: 0.0,
}
fd.AbstractDetector.Detector = fd
return fd
}
func (d *DeepStack) NewFaceMatcher() *FaceMatcher {
fm := &FaceMatcher{
AbstractDetector: &AbstractDetector{
Client: d,
},
}
fm.AbstractDetector.Detector = fm
return fm
}
func (d *DeepStack) NewImageEnhancer() *ImageEnhancer {
ie := &ImageEnhancer{
AbstractDetector: &AbstractDetector{
Client: d,
},
}
ie.AbstractDetector.Detector = ie
return ie
}