From c393064fa67166de914e3167ff2e239331efd918 Mon Sep 17 00:00:00 2001 From: zhouchengrong Date: Wed, 21 Aug 2024 10:35:27 +0800 Subject: [PATCH] =?UTF-8?q?feat=20fix=20=20=20=20=E8=B6=85=E5=88=86size?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E6=AF=94=E4=BE=8B=E5=87=8F=E5=B0=91=20?= =?UTF-8?q?=E6=98=BE=E5=AD=98=E4=B8=8D=E8=B6=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/service/design_pre_processing/service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/service/design_pre_processing/service.py b/app/service/design_pre_processing/service.py index 98590ab..42cfd6b 100644 --- a/app/service/design_pre_processing/service.py +++ b/app/service/design_pre_processing/service.py @@ -112,7 +112,7 @@ class DesignPreprocessing: # 判断 两边是否同时都小于512 因为此处做四倍超分 if item['obj'].shape[0] <= 512 and item['obj'].shape[1] <= 512: # 如果任意一边小于256则超分 - if item['obj'].shape[0] <= 256 or item['obj'].shape[1] <= 256: + if item['obj'].shape[0] <= 200 or item['obj'].shape[1] <= 200: # 超分 img = item['obj'].astype(np.float32) / 255. sample = np.transpose(img if img.shape[2] == 1 else img[:, :, [2, 1, 0]], (2, 0, 1))