From 0d8ac34b95ad6a7acc69718fe8ea21ee2f0bccff Mon Sep 17 00:00:00 2001 From: redearly123/PaddleOCR <1900012936@pku.edu.cn> Date: Thu, 30 Dec 2021 21:16:35 +0800 Subject: [PATCH] add feature lock selected shapes --- PPOCRLabel/data/Cache.cach | 1 - PPOCRLabel/data/Label.txt | 1 - PPOCRLabel/data/fileState.txt | 1 - ppstructure/vqa/__init__.py | 0 ppstructure/vqa/eval_re.py | 2 +- ppstructure/vqa/eval_ser.py | 2 +- ppstructure/vqa/infer_re.py | 2 +- ppstructure/vqa/infer_ser.py | 2 +- ppstructure/vqa/infer_ser_e2e.py | 4 ++-- ppstructure/vqa/infer_ser_re_e2e.py | 2 +- ppstructure/vqa/train_re.py | 2 +- ppstructure/vqa/train_ser.py | 2 +- ppstructure/vqa/{vaq_utils.py => utils.py} | 0 13 files changed, 9 insertions(+), 12 deletions(-) delete mode 100644 PPOCRLabel/data/Cache.cach delete mode 100644 PPOCRLabel/data/Label.txt delete mode 100644 PPOCRLabel/data/fileState.txt delete mode 100644 ppstructure/vqa/__init__.py rename ppstructure/vqa/{vaq_utils.py => utils.py} (100%) diff --git a/PPOCRLabel/data/Cache.cach b/PPOCRLabel/data/Cache.cach deleted file mode 100644 index dcb24821..00000000 --- a/PPOCRLabel/data/Cache.cach +++ /dev/null @@ -1 +0,0 @@ -data/paddle.png [{"transcription": "1/j飞浆", "points": [[27.0, 17.0], [158.0, 20.0], [158.0, 64.0], [27.0, 61.0]], "difficult": false}] diff --git a/PPOCRLabel/data/Label.txt b/PPOCRLabel/data/Label.txt deleted file mode 100644 index 1ad8a192..00000000 --- a/PPOCRLabel/data/Label.txt +++ /dev/null @@ -1 +0,0 @@ -data/paddle.png [{"transcription": "1/j飞浆", "points": [[27, 17], [158, 20], [160, 61], [27, 61]], "difficult": false}] diff --git a/PPOCRLabel/data/fileState.txt b/PPOCRLabel/data/fileState.txt deleted file mode 100644 index b37d8de7..00000000 --- a/PPOCRLabel/data/fileState.txt +++ /dev/null @@ -1 +0,0 @@ -/Users/mac/Downloads/PaddleOCR/PPOCRLabel/data/paddle.png 1 diff --git a/ppstructure/vqa/__init__.py b/ppstructure/vqa/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/ppstructure/vqa/eval_re.py b/ppstructure/vqa/eval_re.py index 1ccce07e..12bb9cab 100644 --- a/ppstructure/vqa/eval_re.py +++ b/ppstructure/vqa/eval_re.py @@ -24,7 +24,7 @@ import paddle from paddlenlp.transformers import LayoutXLMTokenizer, LayoutXLMModel, LayoutXLMForRelationExtraction from xfun import XFUNDataset -from vaq_utils import parse_args, get_bio_label_maps, print_arguments +from utils import parse_args, get_bio_label_maps, print_arguments from data_collator import DataCollator from metric import re_score diff --git a/ppstructure/vqa/eval_ser.py b/ppstructure/vqa/eval_ser.py index 7f8d1bdc..52eeb8a1 100644 --- a/ppstructure/vqa/eval_ser.py +++ b/ppstructure/vqa/eval_ser.py @@ -33,7 +33,7 @@ from paddlenlp.transformers import LayoutLMModel, LayoutLMTokenizer, LayoutLMFor from xfun import XFUNDataset from losses import SERLoss -from vaq_utils import parse_args, get_bio_label_maps, print_arguments +from utils import parse_args, get_bio_label_maps, print_arguments from ppocr.utils.logging import get_logger diff --git a/ppstructure/vqa/infer_re.py b/ppstructure/vqa/infer_re.py index 5ef96920..7937700a 100644 --- a/ppstructure/vqa/infer_re.py +++ b/ppstructure/vqa/infer_re.py @@ -15,7 +15,7 @@ import paddle from paddlenlp.transformers import LayoutXLMTokenizer, LayoutXLMModel, LayoutXLMForRelationExtraction from xfun import XFUNDataset -from vaq_utils import parse_args, get_bio_label_maps, draw_re_results +from utils import parse_args, get_bio_label_maps, draw_re_results from data_collator import DataCollator from ppocr.utils.logging import get_logger diff --git a/ppstructure/vqa/infer_ser.py b/ppstructure/vqa/infer_ser.py index 4d169ee3..7994b544 100644 --- a/ppstructure/vqa/infer_ser.py +++ b/ppstructure/vqa/infer_ser.py @@ -22,7 +22,7 @@ from copy import deepcopy import paddle # relative reference -from vaq_utils import parse_args, get_image_file_list, draw_ser_results, get_bio_label_maps +from utils import parse_args, get_image_file_list, draw_ser_results, get_bio_label_maps from paddlenlp.transformers import LayoutXLMModel, LayoutXLMTokenizer, LayoutXLMForTokenClassification from paddlenlp.transformers import LayoutLMModel, LayoutLMTokenizer, LayoutLMForTokenClassification diff --git a/ppstructure/vqa/infer_ser_e2e.py b/ppstructure/vqa/infer_ser_e2e.py index 31ce7fde..6bb02475 100644 --- a/ppstructure/vqa/infer_ser_e2e.py +++ b/ppstructure/vqa/infer_ser_e2e.py @@ -25,9 +25,9 @@ from paddlenlp.transformers import LayoutXLMModel, LayoutXLMTokenizer, LayoutXLM from paddlenlp.transformers import LayoutLMModel, LayoutLMTokenizer, LayoutLMForTokenClassification # relative reference -from vaq_utils import parse_args, get_image_file_list, draw_ser_results, get_bio_label_maps +from utils import parse_args, get_image_file_list, draw_ser_results, get_bio_label_maps -from vaq_utils import pad_sentences, split_page, preprocess, postprocess, merge_preds_list_with_ocr_info +from utils import pad_sentences, split_page, preprocess, postprocess, merge_preds_list_with_ocr_info MODELS = { 'LayoutXLM': diff --git a/ppstructure/vqa/infer_ser_re_e2e.py b/ppstructure/vqa/infer_ser_re_e2e.py index c57ef274..32d8850a 100644 --- a/ppstructure/vqa/infer_ser_re_e2e.py +++ b/ppstructure/vqa/infer_ser_re_e2e.py @@ -24,7 +24,7 @@ import paddle from paddlenlp.transformers import LayoutXLMModel, LayoutXLMTokenizer, LayoutXLMForRelationExtraction # relative reference -from vaq_utils import parse_args, get_image_file_list, draw_re_results +from utils import parse_args, get_image_file_list, draw_re_results from infer_ser_e2e import SerPredictor diff --git a/ppstructure/vqa/train_re.py b/ppstructure/vqa/train_re.py index b26d8a37..47d69467 100644 --- a/ppstructure/vqa/train_re.py +++ b/ppstructure/vqa/train_re.py @@ -27,7 +27,7 @@ import paddle from paddlenlp.transformers import LayoutXLMTokenizer, LayoutXLMModel, LayoutXLMForRelationExtraction from xfun import XFUNDataset -from vaq_utils import parse_args, get_bio_label_maps, print_arguments, set_seed +from utils import parse_args, get_bio_label_maps, print_arguments, set_seed from data_collator import DataCollator from eval_re import evaluate diff --git a/ppstructure/vqa/train_ser.py b/ppstructure/vqa/train_ser.py index 0d6e2c42..2670ef9e 100644 --- a/ppstructure/vqa/train_ser.py +++ b/ppstructure/vqa/train_ser.py @@ -32,7 +32,7 @@ from paddlenlp.transformers import LayoutXLMModel, LayoutXLMTokenizer, LayoutXLM from paddlenlp.transformers import LayoutLMModel, LayoutLMTokenizer, LayoutLMForTokenClassification from xfun import XFUNDataset -from vaq_utils import parse_args, get_bio_label_maps, print_arguments, set_seed +from utils import parse_args, get_bio_label_maps, print_arguments, set_seed from eval_ser import evaluate from losses import SERLoss from ppocr.utils.logging import get_logger diff --git a/ppstructure/vqa/vaq_utils.py b/ppstructure/vqa/utils.py similarity index 100% rename from ppstructure/vqa/vaq_utils.py rename to ppstructure/vqa/utils.py -- GitLab