add mode
This commit is contained in:
parent
2f978f638b
commit
243bd9944d
|
@ -63,7 +63,7 @@ PostProcess:
|
|||
|
||||
Metric:
|
||||
name: E2EMetric
|
||||
mode: A # A or B
|
||||
mode: A # two ways for eval, A: label from txt, B: label from gt_mat
|
||||
gt_mat_dir: ./train_data/total_text/gt # the dir of gt_mat
|
||||
character_dict_path: ppocr/utils/ic15_dict.txt
|
||||
main_indicator: f_score_e2e
|
||||
|
|
|
@ -217,7 +217,7 @@ class E2ELabelEncode_test(BaseRecLabelEncode):
|
|||
boxes = np.array(boxes, dtype=np.float32)
|
||||
txt_tags = np.array(txt_tags, dtype=np.bool)
|
||||
data['polys'] = boxes
|
||||
data['ignore_tags'] = txt_tags
|
||||
data['tags'] = txt_tags
|
||||
temp_texts = []
|
||||
for text in txts:
|
||||
text = text.lower()
|
||||
|
@ -255,7 +255,7 @@ class E2ELabelEncode_train(object):
|
|||
|
||||
data['polys'] = boxes
|
||||
data['texts'] = txts
|
||||
data['ignore_tags'] = txt_tags
|
||||
data['tags'] = txt_tags
|
||||
return data
|
||||
|
||||
|
||||
|
|
|
@ -750,7 +750,7 @@ class PGProcessTrain(object):
|
|||
input_size = 512
|
||||
im = data['image']
|
||||
text_polys = data['polys']
|
||||
text_tags = data['ignore_tags']
|
||||
text_tags = data['tags']
|
||||
text_strs = data['texts']
|
||||
h, w, _ = im.shape
|
||||
text_polys, text_tags, hv_tags = self.check_and_validate_polys(
|
||||
|
|
Loading…
Reference in New Issue