提交 9a8f5d08 编写于 作者: J Jethong

fix name

上级 2365c70e
...@@ -72,13 +72,13 @@ Train: ...@@ -72,13 +72,13 @@ Train:
dataset: dataset:
name: PGDataSet name: PGDataSet
data_dir: ./train_data/total_text/train data_dir: ./train_data/total_text/train
label_file_list: [./train_data/total_text/train/] label_file_list: [./train_data/total_text/train/total_text.txt]
ratio_list: [1.0] ratio_list: [1.0]
transforms: transforms:
- DecodeImage: # load image - DecodeImage: # load image
img_mode: BGR img_mode: BGR
channel_first: False channel_first: False
- E2ELabelEncode_train: - E2ELabelEncodeTrain:
- PGProcessTrain: - PGProcessTrain:
batch_size: 14 # same as loader: batch_size_per_card batch_size: 14 # same as loader: batch_size_per_card
min_crop_size: 24 min_crop_size: 24
...@@ -96,12 +96,12 @@ Eval: ...@@ -96,12 +96,12 @@ Eval:
dataset: dataset:
name: PGDataSet name: PGDataSet
data_dir: ./train_data/total_text/test data_dir: ./train_data/total_text/test
label_file_list: [./train_data/total_text/test/] label_file_list: [./train_data/total_text/test/total_text.txt]
transforms: transforms:
- DecodeImage: # load image - DecodeImage: # load image
img_mode: RGB img_mode: RGB
channel_first: False channel_first: False
- E2ELabelEncode_test: - E2ELabelEncodeTest:
- E2EResizeForTest: - E2EResizeForTest:
max_side_len: 768 max_side_len: 768
- NormalizeImage: - NormalizeImage:
...@@ -111,7 +111,7 @@ Eval: ...@@ -111,7 +111,7 @@ Eval:
order: 'hwc' order: 'hwc'
- ToCHWImage: - ToCHWImage:
- KeepKeys: - KeepKeys:
keep_keys: [ 'image', 'shape', 'polys', 'texts', 'tags', 'img_id'] keep_keys: [ 'image', 'shape', 'polys', 'texts', 'ignore_tags', 'img_id']
loader: loader:
shuffle: False shuffle: False
drop_last: False drop_last: False
......
...@@ -187,14 +187,14 @@ class CTCLabelEncode(BaseRecLabelEncode): ...@@ -187,14 +187,14 @@ class CTCLabelEncode(BaseRecLabelEncode):
return dict_character return dict_character
class E2ELabelEncode_test(BaseRecLabelEncode): class E2ELabelEncodeTest(BaseRecLabelEncode):
def __init__(self, def __init__(self,
max_text_length, max_text_length,
character_dict_path=None, character_dict_path=None,
character_type='EN', character_type='EN',
use_space_char=False, use_space_char=False,
**kwargs): **kwargs):
super(E2ELabelEncode_test, super(E2ELabelEncodeTest,
self).__init__(max_text_length, character_dict_path, self).__init__(max_text_length, character_dict_path,
character_type, use_space_char) character_type, use_space_char)
...@@ -217,7 +217,7 @@ class E2ELabelEncode_test(BaseRecLabelEncode): ...@@ -217,7 +217,7 @@ class E2ELabelEncode_test(BaseRecLabelEncode):
boxes = np.array(boxes, dtype=np.float32) boxes = np.array(boxes, dtype=np.float32)
txt_tags = np.array(txt_tags, dtype=np.bool) txt_tags = np.array(txt_tags, dtype=np.bool)
data['polys'] = boxes data['polys'] = boxes
data['tags'] = txt_tags data['ignore_tags'] = txt_tags
temp_texts = [] temp_texts = []
for text in txts: for text in txts:
text = text.lower() text = text.lower()
...@@ -231,7 +231,7 @@ class E2ELabelEncode_test(BaseRecLabelEncode): ...@@ -231,7 +231,7 @@ class E2ELabelEncode_test(BaseRecLabelEncode):
return data return data
class E2ELabelEncode_train(object): class E2ELabelEncodeTrain(object):
def __init__(self, **kwargs): def __init__(self, **kwargs):
pass pass
...@@ -255,7 +255,7 @@ class E2ELabelEncode_train(object): ...@@ -255,7 +255,7 @@ class E2ELabelEncode_train(object):
data['polys'] = boxes data['polys'] = boxes
data['texts'] = txts data['texts'] = txts
data['tags'] = txt_tags data['ignore_tags'] = txt_tags
return data return data
......
...@@ -750,7 +750,7 @@ class PGProcessTrain(object): ...@@ -750,7 +750,7 @@ class PGProcessTrain(object):
input_size = 512 input_size = 512
im = data['image'] im = data['image']
text_polys = data['polys'] text_polys = data['polys']
text_tags = data['tags'] text_tags = data['ignore_tags']
text_strs = data['texts'] text_strs = data['texts']
h, w, _ = im.shape h, w, _ = im.shape
text_polys, text_tags, hv_tags = self.check_and_validate_polys( text_polys, text_tags, hv_tags = self.check_and_validate_polys(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册