fix  minio and s3
This commit is contained in:
zhouchengrong
2024-06-21 17:13:39 +08:00
parent d0597f4b4c
commit 2df1518a99
11 changed files with 200 additions and 146 deletions

View File

@@ -1,5 +1,6 @@
import logging
import time
import numpy as np
from pymilvus import MilvusClient
@@ -71,11 +72,8 @@ class KeypointDetection(object):
]
try:
client = MilvusClient(uri=MILVUS_URL, token=MILVUS_TOKEN, db_name=MILVUS_ALIAS)
start_time = time.time()
res = client.upsert(
collection_name=MILVUS_TABLE_KEYPOINT,
data=data,
)
# start_time = time.time()
res = client.upsert(collection_name=MILVUS_TABLE_KEYPOINT, data=data)
# logging.info(f"save keypoint time : {time.time() - start_time}")
client.close()
return dict(zip(KEYPOINT_RESULT_TABLE_FIELD_SET, result.reshape(12, 2).astype(int).tolist()))