Skip to content
Snippets Groups Projects
Commit 544151d3 authored by Guillaume HEUSCH's avatar Guillaume HEUSCH
Browse files

[utils] fixed the map_label function (hopefully)

parent 0f9a2e11
No related branches found
No related tags found
No related merge requests found
Pipeline #26413 failed
......@@ -84,8 +84,14 @@ class ToGray(object):
def map_labels(raw_labels, start_index=0):
"""
Map the ID label to [0 - # of IDs]
Parameters
----------
raw_labels: list of int
The labels of the samples
"""
possible_labels = list(set(raw_labels))
possible_labels = sorted(list(set(raw_labels)))
labels = numpy.array(raw_labels)
for i in range(len(possible_labels)):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment