summaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2019-04-28 14:22:55 +0200
committerJules Laplace <julescarbon@gmail.com>2019-04-28 14:22:55 +0200
commita72ecc91db39ac5a2d60aefc6d767da457500dde (patch)
tree9f557542cb5077cd8c6b8bf1949d52ceb9867503 /check
parentf387845ae04226981aedb0fd0b8b55ee805883f3 (diff)
ignore upload time
Diffstat (limited to 'check')
-rw-r--r--check/app/server/api.py8
1 files 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()