diff --git a/scene_text_recognition/infer.py b/scene_text_recognition/infer.py index c572f5001adbaa15c5febdf2ae528fd647b66378..64bc4ddeb38be3bb2e24da69311b49d72987f6d7 100644 --- a/scene_text_recognition/infer.py +++ b/scene_text_recognition/infer.py @@ -2,7 +2,7 @@ import click import gzip import paddle.v2 as paddle -from model import Model +from network_conf import Model from reader import DataGenerator from decoder import ctc_greedy_decoder from utils import get_file_list, load_dict, load_reverse_dict diff --git a/scene_text_recognition/model.py b/scene_text_recognition/network_conf.py similarity index 94% rename from scene_text_recognition/model.py rename to scene_text_recognition/network_conf.py index 4fb297a503af74aeadb14f1654e0f6a0e094bbff..bd92bae8737b428d7494229c7137ae2b164022ab 100644 --- a/scene_text_recognition/model.py +++ b/scene_text_recognition/network_conf.py @@ -13,7 +13,8 @@ class Model(object): :type num_classes: int :param shape: The size of the input images. :type shape: tuple of 2 int - :param is_infer: For inference or not + :param is_infer: The boolean parameter indicating + inferring or training. :type shape: bool ''' self.num_classes = num_classes @@ -90,11 +91,13 @@ class Model(object): def conv_groups(self, input, num, with_bn): ''' + Get the image features with image convolution group. + :param input: Input layer. :type input: LayerOutput :param num: Number of the filters. :type num: int - :param with_bn: Whether with batch normalization. + :param with_bn: Use batch normalization or not. :type with_bn: bool ''' assert num % 4 == 0 diff --git a/scene_text_recognition/train.py b/scene_text_recognition/train.py index 4497bee813615be9bfe3ad94a9c9eea918dcc2a4..79eccc0b29582ad09c5efc4d950197f9ea44baef 100644 --- a/scene_text_recognition/train.py +++ b/scene_text_recognition/train.py @@ -4,7 +4,7 @@ import click import paddle.v2 as paddle from config import TrainerConfig as conf -from model import Model +from network_conf import Model from reader import DataGenerator from utils import get_file_list, build_label_dict, load_dict