-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinfer.proto
68 lines (57 loc) · 1.13 KB
/
infer.proto
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
syntax = "proto3";
// store meta data
message MetaData {
double timestamp = 1;
// record run env
enum Environment {
UNKNOWN_ENVIRONMENT = 0;
PRODUCTION = 1;
DEVELOPMENT = 2;
STAGING = 3;
}
Environment environment = 2;
string uuid = 3;
string iso_date = 4;
}
// coordinate point
message Point {
int32 x = 1;
int32 y = 2;
}
// face landmarks contain 5 point
message Landmarks {
Point left_eye = 1;
Point right_eye = 2;
Point nose = 3;
Point mouth_left = 4;
Point mouth_right = 5;
}
// the bounding box
message Box {
Point up_left = 1;
Point lower_right = 2;
}
// request image
message Image {
bytes raw_data = 1;
int32 height = 2;
int32 width = 3;
string image_id = 4;
MetaData _meta_data = 5;
}
// each message Result
message Result {
Box box = 1;
Landmarks landmarks = 2;
double confidence = 3;
}
// return results
message InferResults {
string image_id = 1;
MetaData _meta_data = 2;
repeated Result results = 3;
}
// run inference
service Inference {
rpc Predict (Image) returns (InferResults) {}
}