mirror of
https://github.com/PaddlePaddle/PaddleOCR.git
synced 2026-10-29 18:10:00 +08:00
fix
This commit is contained in:
@@ -438,7 +438,12 @@ class KieLabelEncode(object):
|
||||
texts.append(ann['transcription'])
|
||||
text_ind = [self.dict[c] for c in text if c in self.dict]
|
||||
text_inds.append(text_ind)
|
||||
labels.append(ann['label'])
|
||||
if 'label' in anno.keys():
|
||||
labels.append(ann['label'])
|
||||
elif 'key_cls' in anno.keys():
|
||||
labels.append(anno['key_cls'])
|
||||
else:
|
||||
raise ValueError("Cannot found 'key_cls' in ann.keys(), please check your training annotation.")
|
||||
edges.append(ann.get('edge', 0))
|
||||
ann_infos = dict(
|
||||
image=data['image'],
|
||||
|
||||
Reference in New Issue
Block a user