-
Notifications
You must be signed in to change notification settings - Fork 1
/
ms_faceRecognition.proto
executable file
·60 lines (39 loc) · 1.65 KB
/
ms_faceRecognition.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
syntax = "proto3";
package faceRecognition;
//This tells gRPC we have an InferenceServer service with an inference function, notice that we need to specify the type of the messages: InferenceRequest and InferenceReply
// "repeated" means list of
service FaceRecognitionService {
// Whatever
rpc Inference (FaceRecognitionRequest) returns (FaceRecognitionInferenceReply) { }
// Does inference on image based on the faces detected bounding box from a third party
rpc InferenceWithoutDetection (FaceRecognitionWithRectListRequest) returns (FaceRecognitionInferenceReply) { }
// Does face detection and then face recognition, uses a fast face detection mode (ex: OpenCV)
rpc FastInferenceWithDetection (FaceRecognitionRequest) returns (FaceRecognitionInferenceReply) { }
// Does face detection and then face recognition, uses a accurate face detection mode, way slower than Opencv (ex: Retinaface)
rpc AccurateInferenceWithDetection (FaceRecognitionRequest) returns (FaceRecognitionInferenceReply) { }
}
// Image and list of box, already defined from third-party face detection
message FaceRecognitionWithRectListRequest {
bytes image = 1;
repeated string collections = 2;
repeated FaceRect rectList = 3;
}
//Request message containing image
message FaceRecognitionRequest {
bytes image = 1;
repeated string collections = 2;
}
//Response Message
message FaceRecognitionInferenceReply {
repeated FaceRecognized recognitions = 1;
}
message FaceRecognized {
optional string uuid = 1;
optional FaceRect faceRect = 2;
}
message FaceRect {
uint32 x1 = 1;
uint32 y1 = 2;
uint32 x2 = 3;
uint32 y2 = 4;
}