forked from chineseocr/chineseocr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ee1e90d
commit 1e1eb76
Showing
12 changed files
with
170 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,24 @@ | ||
import os | ||
opencvFlag = True##opencvFlag==True 启用opencv dnn 反之 darkent | ||
darknetRoot = os.path.join(os.path.curdir,"darknet")## yolo 安装目录 | ||
pwd = os.getcwd() | ||
yoloCfg = os.path.join(pwd,"models","text.cfg") | ||
yoloWeights = os.path.join(pwd,"models","text.weights") | ||
yoloData = os.path.join(pwd,"models","text.data") | ||
ocrModel = os.path.join(pwd,"models","ocr.pth") | ||
##文字方向检测 | ||
AngleModelPb = os.path.join(pwd,"models","Angle-model.pb") | ||
AngleModelPbtxt = os.path.join(pwd,"models","Angle-model.pbtxt") | ||
IMGSIZE = (1024,1024)## yolo3 输入图像尺寸 | ||
##是否启用LSTM crnn模型 | ||
DETECTANGLE=True##是否进行文字方向检测 | ||
LSTMFLAG = True##OCR模型是否调用LSTM层 | ||
GPU = True##OCR 是否启用GPU | ||
chinsesModel = True##模型选择 True:中英文模型 False:英文模型 | ||
if chinsesModel: | ||
if LSTMFLAG: | ||
ocrModel = os.path.join(pwd,"models","ocr-lstm.pth") | ||
else: | ||
ocrModel = os.path.join(pwd,"models","ocr-dense.pth") | ||
else: | ||
LSTMFLAG=True | ||
ocrModel = os.path.join(pwd,"models","ocr-english.pth") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
## 下载对应的权重文件放在此目录 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.