@@ -31,25 +31,27 @@ pipenv install regula_facesdk_webclient
31
31
Performing request:
32
32
33
33
``` python
34
- from regula_facesdk_webclient import *
34
+ from regula.facesdk.webclient import MatchImage, MatchRequest
35
+ from regula.facesdk.webclient.ext import FaceSdk, DetectRequest
36
+ from regula.facesdk.webclient.gen.model.image_source import ImageSource
35
37
36
38
with open (" face1.jpg" , " rb" ) as f:
37
39
face_1_bytes = f.read()
38
40
39
41
with open (" face2.jpg" , " rb" ) as f:
40
42
face_2_bytes = f.read()
41
43
42
- with MatchingApi (host = " http://0.0.0.0:41101/api " ) as api :
44
+ with FaceSdk (host = " http://0.0.0.0:41101" ) as sdk :
43
45
images = [
44
46
MatchImage(index = 1 , data = face_1_bytes, type = ImageSource.LIVE ),
45
47
MatchImage(index = 2 , data = face_1_bytes, type = ImageSource.DOCUMENT_RFID ),
46
48
MatchImage(index = 3 , data = face_2_bytes)
47
49
]
48
- match_request = MatchRequest(images = images)
49
- match_response = api .match(match_request)
50
+ match_request = MatchRequest(images = images, thumbnails = True )
51
+ match_response = sdk.match_api .match(match_request)
50
52
51
- detect_request = DetectRequest(face_1_bytes)
52
- detect_response = api .detect(detect_request)
53
+ detect_request = DetectRequest(image = face_1_bytes)
54
+ detect_response = sdk.match_api .detect(detect_request)
53
55
```
54
56
55
57
You can find more detailed guide and run this sample in [ example] ( ./example ) folder.
0 commit comments