diff --git a/configs/rec/rec_d28_can.yml b/configs/rec/rec_d28_can.yml index 2149100da556057e2dda967109d6e59d44dc1c42..7c3b0fd3d60368d196837826c252301fb5f3b59e 100644 --- a/configs/rec/rec_d28_can.yml +++ b/configs/rec/rec_d28_can.yml @@ -66,7 +66,6 @@ Loss: PostProcess: name: CANLabelDecode - character_dict_path: ppocr/utils/dict/latex_symbol_dict.txt Metric: name: CANMetric @@ -76,6 +75,7 @@ Train: dataset: name: SimpleDataSet data_dir: ./train_data/CROHME/training/images/ + label_file_list: ["./train_data/CROHME/training/labels.txt"] transforms: - DecodeImage: channel_first: False @@ -86,11 +86,9 @@ Train: - GrayImageChannelFormat: inverse: True - CANLabelEncode: - character_dict_path: ppocr/utils/dict/latex_symbol_dict.txt lower: False - KeepKeys: keep_keys: ['image', 'label'] - label_file_list: ["./train_data/CROHME/training/labels.txt"] loader: shuffle: True batch_size_per_card: 8 @@ -102,6 +100,7 @@ Eval: dataset: name: SimpleDataSet data_dir: ./train_data/CROHME/evaluation/images/ + label_file_list: ["./train_data/CROHME/evaluation/labels.txt"] transforms: - DecodeImage: channel_first: False @@ -112,11 +111,9 @@ Eval: - GrayImageChannelFormat: inverse: True - CANLabelEncode: - character_dict_path: ppocr/utils/dict/latex_symbol_dict.txt lower: False - KeepKeys: keep_keys: ['image', 'label'] - label_file_list: ["./train_data/CROHME/evaluation/labels.txt"] loader: shuffle: False drop_last: False diff --git a/ppocr/modeling/backbones/rec_densenet.py b/ppocr/modeling/backbones/rec_densenet.py index b9fab765b267278d8125b489344b617f0d142d70..65c5fa4f245f9825ce8c728db487e8888b5bc3c6 100644 --- a/ppocr/modeling/backbones/rec_densenet.py +++ b/ppocr/modeling/backbones/rec_densenet.py @@ -11,6 +11,11 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +""" +This code is refer from: +https://github.com/LBH1024/CAN/models/densenet.py + +""" from __future__ import absolute_import from __future__ import division diff --git a/test_tipc/configs/rec_d28_can/rec_d28_can.yml b/test_tipc/configs/rec_d28_can/rec_d28_can.yml index 92917c20d6c8186204b3b142dbbaeb3aafbb5edb..5501865863fa498cfcf9ed401bfef46654ef23b0 100644 --- a/test_tipc/configs/rec_d28_can/rec_d28_can.yml +++ b/test_tipc/configs/rec_d28_can/rec_d28_can.yml @@ -66,7 +66,6 @@ Loss: PostProcess: name: CANLabelDecode - character_dict_path: ppocr/utils/dict/latex_symbol_dict.txt Metric: name: CANMetric @@ -76,6 +75,7 @@ Train: dataset: name: SimpleDataSet data_dir: ./train_data/CROHME_lite/training/images/ + label_file_list: ["./train_data/CROHME_lite/training/labels.txt"] transforms: - DecodeImage: channel_first: False @@ -86,11 +86,9 @@ Train: - GrayImageChannelFormat: inverse: True - CANLabelEncode: - character_dict_path: ppocr/utils/dict/latex_symbol_dict.txt lower: False - KeepKeys: keep_keys: ['image', 'label'] - label_file_list: ["./train_data/CROHME_lite/training/labels.txt"] loader: shuffle: True batch_size_per_card: 8 @@ -102,6 +100,7 @@ Eval: dataset: name: SimpleDataSet data_dir: ./train_data/CROHME_lite/evaluation/images/ + label_file_list: ["./train_data/CROHME_lite/evaluation/labels.txt"] transforms: - DecodeImage: channel_first: False @@ -112,11 +111,9 @@ Eval: - GrayImageChannelFormat: inverse: True - CANLabelEncode: - character_dict_path: ppocr/utils/dict/latex_symbol_dict.txt lower: False - KeepKeys: keep_keys: ['image', 'label'] - label_file_list: ["./train_data/CROHME_lite/evaluation/labels.txt"] loader: shuffle: False drop_last: False