This repository was archived by the owner on Nov 13, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
modules/cluster_estimation Expand file tree Collapse file tree Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments