From 499d60fca68c3f0b09950429962a0676ec5ce40f Mon Sep 17 00:00:00 2001 From: zhouchengrong Date: Tue, 30 Apr 2024 11:58:01 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E7=B1=BB=E5=88=AB=E6=98=A0=E5=B0=84?= =?UTF-8?q?=E8=A1=A8=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/api_attribute.py | 2 ++ app/service/attribute_recognition/service.py | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/api/api_attribute.py b/app/api/api_attribute.py index 213a1a9..4054e1b 100644 --- a/app/api/api_attribute.py +++ b/app/api/api_attribute.py @@ -13,6 +13,8 @@ router = APIRouter() @router.post("") def attribute(request_data: AttributeModel): + logger.info(f"attribute requests is @@@@@@@@@@@:{request_data}") service = AttributeRecognition() response = service.attribute(const, request_data) + logger.info(f"attribute response is @@@@@@@@@@@:{response}") return {"code": 200, "message": "ok", "data": response} diff --git a/app/service/attribute_recognition/service.py b/app/service/attribute_recognition/service.py index 0d91250..60071ec 100644 --- a/app/service/attribute_recognition/service.py +++ b/app/service/attribute_recognition/service.py @@ -160,7 +160,6 @@ class AttributeRecognition: present_dict = self.get_attribute(attr_model_path, attr_description, sample) attr_dict = Merge(attr_dict, present_dict) - print('attr_dict: ', attr_dict) final_dict[request_data.upload_img_id[l]] = attr_dict return final_dict @@ -176,7 +175,6 @@ class AttributeRecognition: colattr = list(attr_type['labelName']) task = attr_type['taskName'][0] if task == 'category': - print(scores, type(scores)) maxsc = np.max(scores) if maxsc > 0: indexs = np.argwhere(scores == maxsc)[:, 1] @@ -193,7 +191,6 @@ class AttributeRecognition: else: maxsc = np.max(scores) - print(maxsc) if maxsc > 0: indexs = np.argwhere(scores == maxsc)[:, 1] else: