|
|
1 year ago | |
|---|---|---|
| .. | ||
| dep | 1 year ago | |
| doc | 1 year ago | |
| solver | 1 year ago | |
| changelog.md | 1 year ago | |
| faceengine | 1 year ago | |
| iengine_install.lic | 1 year ago | |
| mqtt-v5-broker | 1 year ago | |
| readme.md | 1 year ago | |
| settings.yaml | 1 year ago | |
| sfe_client_rest | 1 year ago | |
| sfe_settings_server | 1 year ago | |
| sfe_stream_processor | 1 year ago | |
readme.md
SFE Stream Processor
Use aiengine script to start/stop all necessary processes
./aiengine start
./aiengine stop
The script runs following executables:
- sfe_stream_processor
- mqtt-v5-broker
- sfe_client_rest
- sfe_settings_server - optional
SFE Stream Processor
SFE Stream Processor processes the camera input, detects faces, detects landmarks, extracts template, matches the extracted template against the database and sends MQTT message to MQTT broker.
The configuration of SFE stream processor is loaded from settings.yaml file which comes as input argument.
./sfe_stream_processor settings.yaml
Find more information about settings in doc/sfe_stream_processor_configuration.md.
MQTT broker
MQTT broker is necessary to run on the camera as there is a MQTT Client running both in SFE Stream Processor and SFE REST Client. One MQTT Client publishes MQTT messages to specific MQTT topic where the other MQTT Client is subscribed to.
SFE REST Client
SFE REST Client is responsible for translation of HTTP requests to MQTT messages and MQTT messages to HTTP responses.
The MQTT connection information are read from settings.yaml file which comes as input argument.
You also have to specify the IP address and port where the REST server listens to the requests.
Example:
./sfe_client_rest settings.yaml 10.11.80.38 4242
Watchlist member management
POST /api/v1/WatchlistMembers/{id}/AddFace
Register new watchlist member or add face to existing watchlist member:
- If the watchlist member with specified ID does not exist, new watchlist member is registered.
- If the watchlist member with specified ID already exists, a face is added.
Path parameters:
- id - The ID of watchlist member to add new face
Request body:
- data - Binary data contating image in JPEG format or a valid face template
Response:
- The response contains the face template encoded in base64 if the face was added sucessfully.
- Otherwise it returns an error.
Example:
curl POST http://10.11.80.38:4242/api/v1/WatchlistMembers/lipo/AddFace -T C:\Users\mlipovsky\Downloads\lipo.jpg
GET /api/v1/WatchlistMembers
Get all watchlist members.
Response:
- The response contains all watchlist members with their face templates encoded in base64.
- Otherwise it returns an error.
Example:
curl GET http://10.11.80.38:4242/api/v1/WatchlistMembers
GET /api/v1/WatchlistMembers/{id}
Get watchlist member with specified ID.
Path parameters:
- id - The ID of watchlist member to get
Output:
- If a watchlist member wih specified ID exists the response contains this watchlist member ID with his face templates encoded in base64.
- Otherwise it returns an error.
Example:
curl GET http://10.11.80.38:4242/api/v1/WatchlistMembers/lipo
DELETE /api/v1/WatchlistMembers/{id}
Delete watchlist member with specified ID.
Path parameters:
- id - The ID of watchlist member to delete
Output:
- If a watchlist member wih specified ID exists the response contains this watchlist member ID with his face templates encoded in base64.
- Otherwise it returns an error.
Example:
curl DELETE http://10.11.80.38:4242/api/v1/WatchlistMembers/lipo
Frame data stream - /api/v1/frame_data
Returns the frame_data of actual frame in JSON format.
The structure of FrameData is documented in doc/frame_data.proto
Example:
websocat ws://10.11.80.38:4242/api/v1/frame_data
SFE Setting server
You can use SFE Setting server to be able to modify the configuration via Web UI. It basically changes the content of settings.yaml file which comes as input argument.
You also have to configure the IP address and port where the settings UI is available.
./sfe_settings_server --address 0.0.0.0 --port 8592 --settings-file settings.yaml
Then you can use the following URL (IP address of the camera and specified port) to access and modify the configuration.
10.11.80.38:8592
Scroll down and click the Submit button to save and apply the changes.
The SFE Stream Processor listens to changes in settings.yaml and reloads the configuration if necessary.