|
|
|
@ -160,8 +160,6 @@ class CTCLabelEncode(BaseRecLabelEncode):
|
|
|
|
|
text = self.encode(text)
|
|
|
|
|
if text is None:
|
|
|
|
|
return None
|
|
|
|
|
if len(text) > self.max_text_len:
|
|
|
|
|
return None
|
|
|
|
|
data['length'] = np.array(len(text))
|
|
|
|
|
text = text + [0] * (self.max_text_len - len(text))
|
|
|
|
|
data['label'] = np.array(text)
|
|
|
|
|