File tree 1 file changed +6
-6
lines changed
modules/cluster_estimation
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -173,7 +173,7 @@ def run(
173
173
return False , None
174
174
175
175
# 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 )
177
177
detections_in_world = []
178
178
179
179
# init search parameters
@@ -184,22 +184,22 @@ def run(
184
184
# reference label
185
185
label = self .__current_bucket [ptr ][2 ]
186
186
187
- # creates bucket of points with the same label
187
+ # creates bucket of points with the same label since bucket is sorted by label
188
188
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 ]])
191
191
ptr += 1
192
192
193
193
# skip if no objects have label=label
194
194
if len (bucket_labelled ) == 0 :
195
195
continue
196
196
197
- check , labelled_detections_in_world = self .cluster_by_label (
197
+ result , labelled_detections_in_world = self .cluster_by_label (
198
198
bucket_labelled , run_override , label
199
199
)
200
200
201
201
# checks if cluster_by_label ran succssfully
202
- if not check :
202
+ if not result :
203
203
self .__logger .warning (
204
204
f"did not add objects of label={ label } to total object detections"
205
205
)
You can’t perform that action at this time.
0 commit comments