Skip to content

Commit ffc56ec

Browse files
Merge pull request #125 from regulaforensics/SP-23125
Update README.md
2 parents bb4666e + 7e6fef7 commit ffc56ec

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,25 +31,27 @@ pipenv install regula_facesdk_webclient
3131
Performing request:
3232

3333
```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
3537

3638
with open("face1.jpg", "rb") as f:
3739
face_1_bytes = f.read()
3840

3941
with open("face2.jpg", "rb") as f:
4042
face_2_bytes = f.read()
4143

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:
4345
images = [
4446
MatchImage(index=1, data=face_1_bytes, type=ImageSource.LIVE),
4547
MatchImage(index=2, data=face_1_bytes, type=ImageSource.DOCUMENT_RFID),
4648
MatchImage(index=3, data=face_2_bytes)
4749
]
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)
5052

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)
5355
```
5456

5557
You can find more detailed guide and run this sample in [example](./example) folder.

0 commit comments

Comments
 (0)