|
@@ -55,12 +55,12 @@ def do_load(table_name, image_dir, model, milvus_client):
|
|
|
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:
|
|
|
if not table_name:
|
|
|
table_name = DEFAULT_TABLE
|
|
|
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]]
|
|
|
# distances = [x.distance for x in vectors[0]]
|
|
|
# return vectors, distances
|