diff --git a/.gitignore b/.gitignore index fa9f374..7ece736 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,11 @@ backup/ *.log __pycache__ # migrations/ +sdsvtd copy/ +oickle +*.sample +._bit +__pycache__ test/ ._git/ sdsvkvu_/ @@ -20,4 +25,5 @@ media/ postgres_data/ curl.md cope2n-api/fwd_api/commands/init_database.py -/data \ No newline at end of file +/data +backup diff --git a/cope2n-ai-fi/._gitmodules b/cope2n-ai-fi/._gitmodules old mode 100644 new mode 100755 diff --git a/cope2n-ai-fi/Dockerfile_fwd b/cope2n-ai-fi/Dockerfile_fwd old mode 100644 new mode 100755 diff --git a/cope2n-ai-fi/TODO.md b/cope2n-ai-fi/TODO.md old mode 100644 new mode 100755 diff --git a/cope2n-ai-fi/api/manulife/predict_manulife.py b/cope2n-ai-fi/api/manulife/predict_manulife.py old mode 100644 new mode 100755 diff --git a/cope2n-ai-fi/api/sdsap_sbt/prediction_sbt.py b/cope2n-ai-fi/api/sdsap_sbt/prediction_sbt.py index d20fc11..27fd2a5 100755 --- a/cope2n-ai-fi/api/sdsap_sbt/prediction_sbt.py +++ b/cope2n-ai-fi/api/sdsap_sbt/prediction_sbt.py @@ -1,4 +1,5 @@ import cv2 +import nltk import urllib import random import numpy as np @@ -7,6 +8,8 @@ import uuid import sys, os cur_dir = str(Path(__file__).parents[2]) sys.path.append(cur_dir) +nltk.data.path.append(os.path.join((os.getcwd() + '/nltk_data'))) + from modules.sdsvkvu import load_engine, process_img from modules.ocr_engine import OcrEngine from configs.sdsap_sbt import device, ocr_cfg, kvu_cfg @@ -22,8 +25,10 @@ def load_ocr_engine(opt) -> OcrEngine: print("OCR engine configfs: \n", ocr_cfg) print("KVU configfs: \n", kvu_cfg) -ocr_engine = load_ocr_engine(ocr_cfg) -kvu_cfg['ocr_engine'] = ocr_engine +# ocr_engine = load_ocr_engine(ocr_cfg) +# kvu_cfg['ocr_engine'] = ocr_engine + +kvu_cfg['ocr_configs'] = ocr_cfg option = kvu_cfg['option'] kvu_cfg.pop("option") # pop option sbt_engine = load_engine(kvu_cfg) diff --git a/cope2n-ai-fi/common/AnyKey_Value/utils/split_docs.py b/cope2n-ai-fi/common/AnyKey_Value/utils/split_docs.py old mode 100644 new mode 100755 diff --git a/cope2n-ai-fi/configs/default_env.py b/cope2n-ai-fi/configs/default_env.py old mode 100644 new mode 100755 diff --git a/cope2n-ai-fi/configs/manulife/__init__.py b/cope2n-ai-fi/configs/manulife/__init__.py old mode 100644 new mode 100755 diff --git a/cope2n-ai-fi/configs/manulife/configs.py b/cope2n-ai-fi/configs/manulife/configs.py old mode 100644 new mode 100755 diff --git a/cope2n-ai-fi/configs/sdsap_sbt/__init__.py b/cope2n-ai-fi/configs/sdsap_sbt/__init__.py old mode 100644 new mode 100755 diff --git a/cope2n-ai-fi/configs/sdsap_sbt/configs.py b/cope2n-ai-fi/configs/sdsap_sbt/configs.py old mode 100644 new mode 100755 diff --git a/cope2n-ai-fi/modules/__init__.py b/cope2n-ai-fi/modules/__init__.py old mode 100644 new mode 100755 diff --git a/cope2n-ai-fi/modules/_sdsvkvu/.gitignore b/cope2n-ai-fi/modules/_sdsvkvu/.gitignore deleted file mode 100644 index 17d9c1a..0000000 --- a/cope2n-ai-fi/modules/_sdsvkvu/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Model weights -weights/ -microsoft/ -nltk_data/ - -# Visualize -visualize - -# External -sdsvkvu/externals/ocr_engine_deskew/externals/ - -# -__pycache__ -*/__pycache__ -*/*/__pycache__ - -# -.git_temp/ - -# Packages -build/ -dist/ - - diff --git a/cope2n-ai-fi/modules/_sdsvkvu/.gitmodules b/cope2n-ai-fi/modules/_sdsvkvu/.gitmodules deleted file mode 100644 index eb6d053..0000000 --- a/cope2n-ai-fi/modules/_sdsvkvu/.gitmodules +++ /dev/null @@ -1,4 +0,0 @@ - -[submodule "sdsvkvu/externals/basic_ocr"] - path = sdsvkvu/externals/basic_ocr - url = https://code.sdsdev.co.kr/tuanlv/IDP-BasicOCR.git diff --git a/cope2n-ai-fi/modules/_sdsvkvu/LICENSE b/cope2n-ai-fi/modules/_sdsvkvu/LICENSE deleted file mode 100644 index 21ffbaa..0000000 --- a/cope2n-ai-fi/modules/_sdsvkvu/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright 2023 tuanlv - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -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. \ No newline at end of file diff --git a/cope2n-ai-fi/modules/_sdsvkvu/MANIFEST.in b/cope2n-ai-fi/modules/_sdsvkvu/MANIFEST.in deleted file mode 100644 index e4bd723..0000000 --- a/cope2n-ai-fi/modules/_sdsvkvu/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -include sdsvkvu/weights/*/*.yaml -include sdsvkvu/weights/*/checkpoints/best_model.pth \ No newline at end of file diff --git a/cope2n-ai-fi/modules/_sdsvkvu/README.md b/cope2n-ai-fi/modules/_sdsvkvu/README.md deleted file mode 100644 index d8b1dd1..0000000 --- a/cope2n-ai-fi/modules/_sdsvkvu/README.md +++ /dev/null @@ -1,122 +0,0 @@ -
-
-
-
-
+