Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 3134b2a

Browse files
committedJan 7, 2025·
implemented fixes
1 parent f68c8ea commit 3134b2a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed
 

‎modules/cluster_estimation/cluster_estimation.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def run(
173173
return False, None
174174

175175
# sort bucket by label in descending order
176-
self.__current_bucket = self.__sort_by_labels(self.__current_bucket)
176+
self.__all_points = self.__sort_by_labels(self.__current_bucket)
177177
detections_in_world = []
178178

179179
# init search parameters
@@ -184,22 +184,22 @@ def run(
184184
# reference label
185185
label = self.__current_bucket[ptr][2]
186186

187-
# creates bucket of points with the same label
187+
# creates bucket of points with the same label since bucket is sorted by label
188188
bucket_labelled = []
189-
while ptr < len(self.__current_bucket) and self.__current_bucket[ptr][2] == label:
190-
bucket_labelled += [self.__current_bucket[ptr]]
189+
while ptr < len(self.__current_bucket) and self.__all_points[ptr][2] == label:
190+
bucket_labelled.append([self.__all_points[ptr]])
191191
ptr += 1
192192

193193
# skip if no objects have label=label
194194
if len(bucket_labelled) == 0:
195195
continue
196196

197-
check, labelled_detections_in_world = self.cluster_by_label(
197+
result, labelled_detections_in_world = self.cluster_by_label(
198198
bucket_labelled, run_override, label
199199
)
200200

201201
# checks if cluster_by_label ran succssfully
202-
if not check:
202+
if not result:
203203
self.__logger.warning(
204204
f"did not add objects of label={label} to total object detections"
205205
)

0 commit comments

Comments
 (0)
Please sign in to comment.