feat design相关模型迁移4090测试

fix
This commit is contained in:
zhouchengrong
2024-11-08 14:05:09 +08:00
parent 0a17128140
commit d92c59383b
4 changed files with 5 additions and 9 deletions

View File

@@ -93,9 +93,6 @@ OPENAI_MODEL_LIST = {"gpt-3.5-turbo-0613",
"gpt-4-0613", "gpt-4-0613",
"gpt-4-32k-0613", } "gpt-4-32k-0613", }
# attribute service config
ATT_TRITON_URL = "10.1.1.240:10000"
# SR service config # SR service config
SR_MODEL_NAME = "super_resolution" SR_MODEL_NAME = "super_resolution"
SR_TRITON_URL = "10.1.1.240:10031" SR_TRITON_URL = "10.1.1.240:10031"
@@ -132,7 +129,6 @@ GRI_MODEL_NAME_SINGLE = 'stable_diffusion_1_5_relight'
GRI_MODEL_URL = '10.1.1.240:10051' GRI_MODEL_URL = '10.1.1.240:10051'
# SEG service config # SEG service config
SEG_MODEL_URL = '10.1.1.240:10000'
SEGMENTATION = { SEGMENTATION = {
"new_model_name": "seg_knet", "new_model_name": "seg_knet",
"name": "seg_ocrnet_hr18", "name": "seg_ocrnet_hr18",
@@ -141,7 +137,7 @@ SEGMENTATION = {
} }
# DESIGN config # DESIGN config
DESIGN_MODEL_URL = '10.1.1.240:10000' DESIGN_MODEL_URL = '10.1.1.243:10000'
AIDA_CLOTHING = "aida-clothing" AIDA_CLOTHING = "aida-clothing"
KEYPOINT_RESULT_TABLE_FIELD_SET = ('neckline_left', 'neckline_right', 'shoulder_left', 'shoulder_right', 'armpit_left', 'armpit_right', KEYPOINT_RESULT_TABLE_FIELD_SET = ('neckline_left', 'neckline_right', 'shoulder_left', 'shoulder_right', 'armpit_left', 'armpit_right',
'cuff_left_in', 'cuff_left_out', 'cuff_right_in', 'cuff_right_out', 'waistband_left', 'waistband_right') 'cuff_left_in', 'cuff_left_out', 'cuff_right_in', 'cuff_right_out', 'waistband_left', 'waistband_right')

View File

@@ -28,7 +28,7 @@ class AttributeRecognition:
} }
) )
self.const = const self.const = const
self.triton_client = httpclient.InferenceServerClient(url=f"{ATT_TRITON_URL}") self.triton_client = httpclient.InferenceServerClient(url=f"{DESIGN_MODEL_URL}")
def get_result(self): def get_result(self):
for sketch in self.request_data: for sketch in self.request_data:

View File

@@ -26,7 +26,7 @@ class CategoryRecognition:
self.attr_type = pd.read_csv(CATEGORY_PATH) self.attr_type = pd.read_csv(CATEGORY_PATH)
# self.minio_client = Minio(MINIO_URL, access_key=MINIO_ACCESS, secret_key=MINIO_SECRET, secure=MINIO_SECURE) # self.minio_client = Minio(MINIO_URL, access_key=MINIO_ACCESS, secret_key=MINIO_SECRET, secure=MINIO_SECURE)
self.request_data = [] self.request_data = []
self.triton_client = httpclient.InferenceServerClient(url=ATT_TRITON_URL) self.triton_client = httpclient.InferenceServerClient(url=DESIGN_MODEL_URL)
for sketch in request_data: for sketch in request_data:
self.request_data.append( self.request_data.append(
{ {

View File

@@ -81,7 +81,7 @@ def get_contours(image):
def seg_infer_image(image_obj): def seg_infer_image(image_obj):
image, ori_shape = seg_preprocess(image_obj) image, ori_shape = seg_preprocess(image_obj)
client = httpclient.InferenceServerClient(url=f"{SEG_MODEL_URL}") client = httpclient.InferenceServerClient(url=f"{DESIGN_MODEL_URL}")
transformed_img = image.astype(np.float32) transformed_img = image.astype(np.float32)
# 输入集 # 输入集
inputs = [ inputs = [
@@ -250,7 +250,7 @@ def generate_category_recognition(image, gender):
return preprocessed_img return preprocessed_img
preprocessed_img = preprocess(image) preprocessed_img = preprocess(image)
triton_client = httpclient.InferenceServerClient(url=ATT_TRITON_URL) triton_client = httpclient.InferenceServerClient(url=DESIGN_MODEL_URL)
inputs = [ inputs = [
httpclient.InferInput("input__0", preprocessed_img.shape, datatype="FP32") httpclient.InferInput("input__0", preprocessed_img.shape, datatype="FP32")