From 9ebac0811a5ade6fee8bb25868d8ca67f3a9b7ee Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 23 Apr 2019 13:34:03 +0200 Subject: readme --- README.md | 37 +++++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 64a65f3..388dc5d 100644 --- a/README.md +++ b/README.md @@ -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. -- cgit v1.2.3-70-g09d2