移除keypoint 缓存
All checks were successful
git commit AiDA python develop 分支构建部署 / scheduled_deploy (push) Has been skipped
All checks were successful
git commit AiDA python develop 分支构建部署 / scheduled_deploy (push) Has been skipped
This commit is contained in:
@@ -7,7 +7,7 @@ import numpy as np
|
||||
import torch
|
||||
import tritonclient.grpc as grpcclient
|
||||
from minio import Minio
|
||||
from pymilvus import MilvusClient
|
||||
# from pymilvus import MilvusClient
|
||||
from urllib3.exceptions import ResponseError
|
||||
|
||||
from app.core.config import settings, SR_MODEL_NAME, SR_TRITON_URL, MILVUS_TABLE_KEYPOINT, KEYPOINT_RESULT_TABLE_FIELD_SET
|
||||
@@ -276,14 +276,15 @@ class DesignPreprocessing:
|
||||
|
||||
def keypoint_cache(self, sketch):
|
||||
try:
|
||||
client = MilvusClient(uri=settings.MILVUS_URL, token=settings.MILVUS_TOKEN, db_name=settings.MILVUS_ALIAS)
|
||||
# client = MilvusClient(uri=settings.MILVUS_URL, token=settings.MILVUS_TOKEN, db_name=settings.MILVUS_ALIAS)
|
||||
keypoint_id = sketch['image_id']
|
||||
res = client.query(
|
||||
collection_name=MILVUS_TABLE_KEYPOINT,
|
||||
# ids=[keypoint_id],
|
||||
filter=f"keypoint_id == {keypoint_id}",
|
||||
output_fields=['keypoint_vector', 'keypoint_site']
|
||||
)
|
||||
# res = client.query(
|
||||
# collection_name=MILVUS_TABLE_KEYPOINT,
|
||||
# # ids=[keypoint_id],
|
||||
# filter=f"keypoint_id == {keypoint_id}",
|
||||
# output_fields=['keypoint_vector', 'keypoint_site']
|
||||
# )
|
||||
res = []
|
||||
if len(res) == 0:
|
||||
# 没有结果 直接推理拿结果 并保存
|
||||
keypoint_infer_result = self.infer_keypoint_result(sketch)
|
||||
|
||||
Reference in New Issue
Block a user