forked from TheFoundryVisionmongers/nuke-ML-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmessage.proto
104 lines (86 loc) · 2.08 KB
/
message.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
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
100
101
102
103
104
syntax = "proto2";
package mlserver;
message RequestWrapper {
optional bool info = 1;
optional RequestInfo r1 = 2;
optional RequestInference r2 = 3;
}
message RespondWrapper {
optional bool info = 1;
optional RespondInfo r1 = 2;
optional RespondInference r2 = 3;
optional Error error = 4;
}
message RequestInfo {
optional bool info = 1;
}
message RespondInfo {
optional int32 num_models = 1;
repeated Model models = 2;
}
message Model {
optional string name = 1;
optional string label = 2;
repeated ImagePrototype inputs = 3;
repeated ImagePrototype outputs = 4;
repeated BoolAttrib bool_options = 5;
repeated IntAttrib int_options = 6;
repeated FloatAttrib float_options = 7;
repeated StringAttrib string_options = 8;
repeated BoolAttrib button_options = 9;
repeated MultipleChoiceOption mc_options = 10;
}
message MultipleChoiceOption {
optional string name = 1;
optional string value = 2;
repeated string choices = 3;
}
message ImagePrototype {
optional string name = 1;
optional int32 channels = 2;
}
message Error {
optional string msg = 1;
}
message RequestInference {
optional Model model = 1;
repeated Image images = 2;
}
message RespondInference {
optional int32 num_images = 1;
repeated Image images = 2;
optional int32 num_objects = 3;
repeated FieldValuePairAttrib objects = 4;
}
message Image {
optional int32 width = 1;
optional int32 height = 2;
optional int32 channels = 3;
optional bytes image = 4;
}
message BoolAttrib {
optional string name = 1;
repeated bool values = 2 [packed=true];
}
message IntAttrib {
optional string name = 1;
repeated int32 values = 2 [packed=true];
}
message FloatAttrib {
optional string name = 1;
repeated float values = 2 [packed=true];
}
message StringAttrib {
optional string name = 1;
repeated string values = 2;
}
message FieldValuePairAttrib {
optional string name = 1;
repeated FieldValuePair values = 2;
}
message FieldValuePair {
repeated IntAttrib int_attributes = 1;
repeated FloatAttrib float_attributes = 2;
repeated StringAttrib string_attributes = 3;
repeated FieldValuePairAttrib children = 4;
}