animeic 2 年之前
父節點
當前提交
1ac9bd8f98
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/operators.py

+ 2 - 2
src/operators.py

@@ -55,12 +55,12 @@ def do_load(table_name, image_dir, model, milvus_client):
     return len(ids)
     return len(ids)
 
 
 
 
-def do_search(table_name,partition_name,img_path, top_k, model, milvus_client):
+def do_search(table_name,partition_names,img_path, top_k, model, milvus_client):
     try:
     try:
         if not table_name:
         if not table_name:
             table_name = DEFAULT_TABLE
             table_name = DEFAULT_TABLE
         im_vector = model.resnet50_extract_feat(img_path)
         im_vector = model.resnet50_extract_feat(img_path)
-        res = milvus_client.search_vectors(table_name,partition_name,[im_vector], top_k)
+        res = milvus_client.search_vectors(table_name,partition_names,[im_vector], top_k)
         # hash = [str(x.id) for x in vectors[0]]
         # hash = [str(x.id) for x in vectors[0]]
         # distances = [x.distance for x in vectors[0]]
         # distances = [x.distance for x in vectors[0]]
         # return vectors, distances
         # return vectors, distances