From a72ecc91db39ac5a2d60aefc6d767da457500dde Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sun, 28 Apr 2019 14:22:55 +0200 Subject: ignore upload time --- check/app/server/api.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/check/app/server/api.py b/check/app/server/api.py index 1a935cc..acaef76 100644 --- a/check/app/server/api.py +++ b/check/app/server/api.py @@ -76,8 +76,6 @@ def match(): """ Search by uploading an image """ - start = time.time() - params, error = get_params() if error: return jsonify({ @@ -88,6 +86,8 @@ def match(): threshold, limit, url, ext, raw, im = params + start = time.time() + phash = compute_phash_int(im) results = search_by_phash(phash=phash, threshold=threshold, limit=limit) @@ -115,8 +115,6 @@ def similar(): """ Search by uploading an image """ - start = time.time() - params, error = get_params(default_threshold=SIMILARITY_THRESHOLD, default_limit=SIMILARITY_LIMIT) if error: return jsonify({ @@ -127,6 +125,8 @@ def similar(): threshold, limit, url, ext, raw, im = params + start = time.time() + phash = compute_phash_int(im) ext = ext[1:].lower() -- cgit v1.2.3-70-g09d2