From 9ba39a7bffa355707b8b510e826fba297e7554ea Mon Sep 17 00:00:00 2001 From: DXC Date: Sun, 10 May 2026 16:45:07 +0800 Subject: [PATCH] =?UTF-8?q?fix(step7):=20=E6=B6=88=E9=99=A4UnboundLocalErr?= =?UTF-8?q?or=20=E2=80=94=20=E5=B0=86Path/os=E5=AF=BC=E5=85=A5=E4=B8=8A?= =?UTF-8?q?=E7=A7=BB=E8=87=B3=E5=87=BD=E6=95=B0=E7=AC=AC=E4=B8=80=E8=A1=8C?= =?UTF-8?q?=EF=BC=8C=E9=81=BF=E5=85=8D=E4=B8=8E=E5=90=8E=E7=BB=AD=E5=B1=80?= =?UTF-8?q?=E9=83=A8=E8=B5=8B=E5=80=BC=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/steps/prediction_step.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/core/steps/prediction_step.py b/src/core/steps/prediction_step.py index 333acdd..693441f 100644 --- a/src/core/steps/prediction_step.py +++ b/src/core/steps/prediction_step.py @@ -28,6 +28,7 @@ class PredictionStep: callback: Optional[Callable] = None, ) -> str: """生成水域掩膜内且耀斑掩膜外的采样点,统计平均光谱""" + from pathlib import Path from src.utils.sampling import get_spectral_sampling_points_chunked output_dir = Path(output_dir) @@ -47,9 +48,6 @@ class PredictionStep: if deglint_img_path is None: raise ValueError("必须提供 deglint_img_path 参数") - from pathlib import Path - import os - # 1. 初始归一化与安全转换 original_path = Path(deglint_img_path) final_deglint_path = original_path