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: