From ea557c50eef30dc2f8f5a76d9920877ed4e159c8 Mon Sep 17 00:00:00 2001 From: dorren Date: Mon, 17 Oct 2022 19:58:35 +0800 Subject: [PATCH] update config --- configs/rec/rec_d28_can.yml | 7 ++----- ppocr/modeling/backbones/rec_densenet.py | 5 +++++ test_tipc/configs/rec_d28_can/rec_d28_can.yml | 7 ++----- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/configs/rec/rec_d28_can.yml b/configs/rec/rec_d28_can.yml index 2149100d..7c3b0fd3 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 b9fab765..65c5fa4f 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 92917c20..55018658 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 -- GitLab