diff options
| author | adamhrv <adam@ahprojects.com> | 2019-04-23 13:42:20 +0200 |
|---|---|---|
| committer | adamhrv <adam@ahprojects.com> | 2019-04-23 13:42:20 +0200 |
| commit | 58e4f1fc03d9d1251c5446073e4527507028a09a (patch) | |
| tree | fe3441b73312543d525602a6b67d0772f88a9fb6 | |
| parent | 4b78004330cc8c904c030d9b3201eee9e21d6f2c (diff) | |
| parent | 9ebac0811a5ade6fee8bb25868d8ca67f3a9b7ee (diff) | |
Merge branch 'master' of github.com:adamhrv/vframe_check_api
| -rw-r--r-- | README.md | 37 |
1 files changed, 31 insertions, 6 deletions
@@ -5,19 +5,44 @@ VFRAME Check API Service ## Quick Start -- ... +- Install Python 3.x (use Miniconda or your choice) +- Install nginx, MySQL +``` +apt install git nginx mysql-server mysql-client +mysql_secure_installation +mysql -r root +``` + +Create MySQL user: + +``` +CREATE DATABASE vframe_check; +CREATE USER 'vframe_check'@'localhost' IDENTIFIED BY 'some_new_password'; +GRANT ALL PRIVILEGES ON vframe_check.* to 'vframe_check'@'localhost'; +``` + +Clone the repo and add a .env file: + +``` +DB_HOST=localhost +DB_NAME=vframe_check +DB_USER=vframe_check +DB_PASS=some_new_password +``` ### Endpoints -- ... +#### POST /v1/match +Check if an image is in the database. If no images are found within the similarity threshold, add this image to the database. -### Response Types +Options: -- ... +- `threshold` (default: 6) - Minimum similarity threshold. This is the Hamming distance used for phash comparisons. +- `add` (default: true) - Pass `false` if you do not want the image added to the database. -### Test Access +#### POST /v1/similar -- ... +- `limit` (default: 10) - Number of results to return. |
