Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wangsen
paddle_dbnet
Commits
bab3f759
Commit
bab3f759
authored
May 13, 2020
by
tink2123
Browse files
modified yml
parent
2a477c85
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
72 additions
and
15 deletions
+72
-15
configs/rec/rec_chinese_lite_train.yml
configs/rec/rec_chinese_lite_train.yml
+42
-0
configs/rec/rec_chinese_reader.yml
configs/rec/rec_chinese_reader.yml
+14
-0
configs/rec/rec_icdar15_train.yml
configs/rec/rec_icdar15_train.yml
+5
-4
ppocr/utils/character.py
ppocr/utils/character.py
+1
-1
ppocr/utils/ic15_dict.txt
ppocr/utils/ic15_dict.txt
+10
-10
No files found.
configs/rec/rec_chinese_lite_train.yml
0 → 100755
View file @
bab3f759
Global
:
algorithm
:
CRNN
use_gpu
:
true
epoch_num
:
3000
log_smooth_window
:
20
print_batch_step
:
10
save_model_dir
:
./output/rec_CRNN
save_epoch_step
:
3
eval_batch_step
:
2000
train_batch_size_per_card
:
256
test_batch_size_per_card
:
256
image_shape
:
[
3
,
32
,
100
]
max_text_length
:
25
character_type
:
ch
character_dict_path
:
./ppocr/utils/ppocr_keys_v1.txt
loss_type
:
ctc
reader_yml
:
./configs/rec/rec_chinese_reader.yml
pretrain_weights
:
./pretrain_models/CRNN/best_accuracy
checkpoints
:
save_inference_dir
:
Architecture
:
function
:
ppocr.modeling.architectures.rec_model,RecModel
Backbone
:
function
:
ppocr.modeling.backbones.rec_mobilenet_v3,MobileNetV3
scale
:
0.5
model_name
:
small
Head
:
function
:
ppocr.modeling.heads.rec_ctc_head,CTCPredict
encoder_type
:
rnn
SeqRNN
:
hidden_size
:
48
Loss
:
function
:
ppocr.modeling.losses.rec_ctc_loss,CTCLoss
Optimizer
:
function
:
ppocr.optimizer,AdamDecay
base_lr
:
0.0005
beta1
:
0.9
beta2
:
0.999
configs/rec/rec_chinese_reader.yml
0 → 100755
View file @
bab3f759
TrainReader
:
reader_function
:
ppocr.data.rec.dataset_traversal,SimpleReader
num_workers
:
8
img_set_dir
:
./train_data
label_file_path
:
./train_data/rec_gt_train.txt
EvalReader
:
reader_function
:
ppocr.data.rec.dataset_traversal,SimpleReader
img_set_dir
:
./train_data
label_file_path
:
./train_data/rec_gt_test.txt
TestReader
:
reader_function
:
ppocr.data.rec.dataset_traversal,SimpleReader
infer_img
:
./infer_img
configs/rec/rec_icdar15_train.yml
View file @
bab3f759
...
@@ -12,10 +12,11 @@ Global:
...
@@ -12,10 +12,11 @@ Global:
image_shape
:
[
3
,
32
,
100
]
image_shape
:
[
3
,
32
,
100
]
max_text_length
:
25
max_text_length
:
25
character_type
:
ch
character_type
:
ch
character_dict_path
:
./ppocr/utils/ic15_dict.txt
#character_dict_path: ./ppocr/utils/ic15_dict.txt
character_dict_path
:
/workspace/PaddleOCR/train_data/ic15_dict.txt
loss_type
:
ctc
loss_type
:
ctc
reader_yml
:
./configs/rec/rec_icdar15_reader.yml
reader_yml
:
./configs/rec/rec_icdar15_reader.yml
pretrain_weights
:
./pretrain_models/CRNN
/best_accuracy
pretrain_weights
:
/workspace/PaddleOCR/pretrain_models/rec_mv3_none_bilstm_ctc
/best_accuracy
checkpoints
:
checkpoints
:
save_inference_dir
:
save_inference_dir
:
Architecture
:
Architecture
:
...
@@ -24,13 +25,13 @@ Architecture:
...
@@ -24,13 +25,13 @@ Architecture:
Backbone
:
Backbone
:
function
:
ppocr.modeling.backbones.rec_mobilenet_v3,MobileNetV3
function
:
ppocr.modeling.backbones.rec_mobilenet_v3,MobileNetV3
scale
:
0.5
scale
:
0.5
model_name
:
small
model_name
:
large
Head
:
Head
:
function
:
ppocr.modeling.heads.rec_ctc_head,CTCPredict
function
:
ppocr.modeling.heads.rec_ctc_head,CTCPredict
encoder_type
:
rnn
encoder_type
:
rnn
SeqRNN
:
SeqRNN
:
hidden_size
:
48
hidden_size
:
96
Loss
:
Loss
:
function
:
ppocr.modeling.losses.rec_ctc_loss,CTCLoss
function
:
ppocr.modeling.losses.rec_ctc_loss,CTCLoss
...
...
ppocr/utils/character.py
View file @
bab3f759
...
@@ -64,7 +64,7 @@ class CharacterOps(object):
...
@@ -64,7 +64,7 @@ class CharacterOps(object):
[sum(text_lengths)] = [text_index_0 + text_index_1 + ... + text_index_(n - 1)]
[sum(text_lengths)] = [text_index_0 + text_index_1 + ... + text_index_(n - 1)]
length: length of each text. [batch_size]
length: length of each text. [batch_size]
"""
"""
if
self
.
character_type
==
"en"
or
text
.
encode
(
'UTF-8'
).
isalpha
()
:
if
self
.
character_type
==
"en"
:
text
=
text
.
lower
()
text
=
text
.
lower
()
text_list
=
[]
text_list
=
[]
...
...
ppocr/utils/ic15_dict.txt
View file @
bab3f759
0
1
2
3
4
5
6
7
8
9
a
a
b
b
c
c
...
@@ -24,13 +34,3 @@ w
...
@@ -24,13 +34,3 @@ w
x
x
y
y
z
z
0
1
2
3
4
5
6
7
8
9
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment