findface-sf-api
¶
The findface-sf-api
service implements HTTP API for the FindFace core main functionality such as face detection and face recognition (the mentioned functions themselves are provided by findface-extraction-api`). It interfaces with the biometric database powered by Tarantool via the findface-tarantool-server
service, as well as with findface-extraction-api
(provides face detection and face recognition) and findface-upload
(provides a storage for original images and FindFace core artifacts).
To detect a face in an image, you need to send the image in an API request to findface-sf-api
. The findface-sf-api
will then redirect the request to findface-extraction-api
for face detection and recognition.
If there is a configured video face detection module in the system (like in FindFace Security), findface-sf-api
also interfaces with the findface-facerouter
service. It receives data of detected in video faces along with processing directives from findface-facerouter
, and then executes the received directives, for example, saves faces into a specific database gallery.
Note
In FindFace Security, findface-facerouter
functions are performed by findface-security
.
Functionality:
- HTTP API implementation (face detection and face recognition methods, performed via
findface-extraction-api
). - saving face data to the biometric database (performed via
findface-tarantool-server
), - saving original images, face thumbnails and normalized face images to an NginX-powered web server (via
findface-upload
). - provides interaction between all the FindFace core components.
The findface-sf-api
configuration is done through the /etc/findface-sf-api.ini
configuration file.
cache:
inmemory:
size: 16384
memcache:
nodes:
- 127.0.0.1:11211
timeout: 100ms
redis:
addr: localhost:6379
db: 0
network: tcp
password: ''
timeout: 5s
type: memcache
extraction-api:
extraction-api: http://127.0.0.1:18666
timeouts:
connect: 5s
idle_connection: 10s
overall: 35s
response_header: 30s
limits:
allow-return-facen: false
body-image-length: 33554432
deny-networks: 127.0.0.0/8,192.168.0.0/16,10.0.0.0/8,::1/128,fe00::/8
url-length: 4096
listen: 127.0.0.1:18411
normalized-storage:
enabled: true
s3:
access-key: ''
bucket-name: ''
endpoint: ''
operation-timeout: 30
public-url: ''
region: ''
secret-access-key: ''
secure: true
type: webdav
webdav:
timeouts:
connect: 5s
idle_connection: 10s
overall: 35s
response_header: 30s
upload-url: http://127.0.0.1:3333/uploads/
storage-api:
max-idle-conns-per-host: 20
shards:
- master: http://127.0.0.1:8101/v2/
slave: ''
- master: http://127.0.0.1:8102/v2/
slave: ''
timeouts:
connect: 5s
idle_connection: 10s
overall: 35s
response_header: 30s
When configuring findface-sf-api
, refer to the following parameters:
Parameter | Description |
---|---|
extraction-api -> extraction-api |
IP address of the findface-extraction-api host. |
storage-api -> shards -> master |
IP address of the findface-tarantool-server master shard. |
storage-api -> shards -> slave |
IP address of the findface-tarantool-server replica shard. |
limits -> body-image-length |
The maximum size of an image in an API request, bytes. |
upload_url |
WebDAV NginX path to send original images, thumbnails and normalized face images to the
findface-upload service. |