cnocr 2.3.2.2__tar.gz → 2.3.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/PKG-INFO +1 -1
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/__version__.py +2 -2
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/utils.py +8 -6
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr.egg-info/PKG-INFO +1 -1
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/LICENSE +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/README.md +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/__init__.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/app.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/classification/__init__.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/classification/dataset.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/classification/image_classifier.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/clf_cli.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/cli.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/cn_ocr.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/consts.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/data_utils/__init__.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/data_utils/aug.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/data_utils/block_shuffle.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/data_utils/transforms.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/data_utils/utils.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/dataset.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/dataset_utils.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/gradio_app.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/gradio_app2.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/label_cn.txt +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/label_number.txt +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/line_split.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/lr_scheduler.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/models/__init__.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/models/ctc.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/models/densenet.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/models/mobilenet.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/models/ocr_model.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/ppocr/__init__.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/ppocr/consts.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/ppocr/postprocess/__init__.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/ppocr/postprocess/rec_postprocess.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/ppocr/pp_recognizer.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/ppocr/rapid_recognizer.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/ppocr/utility.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/ppocr/utils/__init__.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/ppocr/utils/chinese_cht_dict.txt +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/ppocr/utils/en_dict.txt +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/ppocr/utils/ppocr_keys_v1.txt +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/recognizer.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/serve.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr/trainer.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr.egg-info/SOURCES.txt +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr.egg-info/dependency_links.txt +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr.egg-info/entry_points.txt +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr.egg-info/not-zip-safe +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr.egg-info/requires.txt +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/cnocr.egg-info/top_level.txt +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/setup.cfg +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/setup.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/tests/test_cnocr.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/tests/test_dataset.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/tests/test_models.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/tests/test_ppocr.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/tests/test_pytorch.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/tests/test_trainer.py +0 -0
- {cnocr-2.3.2.2 → cnocr-2.3.2.3}/tests/test_transforms.py +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
|
-
# Copyright (C) 2021-
|
|
2
|
+
# Copyright (C) 2021-2026, [Breezedeus](https://github.com/breezedeus).
|
|
3
3
|
# Licensed to the Apache Software Foundation (ASF) under one
|
|
4
4
|
# or more contributor license agreements. See the NOTICE file
|
|
5
5
|
# distributed with this work for additional information
|
|
@@ -17,4 +17,4 @@
|
|
|
17
17
|
# specific language governing permissions and limitations
|
|
18
18
|
# under the License.
|
|
19
19
|
|
|
20
|
-
__version__ = '2.3.2.
|
|
20
|
+
__version__ = '2.3.2.3'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
|
-
# Copyright (C) 2021-
|
|
2
|
+
# Copyright (C) 2021-2026, [Breezedeus](https://github.com/breezedeus).
|
|
3
3
|
# Licensed to the Apache Software Foundation (ASF) under one
|
|
4
4
|
# or more contributor license agreements. See the NOTICE file
|
|
5
5
|
# distributed with this work for additional information
|
|
@@ -39,14 +39,12 @@ import torchvision.transforms.functional as F
|
|
|
39
39
|
from .consts import (
|
|
40
40
|
ENCODER_CONFIGS,
|
|
41
41
|
DECODER_CONFIGS,
|
|
42
|
-
AVAILABLE_MODELS,
|
|
43
42
|
IMG_STANDARD_HEIGHT,
|
|
44
43
|
)
|
|
45
44
|
|
|
46
|
-
fmt = '[%(levelname)s %(asctime)s %(funcName)s:%(lineno)d] %(
|
|
47
|
-
|
|
48
|
-
logging.
|
|
49
|
-
logger = logging.getLogger()
|
|
45
|
+
fmt = '[%(levelname)s %(asctime)s %(funcName)s:%(lineno)d] %(message)s'
|
|
46
|
+
|
|
47
|
+
logger = logging.getLogger(__name__)
|
|
50
48
|
|
|
51
49
|
|
|
52
50
|
def set_logger(log_file=None, log_level=logging.INFO, log_file_level=logging.NOTSET):
|
|
@@ -55,7 +53,11 @@ def set_logger(log_file=None, log_level=logging.INFO, log_file_level=logging.NOT
|
|
|
55
53
|
>>> set_logger(log_file)
|
|
56
54
|
>>> logger.info("abc'")
|
|
57
55
|
"""
|
|
56
|
+
global logger
|
|
58
57
|
log_format = logging.Formatter(fmt)
|
|
58
|
+
logging.basicConfig(format=fmt)
|
|
59
|
+
logging.captureWarnings(True)
|
|
60
|
+
logger = logging.getLogger(__name__)
|
|
59
61
|
logger.setLevel(log_level)
|
|
60
62
|
console_handler = logging.StreamHandler()
|
|
61
63
|
console_handler.setFormatter(log_format)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|