@@ -20,13 +20,18 @@ Currently this repository contains Dockerfiles for CPU inference.
2020
2121
2222## Usage:
23+ ### ` /extract ` endpoint
2324
24- API accept requests in JSON in following format:
25+ Extract endpoint accepts list of images and return faces bounding boxes with corresponding
26+ embeddings.
27+
28+ API accept JSON in following format:
2529```
2630{
2731 "images":{
2832 "data":[
29- base64_encoded_image1, base64_encoded_image2
33+ base64_encoded_image1,
34+ base64_encoded_image2
3035 ]
3136 },
3237 "max_size":640
@@ -56,7 +61,7 @@ def file2base64(path):
5661def extract_vecs (ims ,max_size = 640 ):
5762 target = [file2base64(im) for im in ims]
5863 req = {" images" : {" data" : target}," max_size" :max_size}
59- resp = requests.post(' http://localhost:6000 /extract' , json = req)
64+ resp = requests.post(' http://localhost:18080 /extract' , json = req)
6065 data = resp.json()
6166 return data
6267
@@ -87,17 +92,18 @@ dictionary containing face embedding, bounding box, detection probability and de
87921 . Clone repo
88932 . Download model ** LResNet100E-IR,ArcFace@ms1m-refine-v2** from
8994DeepInsight [ Model Zoo] ( https://github.com/deepinsight/insightface/wiki/Model-Zoo )
90- ([ dropbox] ( https://www.dropbox.com/s/tj96fsm6t6rq8ye/model-r100-arcface-ms1m-refine-v2.zip?dl=0 ) )
95+ ([ dropbox] ( https://www.dropbox.com/s/tj96fsm6t6rq8ye/model-r100-arcface-ms1m-refine-v2.zip?dl=0 ) ).
91963 . Unzip downloaded model to ` src/api/models `
97+ > You can use script ` load_model.sh ` to automatically download and unzip model to proper location.
92982 . Run ` src/api/app.py `
9399
94100## Run with Docker:
95101
961021 . Follow steps 1-3 from above.
971032 . Execute ` build.sh ` from ` docker_tf_opencv ` folder to build base image
98104` tensorflow-opencv:preconf `
99- 3 . Execute ` deploy.sh ` from repo root folder to build and start ` insightface-rest:v0.1 ` image
105+ 3 . Execute ` deploy.sh ` from repo root folder to build and start ` insightface-rest:v0.1.2 ` image
100106
101107
102108## Known issues:
103- 1 . Docker container requires at least 4GB RAM (MTCNN uses lots of RAM)
109+ 1 . Docker container requires at least 2.2GB RAM (MTCNN uses lots of RAM)
0 commit comments