修改时间组过滤函数的bug
This commit is contained in:
parent
45d2fd3c90
commit
7f64316056
@ -86,8 +86,13 @@ class TimeGroupOverlapFilter:
|
||||
if box1.intersects(box2):
|
||||
intersection_area = box1.intersection(box2).area
|
||||
smaller_area = min(box1.area, box2.area)
|
||||
return intersection_area / smaller_area
|
||||
return 0
|
||||
if smaller_area == 0:
|
||||
overlap_ratio = 1
|
||||
else:
|
||||
overlap_ratio = intersection_area / smaller_area
|
||||
else:
|
||||
overlap_ratio = 0
|
||||
return overlap_ratio
|
||||
|
||||
def filter_overlapping_groups(self, gps_points, time_threshold=timedelta(minutes=5)):
|
||||
"""过滤重叠的时间组"""
|
||||
|
@ -272,8 +272,8 @@ class ImagePreprocessor:
|
||||
if __name__ == "__main__":
|
||||
# 创建配置
|
||||
config = PreprocessConfig(
|
||||
image_dir=r"/home/cug/datasets/1009/project/images",
|
||||
output_dir=r"/home/cug/ODM_output/1009",
|
||||
image_dir=r"/home/cug/datasets/error3/project/images",
|
||||
output_dir=r"/home/cug/ODM_output/error3",
|
||||
|
||||
cluster_eps=0.01,
|
||||
cluster_min_samples=5,
|
||||
|
Loading…
Reference in New Issue
Block a user