diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index a6b14c70..00000000 --- a/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -backend/models/V4/ch_det/inference.pdiparams filter=lfs diff=lfs merge=lfs -text diff --git a/backend/config.py b/backend/config.py index 69a8560d..f52c9d96 100644 --- a/backend/config.py +++ b/backend/config.py @@ -76,7 +76,6 @@ # ×××××××××××××××××××× [不要改]判断是否使用GPU start ×××××××××××××××××××× - # ×××××××××××××××××××× [不要改]读取语言、模型路径、字典路径 start ×××××××××××××××××××× # 设置识别语言 REC_CHAR_TYPE = settings_config['DEFAULT']['Language'] @@ -89,7 +88,7 @@ if MODE_TYPE == 'fast': ACCURATE_MODE_ON = False # 模型文件目录 -# 默认模型版本 V3 +# 默认模型版本 V4 MODEL_VERSION = 'V4' # 文本检测模型 DET_MODEL_BASE = os.path.join(BASE_DIR, 'models') @@ -169,6 +168,10 @@ if 'inference.pdiparams' not in (os.listdir(REC_MODEL_PATH)): fs = Filesplit() fs.merge(input_dir=REC_MODEL_PATH) + # 查看该路径下是否有文本模型识别完整文件,没有的话合并小文件生成完整文件 + if 'inference.pdiparams' not in (os.listdir(DET_MODEL_PATH)): + fs = Filesplit() + fs.merge(input_dir=DET_MODEL_PATH) # ×××××××××××××××××××× [不要改]读取语言、模型路径、字典路径 end ×××××××××××××××××××× diff --git a/backend/models/V4/ch_det/fs_manifest.csv b/backend/models/V4/ch_det/fs_manifest.csv new file mode 100644 index 00000000..9cc67865 --- /dev/null +++ b/backend/models/V4/ch_det/fs_manifest.csv @@ -0,0 +1,4 @@ +filename,filesize,encoding,header +inference_1.pdiparams,50000000,, +inference_2.pdiparams,50000000,, +inference_3.pdiparams,13295054,, diff --git a/backend/models/V4/ch_det/inference.pdiparams b/backend/models/V4/ch_det/inference.pdiparams deleted file mode 100644 index 075f6d1d..00000000 --- a/backend/models/V4/ch_det/inference.pdiparams +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:48cecf9e30e9261a634126bc5211a2736508ae89d2d6199ef2ede06cdebe678f -size 113295054 diff --git a/backend/models/V4/ch_det/inference_1.pdiparams b/backend/models/V4/ch_det/inference_1.pdiparams new file mode 100644 index 00000000..322c93dd Binary files /dev/null and b/backend/models/V4/ch_det/inference_1.pdiparams differ diff --git a/backend/models/V4/ch_det/inference_2.pdiparams b/backend/models/V4/ch_det/inference_2.pdiparams new file mode 100644 index 00000000..a3aa0605 Binary files /dev/null and b/backend/models/V4/ch_det/inference_2.pdiparams differ diff --git a/backend/models/V4/ch_det/inference_3.pdiparams b/backend/models/V4/ch_det/inference_3.pdiparams new file mode 100644 index 00000000..030d4888 Binary files /dev/null and b/backend/models/V4/ch_det/inference_3.pdiparams differ