From aef169e916f6f0b2e62f05223738ceca63685621 Mon Sep 17 00:00:00 2001 From: weixin_46229132 Date: Fri, 18 Apr 2025 14:48:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9odm=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/odm_monitor.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/utils/odm_monitor.py b/utils/odm_monitor.py index 82ee4cd..1032fd7 100644 --- a/utils/odm_monitor.py +++ b/utils/odm_monitor.py @@ -23,6 +23,7 @@ class ODMProcessMonitor: error_msg = "" max_retries = 3 current_try = 0 + cpu_cores = os.cpu_count() # 初始化 Docker 客户端 client = docker.from_env() @@ -40,7 +41,7 @@ class ODMProcessMonitor: } command = ( f"--project-path /datasets project " - f"--max-concurrency 15 " + f"--max-concurrency {cpu_cores} " f"--force-gps " f"--use-exif " f"--use-hybrid-bundle-adjustment " @@ -60,6 +61,10 @@ class ODMProcessMonitor: f"--dsm " f"--dtm " ) + if current_try == 1: + command += ( + f"--feature-quality low " + ) command += "--rerun-all" @@ -99,7 +104,6 @@ class ODMProcessMonitor: container.remove() break - return success, error_msg def process_all_grids(self, grid_points: Dict[tuple, pd.DataFrame]) -> list: