File tree 1 file changed +6
-4
lines changed
geti_sdk/deployment/predictions_postprocessing/results_converter
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -175,12 +175,14 @@ def __init__(
175
175
self .confidence_threshold = configuration ["confidence_threshold" ]
176
176
if "label_ids" in configuration :
177
177
# Make sure the list of labels is sorted according to the order
178
- # defined in the ModelAPI configuration. If the 'label_ids' field
179
- # only contains a single label, it will be typed as string. No need
180
- # to sort in that case
178
+ # defined in the ModelAPI configuration.
179
+ # - If the 'label_ids' field only contains a single label,
180
+ # it will be typed as string. No need to sort in that case.
181
+ # - Filter out the empty label ID, as it is managed separately by the base converter class.
181
182
ids = configuration ["label_ids" ]
182
183
if not isinstance (ids , str ):
183
- self .labels .sort_by_ids (configuration ["label_ids" ])
184
+ ids = [id_ for id_ in ids if id_ != self .empty_label .id ]
185
+ self .labels .sort_by_ids (ids )
184
186
185
187
def _detection2array (self , detections : List [Detection ]) -> np .ndarray :
186
188
"""
You can’t perform that action at this time.
0 commit comments