supervisely-tutorials icon indicating copy to clipboard operation
supervisely-tutorials copied to clipboard

If plate length not static

Open linhqhta opened this issue 6 years ago • 2 comments

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?

linhqhta avatar Apr 19 '18 07:04 linhqhta

I used

labels = text_to_labels(text)
Y_data[i, 0:len(labels)] = labels

safijari avatar Oct 15 '18 17:10 safijari

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.

Sreerag-ibtl avatar Jan 17 '19 10:01 Sreerag-ibtl