feat 测试批量上传图片

fix
This commit is contained in:
zhouchengrong
2024-07-19 15:17:54 +08:00
parent ed908d0472
commit 33e7d884cf
7 changed files with 8 additions and 8 deletions

View File

@@ -28,7 +28,7 @@ class KeypointDetection(object):
# self.client.close()
# print(f"client close time : {time.time() - start_time}")
@ ClassCallRunTime
# @ClassCallRunTime
def __call__(self, result):
# logging.info("KeypointDetection run ")
if result['name'] in ['blouse', 'skirt', 'dress', 'outwear', 'trousers', 'tops', 'bottoms']: # 查询是否有数据 且类别相同 相同则直接读 不同则推理后更新

View File

@@ -13,7 +13,7 @@ class LoadImageFromFile(object):
self.print_dict = print_dict
# self.minio_client = Minio(f"{MINIO_URL}", access_key=MINIO_ACCESS, secret_key=MINIO_SECRET, secure=MINIO_SECURE)
@ClassCallRunTime
# @ClassCallRunTime
def __call__(self, result):
result['image'], result['pre_mask'] = self.read_image(self.path)
result['gray'] = cv2.cvtColor(result['image'], cv2.COLOR_BGR2GRAY)

View File

@@ -14,7 +14,7 @@ class Painting(object):
def __init__(self, painting_flag=True):
self.painting_flag = painting_flag
@ClassCallRunTime
# @ClassCallRunTime
def __call__(self, result):
if result['name'] not in ['hairstyle', 'earring'] and self.painting_flag and result['color'] != 'none':
dim_image_h, dim_image_w = result['image'].shape[0:2]
@@ -87,7 +87,7 @@ class PrintPainting(object):
def __init__(self, print_flag=True):
self.print_flag = print_flag
@ClassCallRunTime
# @ClassCallRunTime
def __call__(self, result):
single_print = result['print']['single']
overall_print = result['print']['overall']

View File

@@ -11,7 +11,7 @@ class Scaling(object):
def __init__(self):
pass
@ClassCallRunTime
# @ClassCallRunTime
def __call__(self, result):
if result['keypoint'] in ['waistband', 'shoulder', 'head_point']:
# milvus_db_keypoint_cache

View File

@@ -15,7 +15,7 @@ class Segmentation(object):
self.device = device
self.debug = debug
@ClassCallRunTime
# @ClassCallRunTime
def __call__(self, result):
_, seg_result = self.load_seg_result(result["image_id"])
if not _:

View File

@@ -18,7 +18,7 @@ class Split(object):
Split image into front and back layer according to the segmentation result
"""
@ClassCallRunTime
# @ClassCallRunTime
# KNet
def __call__(self, result):
try: