未验证 提交 ccda54d7 编写于 作者: B Bin Lu 提交者: GitHub

modify Searcher to searcher

上级 6f08fb25
......@@ -39,7 +39,7 @@ class RecogOp(Op):
assert os.path.exists(os.path.join(
index_dir, "id_map.pkl")), "id_map.pkl not found ... "
self.Searcher = faiss.read_index(
self.searcher = faiss.read_index(
os.path.join(index_dir, "vector.index"))
with open(os.path.join(index_dir, "id_map.pkl"), "rb") as fd:
......@@ -62,7 +62,7 @@ class RecogOp(Op):
score_list = fetch_dict["features"]
return_top_k = 1
scores, docs = self.Searcher.search(score_list, return_top_k)
scores, docs = self.searcher.search(score_list, return_top_k)
result = {}
result["label"] = self.id_map[docs[0][0]].split()[1]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册