supervisely-tutorials
supervisely-tutorials copied to clipboard
If plate length not static
How can i change Y_data[i] = text_to_labels(text) to Y_data[i, 0:len(text)] = text_to_labels(text) if length of license plate not static?
I used
labels = text_to_labels(text)
Y_data[i, 0:len(labels)] = labels
I added a space in the list letters which gets add to the labels if plate length is less than maximum text length.
lab_data = []
lab_data = text_to_labels(text)
if len(lab_data) < 11:
for k in range((11-len(lab_data))):
lab_data.append('36')
Y_data[i] = lab_data
Where 36 is the index of the list letters where space is appended.