Commit f5cbf60b authored by 赵威's avatar 赵威

remove duplicates

parent b5de32b6
......@@ -104,7 +104,7 @@ def get_similar_diary_ids_by_url(url, index, face_to_vec_f, limit=0.1):
_scores, _ids = index.search(np.array([face_feature]), 10)
ids = _ids.flat
scores = _scores.flat
tmp = list(zip(ids, scores))
tmp = list(set(zip(ids, scores)))
res = []
for (id, score) in tmp:
if score >= limit:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment