From 45d2fd3c908cccba8d32c8e8f4439c68e92135a6 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 4 Jan 2025 15:25:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E4=BF=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- filter/time_group_overlap_filter.py | 16 ---------------- odm_preprocess.py | 4 ++-- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/filter/time_group_overlap_filter.py b/filter/time_group_overlap_filter.py index 9f7a4f9..6f0048c 100644 --- a/filter/time_group_overlap_filter.py +++ b/filter/time_group_overlap_filter.py @@ -9,7 +9,6 @@ from datetime import timedelta import matplotlib.pyplot as plt import os import sys -sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) class TimeGroupOverlapFilter: @@ -191,18 +190,3 @@ class TimeGroupOverlapFilter: plt.savefig(os.path.join(self.output_dir, 'filter_imgs', 'time_groups_overlap_bbox.png'), dpi=300, bbox_inches='tight') plt.close() - - -if __name__ == '__main__': - # 设置路径 - DATASET = r'F:\error_data\20241108134711\3D' - output_dir = r'E:\studio2\ODM_pro\test' - os.makedirs(output_dir, exist_ok=True) - - # 设置日志 - setup_logger(os.path.dirname(output_dir)) - - # 创建过滤器并执行过滤 - filter = TimeGroupOverlapFilter(DATASET, output_dir, overlap_threshold=0.7) - deleted_files = filter.filter_overlapping_groups( - time_threshold=timedelta(minutes=5)) diff --git a/odm_preprocess.py b/odm_preprocess.py index 103df42..d249011 100644 --- a/odm_preprocess.py +++ b/odm_preprocess.py @@ -272,8 +272,8 @@ class ImagePreprocessor: if __name__ == "__main__": # 创建配置 config = PreprocessConfig( - image_dir=r"/home/cug/datasets/134/code/images", - output_dir=r"/home/cug/ODM_output/134", + image_dir=r"/home/cug/datasets/1009/project/images", + output_dir=r"/home/cug/ODM_output/1009", cluster_eps=0.01, cluster_min_samples=5,