小修
This commit is contained in:
parent
0e29728126
commit
45d2fd3c90
@ -9,7 +9,6 @@ from datetime import timedelta
|
|||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
|
||||||
|
|
||||||
|
|
||||||
class TimeGroupOverlapFilter:
|
class TimeGroupOverlapFilter:
|
||||||
@ -191,18 +190,3 @@ class TimeGroupOverlapFilter:
|
|||||||
plt.savefig(os.path.join(self.output_dir, 'filter_imgs', 'time_groups_overlap_bbox.png'),
|
plt.savefig(os.path.join(self.output_dir, 'filter_imgs', 'time_groups_overlap_bbox.png'),
|
||||||
dpi=300, bbox_inches='tight')
|
dpi=300, bbox_inches='tight')
|
||||||
plt.close()
|
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))
|
|
||||||
|
@ -272,8 +272,8 @@ class ImagePreprocessor:
|
|||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
# 创建配置
|
# 创建配置
|
||||||
config = PreprocessConfig(
|
config = PreprocessConfig(
|
||||||
image_dir=r"/home/cug/datasets/134/code/images",
|
image_dir=r"/home/cug/datasets/1009/project/images",
|
||||||
output_dir=r"/home/cug/ODM_output/134",
|
output_dir=r"/home/cug/ODM_output/1009",
|
||||||
|
|
||||||
cluster_eps=0.01,
|
cluster_eps=0.01,
|
||||||
cluster_min_samples=5,
|
cluster_min_samples=5,
|
||||||
|
Loading…
Reference in New Issue
Block a user