diff --git a/configs/rec/rec_r45_abinet.yml b/configs/rec/rec_r45_abinet.yml index 3cf4cddb0464ca0bede823fc7af7c1da71f9bed6..1e03db8b1b113c72ebd41a99e0c8bafb13110b85 100644 --- a/configs/rec/rec_r45_abinet.yml +++ b/configs/rec/rec_r45_abinet.yml @@ -72,7 +72,6 @@ Train: ignore_index: *ignore_index - ABINetRecResizeImg: image_shape: [3, 32, 128] - padding: False - KeepKeys: keep_keys: ['image', 'label', 'length'] # dataloader will return list in this order loader: @@ -93,7 +92,6 @@ Eval: ignore_index: *ignore_index - ABINetRecResizeImg: image_shape: [3, 32, 128] - padding: False - KeepKeys: keep_keys: ['image', 'label', 'length'] # dataloader will return list in this order loader: diff --git a/configs/rec/rec_svtrnet.yml b/configs/rec/rec_svtrnet.yml index 5896b10515bc19a958220c83879004344882c06e..c1f5cc380ab9652e3ac750f8b8edacde9837daf0 100644 --- a/configs/rec/rec_svtrnet.yml +++ b/configs/rec/rec_svtrnet.yml @@ -84,7 +84,6 @@ Train: channel_first: False - CTCLabelEncode: # Class handling label - SVTRRecResizeImg: - character_dict_path: image_shape: [3, 64, 256] padding: False - KeepKeys: @@ -105,7 +104,6 @@ Eval: channel_first: False - CTCLabelEncode: # Class handling label - SVTRRecResizeImg: - character_dict_path: image_shape: [3, 64, 256] padding: False - KeepKeys: diff --git a/configs/rec/rec_svtrnet_ch.yml b/configs/rec/rec_svtrnet_ch.yml index c4ce4ccc160ba15c3d4d21cfaca9feb96255daa0..0d3f63d125ea12fa097fe49454b04423710e2f68 100644 --- a/configs/rec/rec_svtrnet_ch.yml +++ b/configs/rec/rec_svtrnet_ch.yml @@ -110,8 +110,6 @@ Train: - RecAug: null - CTCLabelEncode: null - SVTRRecResizeImg: - character_dict_path: null - infer_mode: False image_shape: - 3 - 32 @@ -139,8 +137,6 @@ Eval: channel_first: false - CTCLabelEncode: null - SVTRRecResizeImg: - character_dict_path: null - infer_mode: False image_shape: - 3 - 32 diff --git a/ppocr/data/imaug/rec_img_aug.py b/ppocr/data/imaug/rec_img_aug.py index 1de8e6ee3c5c847cf4ae4ae4dd046dfa525e7821..26773d0a516dfb0877453c7a5c8c8a2b5da92045 100644 --- a/ppocr/data/imaug/rec_img_aug.py +++ b/ppocr/data/imaug/rec_img_aug.py @@ -312,14 +312,8 @@ class GrayRecResizeImg(object): class ABINetRecResizeImg(object): - def __init__(self, - image_shape, - infer_mode=False, - character_dict_path=None, - **kwargs): + def __init__(self, image_shape, **kwargs): self.image_shape = image_shape - self.infer_mode = infer_mode - self.character_dict_path = character_dict_path def __call__(self, data): img = data['image'] @@ -330,15 +324,8 @@ class ABINetRecResizeImg(object): class SVTRRecResizeImg(object): - def __init__(self, - image_shape, - infer_mode=False, - character_dict_path='./ppocr/utils/ppocr_keys_v1.txt', - padding=True, - **kwargs): + def __init__(self, image_shape, padding=True, **kwargs): self.image_shape = image_shape - self.infer_mode = infer_mode - self.character_dict_path = character_dict_path self.padding = padding def __call__(self, data): diff --git a/test_tipc/configs/rec_svtrnet/rec_svtrnet.yml b/test_tipc/configs/rec_svtrnet/rec_svtrnet.yml index bffd8ac09a36ea7cb0bf3e7552ee2f5d34e86416..140b17e0e79f9895167e9c51d86ced173e44a541 100644 --- a/test_tipc/configs/rec_svtrnet/rec_svtrnet.yml +++ b/test_tipc/configs/rec_svtrnet/rec_svtrnet.yml @@ -84,8 +84,7 @@ Train: img_mode: BGR channel_first: False - CTCLabelEncode: # Class handling label - - RecResizeImg: - character_dict_path: + - SVTRRecResizeImg: image_shape: [3, 64, 256] padding: False - KeepKeys: @@ -106,8 +105,7 @@ Eval: img_mode: BGR channel_first: False - CTCLabelEncode: # Class handling label - - RecResizeImg: - character_dict_path: + - SVTRRecResizeImg: image_shape: [3, 64, 256] padding: False - KeepKeys: