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
631fd9fd
"vscode:/vscode.git/clone" did not exist on "8fd3a74322befbd13bb461e4cb9e1a57f6e9ed96"
Unverified
Commit
631fd9fd
authored
Dec 10, 2020
by
xiaoting
Committed by
GitHub
Dec 10, 2020
Browse files
Merge branch 'dygraph' into dygraph_doc
parents
8520dd1e
90b968d5
Changes
98
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
1052 additions
and
25 deletions
+1052
-25
MANIFEST.in
MANIFEST.in
+3
-4
configs/cls/cls_mv3.yml
configs/cls/cls_mv3.yml
+0
-1
configs/det/ch_ppocr_v2.0/ch_det_mv3_db_v2.0.yml
configs/det/ch_ppocr_v2.0/ch_det_mv3_db_v2.0.yml
+134
-0
configs/det/ch_ppocr_v2.0/ch_det_res18_db_v2.0.yml
configs/det/ch_ppocr_v2.0/ch_det_res18_db_v2.0.yml
+133
-0
configs/det/det_mv3_db.yml
configs/det/det_mv3_db.yml
+0
-2
configs/det/det_mv3_east.yml
configs/det/det_mv3_east.yml
+111
-0
configs/det/det_r50_vd_db.yml
configs/det/det_r50_vd_db.yml
+130
-0
configs/det/det_r50_vd_east.yml
configs/det/det_r50_vd_east.yml
+110
-0
configs/det/det_r50_vd_sast_icdar15.yml
configs/det/det_r50_vd_sast_icdar15.yml
+110
-0
configs/det/det_r50_vd_sast_totaltext.yml
configs/det/det_r50_vd_sast_totaltext.yml
+109
-0
configs/rec/ch_ppocr_v2.0/rec_chinese_common_train_v2.0.yaml
configs/rec/ch_ppocr_v2.0/rec_chinese_common_train_v2.0.yaml
+1
-1
configs/rec/ch_ppocr_v2.0/rec_chinese_lite_train_v2.0.yaml
configs/rec/ch_ppocr_v2.0/rec_chinese_lite_train_v2.0.yaml
+2
-2
configs/rec/multi_language/rec_en_number_lite_train.yml
configs/rec/multi_language/rec_en_number_lite_train.yml
+2
-2
configs/rec/multi_language/rec_french_lite_train.yml
configs/rec/multi_language/rec_french_lite_train.yml
+4
-4
configs/rec/multi_language/rec_german_lite_train.yml
configs/rec/multi_language/rec_german_lite_train.yml
+2
-2
configs/rec/multi_language/rec_japan_lite_train.yml
configs/rec/multi_language/rec_japan_lite_train.yml
+2
-2
configs/rec/multi_language/rec_korean_lite_train.yml
configs/rec/multi_language/rec_korean_lite_train.yml
+2
-2
configs/rec/rec_mv3_none_bilstm_ctc.yml
configs/rec/rec_mv3_none_bilstm_ctc.yml
+2
-3
configs/rec/rec_mv3_none_none_ctc.yml
configs/rec/rec_mv3_none_none_ctc.yml
+95
-0
configs/rec/rec_mv3_tps_bilstm_ctc.yml
configs/rec/rec_mv3_tps_bilstm_ctc.yml
+100
-0
No files found.
MANIFEST.in
View file @
631fd9fd
include LICENSE.txt
include README.md
recursive-include ppocr/utils *.txt utility.py
character.py check
.py
recursive-include ppocr/data/
det
*.py
recursive-include ppocr/utils *.txt utility.py
logging
.py
recursive-include ppocr/data/ *.py
recursive-include ppocr/postprocess *.py
recursive-include ppocr/postprocess/lanms *.*
recursive-include tools/infer *.py
recursive-include tools/infer *.py
\ No newline at end of file
configs/cls/cls_mv3.yml
View file @
631fd9fd
...
...
@@ -8,7 +8,6 @@ Global:
# evaluation is run every 5000 iterations after the 4000th iteration
eval_batch_step
:
[
0
,
1000
]
# if pretrained_model is saved in static mode, load_static_weights must set to True
load_static_weights
:
True
cal_metric_during_train
:
True
pretrained_model
:
checkpoints
:
...
...
configs/det/ch_ppocr_v2.0/ch_det_mv3_db_v2.0.yml
0 → 100644
View file @
631fd9fd
Global
:
use_gpu
:
true
epoch_num
:
1200
log_smooth_window
:
20
print_batch_step
:
2
save_model_dir
:
./output/ch_db_mv3/
save_epoch_step
:
1200
# evaluation is run every 5000 iterations after the 4000th iteration
eval_batch_step
:
[
3000
,
2000
]
# if pretrained_model is saved in static mode, load_static_weights must set to True
load_static_weights
:
True
cal_metric_during_train
:
False
pretrained_model
:
./pretrain_models/MobileNetV3_large_x0_5_pretrained
checkpoints
:
#./output/det_db_0.001_DiceLoss_256_pp_config_2.0b_4gpu/best_accuracy
save_inference_dir
:
use_visualdl
:
False
infer_img
:
doc/imgs_en/img_10.jpg
save_res_path
:
./output/det_db/predicts_db.txt
Architecture
:
model_type
:
det
algorithm
:
DB
Transform
:
Backbone
:
name
:
MobileNetV3
scale
:
0.5
model_name
:
large
disable_se
:
True
Neck
:
name
:
DBFPN
out_channels
:
96
Head
:
name
:
DBHead
k
:
50
Loss
:
name
:
DBLoss
balance_loss
:
true
main_loss_type
:
DiceLoss
alpha
:
5
beta
:
10
ohem_ratio
:
3
Optimizer
:
name
:
Adam
beta1
:
0.9
beta2
:
0.999
lr
:
name
:
Cosine
learning_rate
:
0.001
warmup_epoch
:
2
regularizer
:
name
:
'
L2'
factor
:
0
PostProcess
:
name
:
DBPostProcess
thresh
:
0.3
box_thresh
:
0.6
max_candidates
:
1000
unclip_ratio
:
1.5
Metric
:
name
:
DetMetric
main_indicator
:
hmean
Train
:
dataset
:
name
:
SimpleDataSet
data_dir
:
./train_data/icdar2015/text_localization/
label_file_list
:
-
./train_data/icdar2015/text_localization/train_icdar2015_label.txt
ratio_list
:
[
1.0
]
transforms
:
-
DecodeImage
:
# load image
img_mode
:
BGR
channel_first
:
False
-
DetLabelEncode
:
# Class handling label
-
IaaAugment
:
augmenter_args
:
-
{
'
type'
:
Fliplr
,
'
args'
:
{
'
p'
:
0.5
}
}
-
{
'
type'
:
Affine
,
'
args'
:
{
'
rotate'
:
[
-10
,
10
]
}
}
-
{
'
type'
:
Resize
,
'
args'
:
{
'
size'
:
[
0.5
,
3
]
}
}
-
EastRandomCropData
:
size
:
[
960
,
960
]
max_tries
:
50
keep_ratio
:
true
-
MakeBorderMap
:
shrink_ratio
:
0.4
thresh_min
:
0.3
thresh_max
:
0.7
-
MakeShrinkMap
:
shrink_ratio
:
0.4
min_text_size
:
8
-
NormalizeImage
:
scale
:
1./255.
mean
:
[
0.485
,
0.456
,
0.406
]
std
:
[
0.229
,
0.224
,
0.225
]
order
:
'
hwc'
-
ToCHWImage
:
-
KeepKeys
:
keep_keys
:
[
'
image'
,
'
threshold_map'
,
'
threshold_mask'
,
'
shrink_map'
,
'
shrink_mask'
]
# the order of the dataloader list
loader
:
shuffle
:
True
drop_last
:
False
batch_size_per_card
:
8
num_workers
:
4
Eval
:
dataset
:
name
:
SimpleDataSet
data_dir
:
./train_data/icdar2015/text_localization/
label_file_list
:
-
./train_data/icdar2015/text_localization/test_icdar2015_label.txt
transforms
:
-
DecodeImage
:
# load image
img_mode
:
BGR
channel_first
:
False
-
DetLabelEncode
:
# Class handling label
-
DetResizeForTest
:
# image_shape: [736, 1280]
-
NormalizeImage
:
scale
:
1./255.
mean
:
[
0.485
,
0.456
,
0.406
]
std
:
[
0.229
,
0.224
,
0.225
]
order
:
'
hwc'
-
ToCHWImage
:
-
KeepKeys
:
keep_keys
:
[
'
image'
,
'
shape'
,
'
polys'
,
'
ignore_tags'
]
loader
:
shuffle
:
False
drop_last
:
False
batch_size_per_card
:
1
# must be 1
num_workers
:
2
configs/det/ch_ppocr_v2.0/ch_det_res18_db_v2.0.yml
0 → 100644
View file @
631fd9fd
Global
:
use_gpu
:
true
epoch_num
:
1200
log_smooth_window
:
20
print_batch_step
:
2
save_model_dir
:
./output/ch_db_res18/
save_epoch_step
:
1200
# evaluation is run every 5000 iterations after the 4000th iteration
eval_batch_step
:
[
3000
,
2000
]
# if pretrained_model is saved in static mode, load_static_weights must set to True
load_static_weights
:
True
cal_metric_during_train
:
False
pretrained_model
:
./pretrain_models/ResNet18_vd_pretrained
checkpoints
:
#./output/det_db_0.001_DiceLoss_256_pp_config_2.0b_4gpu/best_accuracy
save_inference_dir
:
use_visualdl
:
False
infer_img
:
doc/imgs_en/img_10.jpg
save_res_path
:
./output/det_db/predicts_db.txt
Architecture
:
model_type
:
det
algorithm
:
DB
Transform
:
Backbone
:
name
:
ResNet
layers
:
18
disable_se
:
True
Neck
:
name
:
DBFPN
out_channels
:
256
Head
:
name
:
DBHead
k
:
50
Loss
:
name
:
DBLoss
balance_loss
:
true
main_loss_type
:
DiceLoss
alpha
:
5
beta
:
10
ohem_ratio
:
3
Optimizer
:
name
:
Adam
beta1
:
0.9
beta2
:
0.999
lr
:
name
:
Cosine
learning_rate
:
0.001
warmup_epoch
:
2
regularizer
:
name
:
'
L2'
factor
:
0
PostProcess
:
name
:
DBPostProcess
thresh
:
0.3
box_thresh
:
0.6
max_candidates
:
1000
unclip_ratio
:
1.5
Metric
:
name
:
DetMetric
main_indicator
:
hmean
Train
:
dataset
:
name
:
SimpleDataSet
data_dir
:
./train_data/icdar2015/text_localization/
label_file_list
:
-
./train_data/icdar2015/text_localization/train_icdar2015_label.txt
ratio_list
:
[
1.0
]
transforms
:
-
DecodeImage
:
# load image
img_mode
:
BGR
channel_first
:
False
-
DetLabelEncode
:
# Class handling label
-
IaaAugment
:
augmenter_args
:
-
{
'
type'
:
Fliplr
,
'
args'
:
{
'
p'
:
0.5
}
}
-
{
'
type'
:
Affine
,
'
args'
:
{
'
rotate'
:
[
-10
,
10
]
}
}
-
{
'
type'
:
Resize
,
'
args'
:
{
'
size'
:
[
0.5
,
3
]
}
}
-
EastRandomCropData
:
size
:
[
960
,
960
]
max_tries
:
50
keep_ratio
:
true
-
MakeBorderMap
:
shrink_ratio
:
0.4
thresh_min
:
0.3
thresh_max
:
0.7
-
MakeShrinkMap
:
shrink_ratio
:
0.4
min_text_size
:
8
-
NormalizeImage
:
scale
:
1./255.
mean
:
[
0.485
,
0.456
,
0.406
]
std
:
[
0.229
,
0.224
,
0.225
]
order
:
'
hwc'
-
ToCHWImage
:
-
KeepKeys
:
keep_keys
:
[
'
image'
,
'
threshold_map'
,
'
threshold_mask'
,
'
shrink_map'
,
'
shrink_mask'
]
# the order of the dataloader list
loader
:
shuffle
:
True
drop_last
:
False
batch_size_per_card
:
8
num_workers
:
4
Eval
:
dataset
:
name
:
SimpleDataSet
data_dir
:
./train_data/icdar2015/text_localization/
label_file_list
:
-
./train_data/icdar2015/text_localization/test_icdar2015_label.txt
transforms
:
-
DecodeImage
:
# load image
img_mode
:
BGR
channel_first
:
False
-
DetLabelEncode
:
# Class handling label
-
DetResizeForTest
:
# image_shape: [736, 1280]
-
NormalizeImage
:
scale
:
1./255.
mean
:
[
0.485
,
0.456
,
0.406
]
std
:
[
0.229
,
0.224
,
0.225
]
order
:
'
hwc'
-
ToCHWImage
:
-
KeepKeys
:
keep_keys
:
[
'
image'
,
'
shape'
,
'
polys'
,
'
ignore_tags'
]
loader
:
shuffle
:
False
drop_last
:
False
batch_size_per_card
:
1
# must be 1
num_workers
:
2
configs/det/det_mv3_db.yml
View file @
631fd9fd
...
...
@@ -45,9 +45,7 @@ Optimizer:
beta1
:
0.9
beta2
:
0.999
lr
:
# name: Cosine
learning_rate
:
0.001
# warmup_epoch: 0
regularizer
:
name
:
'
L2'
factor
:
0
...
...
configs/det/det_mv3_east.yml
0 → 100644
View file @
631fd9fd
Global
:
use_gpu
:
true
epoch_num
:
10000
log_smooth_window
:
20
print_batch_step
:
2
save_model_dir
:
./output/east_mv3/
save_epoch_step
:
1000
# evaluation is run every 5000 iterations after the 4000th iteration
eval_batch_step
:
[
4000
,
5000
]
# if pretrained_model is saved in static mode, load_static_weights must set to True
load_static_weights
:
True
cal_metric_during_train
:
False
pretrained_model
:
./pretrain_models/MobileNetV3_large_x0_5_pretrained
checkpoints
:
save_inference_dir
:
use_visualdl
:
False
infer_img
:
save_res_path
:
./output/det_east/predicts_east.txt
Architecture
:
model_type
:
det
algorithm
:
EAST
Transform
:
Backbone
:
name
:
MobileNetV3
scale
:
0.5
model_name
:
large
Neck
:
name
:
EASTFPN
model_name
:
small
Head
:
name
:
EASTHead
model_name
:
small
Loss
:
name
:
EASTLoss
Optimizer
:
name
:
Adam
beta1
:
0.9
beta2
:
0.999
lr
:
# name: Cosine
learning_rate
:
0.001
# warmup_epoch: 0
regularizer
:
name
:
'
L2'
factor
:
0
PostProcess
:
name
:
EASTPostProcess
score_thresh
:
0.8
cover_thresh
:
0.1
nms_thresh
:
0.2
Metric
:
name
:
DetMetric
main_indicator
:
hmean
Train
:
dataset
:
name
:
SimpleDataSet
data_dir
:
./train_data/icdar2015/text_localization/
label_file_list
:
-
./train_data/icdar2015/text_localization/train_icdar2015_label.txt
ratio_list
:
[
1.0
]
transforms
:
-
DecodeImage
:
# load image
img_mode
:
BGR
channel_first
:
False
-
DetLabelEncode
:
# Class handling label
-
EASTProcessTrain
:
image_shape
:
[
512
,
512
]
background_ratio
:
0.125
min_crop_side_ratio
:
0.1
min_text_size
:
10
-
KeepKeys
:
keep_keys
:
[
'
image'
,
'
score_map'
,
'
geo_map'
,
'
training_mask'
]
# dataloader will return list in this order
loader
:
shuffle
:
True
drop_last
:
False
batch_size_per_card
:
16
num_workers
:
8
Eval
:
dataset
:
name
:
SimpleDataSet
data_dir
:
./train_data/icdar2015/text_localization/
label_file_list
:
-
./train_data/icdar2015/text_localization/test_icdar2015_label.txt
transforms
:
-
DecodeImage
:
# load image
img_mode
:
BGR
channel_first
:
False
-
DetLabelEncode
:
# Class handling label
-
DetResizeForTest
:
limit_side_len
:
2400
limit_type
:
max
-
NormalizeImage
:
scale
:
1./255.
mean
:
[
0.485
,
0.456
,
0.406
]
std
:
[
0.229
,
0.224
,
0.225
]
order
:
'
hwc'
-
ToCHWImage
:
-
KeepKeys
:
keep_keys
:
[
'
image'
,
'
shape'
,
'
polys'
,
'
ignore_tags'
]
loader
:
shuffle
:
False
drop_last
:
False
batch_size_per_card
:
1
# must be 1
num_workers
:
2
\ No newline at end of file
configs/det/det_r50_vd_db.yml
0 → 100644
View file @
631fd9fd
Global
:
use_gpu
:
true
epoch_num
:
1200
log_smooth_window
:
20
print_batch_step
:
10
save_model_dir
:
./output/det_rc/det_r50_vd/
save_epoch_step
:
1200
# evaluation is run every 5000 iterations after the 4000th iteration
eval_batch_step
:
[
5000
,
4000
]
# if pretrained_model is saved in static mode, load_static_weights must set to True
load_static_weights
:
True
cal_metric_during_train
:
False
pretrained_model
:
./pretrain_models/ResNet50_vd_ssld_pretrained
checkpoints
:
save_inference_dir
:
use_visualdl
:
False
infer_img
:
doc/imgs_en/img_10.jpg
save_res_path
:
./output/det_db/predicts_db.txt
Architecture
:
model_type
:
det
algorithm
:
DB
Transform
:
Backbone
:
name
:
ResNet
layers
:
50
Neck
:
name
:
DBFPN
out_channels
:
256
Head
:
name
:
DBHead
k
:
50
Loss
:
name
:
DBLoss
balance_loss
:
true
main_loss_type
:
DiceLoss
alpha
:
5
beta
:
10
ohem_ratio
:
3
Optimizer
:
name
:
Adam
beta1
:
0.9
beta2
:
0.999
lr
:
learning_rate
:
0.001
regularizer
:
name
:
'
L2'
factor
:
0
PostProcess
:
name
:
DBPostProcess
thresh
:
0.3
box_thresh
:
0.7
max_candidates
:
1000
unclip_ratio
:
1.5
Metric
:
name
:
DetMetric
main_indicator
:
hmean
Train
:
dataset
:
name
:
SimpleDataSet
data_dir
:
./train_data/icdar2015/text_localization/
label_file_list
:
-
./train_data/icdar2015/text_localization/train_icdar2015_label.txt
ratio_list
:
[
0.5
]
transforms
:
-
DecodeImage
:
# load image
img_mode
:
BGR
channel_first
:
False
-
DetLabelEncode
:
# Class handling label
-
IaaAugment
:
augmenter_args
:
-
{
'
type'
:
Fliplr
,
'
args'
:
{
'
p'
:
0.5
}
}
-
{
'
type'
:
Affine
,
'
args'
:
{
'
rotate'
:
[
-10
,
10
]
}
}
-
{
'
type'
:
Resize
,
'
args'
:
{
'
size'
:
[
0.5
,
3
]
}
}
-
EastRandomCropData
:
size
:
[
640
,
640
]
max_tries
:
50
keep_ratio
:
true
-
MakeBorderMap
:
shrink_ratio
:
0.4
thresh_min
:
0.3
thresh_max
:
0.7
-
MakeShrinkMap
:
shrink_ratio
:
0.4
min_text_size
:
8
-
NormalizeImage
:
scale
:
1./255.
mean
:
[
0.485
,
0.456
,
0.406
]
std
:
[
0.229
,
0.224
,
0.225
]
order
:
'
hwc'
-
ToCHWImage
:
-
KeepKeys
:
keep_keys
:
[
'
image'
,
'
threshold_map'
,
'
threshold_mask'
,
'
shrink_map'
,
'
shrink_mask'
]
# the order of the dataloader list
loader
:
shuffle
:
True
drop_last
:
False
batch_size_per_card
:
16
num_workers
:
8
Eval
:
dataset
:
name
:
SimpleDataSet
data_dir
:
./train_data/icdar2015/text_localization/
label_file_list
:
-
./train_data/icdar2015/text_localization/test_icdar2015_label.txt
transforms
:
-
DecodeImage
:
# load image
img_mode
:
BGR
channel_first
:
False
-
DetLabelEncode
:
# Class handling label
-
DetResizeForTest
:
image_shape
:
[
736
,
1280
]
-
NormalizeImage
:
scale
:
1./255.
mean
:
[
0.485
,
0.456
,
0.406
]
std
:
[
0.229
,
0.224
,
0.225
]
order
:
'
hwc'
-
ToCHWImage
:
-
KeepKeys
:
keep_keys
:
[
'
image'
,
'
shape'
,
'
polys'
,
'
ignore_tags'
]
loader
:
shuffle
:
False
drop_last
:
False
batch_size_per_card
:
1
# must be 1
num_workers
:
8
\ No newline at end of file
configs/det/det_r50_vd_east.yml
0 → 100644
View file @
631fd9fd
Global
:
use_gpu
:
true
epoch_num
:
10000
log_smooth_window
:
20
print_batch_step
:
2
save_model_dir
:
./output/east_r50_vd/
save_epoch_step
:
1000
# evaluation is run every 5000 iterations after the 4000th iteration
eval_batch_step
:
[
4000
,
5000
]
# if pretrained_model is saved in static mode, load_static_weights must set to True
load_static_weights
:
True
cal_metric_during_train
:
False
pretrained_model
:
./pretrain_models/ResNet50_vd_pretrained/
checkpoints
:
save_inference_dir
:
use_visualdl
:
False
infer_img
:
save_res_path
:
./output/det_east/predicts_east.txt
Architecture
:
model_type
:
det
algorithm
:
EAST
Transform
:
Backbone
:
name
:
ResNet
layers
:
50
Neck
:
name
:
EASTFPN
model_name
:
large
Head
:
name
:
EASTHead
model_name
:
large
Loss
:
name
:
EASTLoss
Optimizer
:
name
:
Adam
beta1
:
0.9
beta2
:
0.999
lr
:
# name: Cosine
learning_rate
:
0.001
# warmup_epoch: 0
regularizer
:
name
:
'
L2'
factor
:
0
PostProcess
:
name
:
EASTPostProcess
score_thresh
:
0.8
cover_thresh
:
0.1
nms_thresh
:
0.2
Metric
:
name
:
DetMetric
main_indicator
:
hmean
Train
:
dataset
:
name
:
SimpleDataSet
data_dir
:
./train_data/icdar2015/text_localization/
label_file_list
:
-
./train_data/icdar2015/text_localization/train_icdar2015_label.txt
ratio_list
:
[
1.0
]
transforms
:
-
DecodeImage
:
# load image
img_mode
:
BGR
channel_first
:
False
-
DetLabelEncode
:
# Class handling label
-
EASTProcessTrain
:
image_shape
:
[
512
,
512
]
background_ratio
:
0.125
min_crop_side_ratio
:
0.1
min_text_size
:
10
-
KeepKeys
:
keep_keys
:
[
'
image'
,
'
score_map'
,
'
geo_map'
,
'
training_mask'
]
# dataloader will return list in this order
loader
:
shuffle
:
True
drop_last
:
False
batch_size_per_card
:
8
num_workers
:
8
Eval
:
dataset
:
name
:
SimpleDataSet
data_dir
:
./train_data/icdar2015/text_localization/
label_file_list
:
-
./train_data/icdar2015/text_localization/test_icdar2015_label.txt
transforms
:
-
DecodeImage
:
# load image
img_mode
:
BGR
channel_first
:
False
-
DetLabelEncode
:
# Class handling label
-
DetResizeForTest
:
limit_side_len
:
2400
limit_type
:
max
-
NormalizeImage
:
scale
:
1./255.
mean
:
[
0.485
,
0.456
,
0.406
]
std
:
[
0.229
,
0.224
,
0.225
]
order
:
'
hwc'
-
ToCHWImage
:
-
KeepKeys
:
keep_keys
:
[
'
image'
,
'
shape'
,
'
polys'
,
'
ignore_tags'
]
loader
:
shuffle
:
False
drop_last
:
False
batch_size_per_card
:
1
# must be 1
num_workers
:
2
\ No newline at end of file
configs/det/det_r50_vd_sast_icdar15.yml
0 → 100644
View file @
631fd9fd
Global
:
use_gpu
:
true
epoch_num
:
5000
log_smooth_window
:
20
print_batch_step
:
2
save_model_dir
:
./output/sast_r50_vd_ic15/
save_epoch_step
:
1000
# evaluation is run every 5000 iterations after the 4000th iteration
eval_batch_step
:
[
4000
,
5000
]
# if pretrained_model is saved in static mode, load_static_weights must set to True
load_static_weights
:
True
cal_metric_during_train
:
False
pretrained_model
:
./pretrain_models/ResNet50_vd_ssld_pretrained/
checkpoints
:
save_inference_dir
:
use_visualdl
:
False
infer_img
:
save_res_path
:
./output/sast_r50_vd_ic15/predicts_sast.txt
Architecture
:
model_type
:
det
algorithm
:
SAST
Transform
:
Backbone
:
name
:
ResNet_SAST
layers
:
50
Neck
:
name
:
SASTFPN
with_cab
:
True
Head
:
name
:
SASTHead
Loss
:
name
:
SASTLoss
Optimizer
:
name
:
Adam
beta1
:
0.9
beta2
:
0.999
lr
:
# name: Cosine
learning_rate
:
0.001
# warmup_epoch: 0
regularizer
:
name
:
'
L2'
factor
:
0
PostProcess
:
name
:
SASTPostProcess
score_thresh
:
0.5
sample_pts_num
:
2
nms_thresh
:
0.2
expand_scale
:
1.0
shrink_ratio_of_width
:
0.3
Metric
:
name
:
DetMetric
main_indicator
:
hmean
Train
:
dataset
:
name
:
SimpleDataSet
data_dir
:
./train_data/
label_file_path
:
[
./train_data/art_latin_icdar_14pt/train_no_tt_test/train_label_json.txt
,
./train_data/total_text_icdar_14pt/train_label_json.txt
]
data_ratio_list
:
[
0.5
,
0.5
]
transforms
:
-
DecodeImage
:
# load image
img_mode
:
BGR
channel_first
:
False
-
DetLabelEncode
:
# Class handling label
-
SASTProcessTrain
:
image_shape
:
[
512
,
512
]
min_crop_side_ratio
:
0.3
min_crop_size
:
24
min_text_size
:
4
max_text_size
:
512
-
KeepKeys
:
keep_keys
:
[
'
image'
,
'
score_map'
,
'
border_map'
,
'
training_mask'
,
'
tvo_map'
,
'
tco_map'
]
# dataloader will return list in this order
loader
:
shuffle
:
True
drop_last
:
False
batch_size_per_card
:
4
num_workers
:
4
Eval
:
dataset
:
name
:
SimpleDataSet
data_dir
:
./train_data/icdar2015/text_localization/
label_file_list
:
-
./train_data/icdar2015/text_localization/test_icdar2015_label.txt
transforms
:
-
DecodeImage
:
# load image
img_mode
:
BGR
channel_first
:
False
-
DetLabelEncode
:
# Class handling label
-
DetResizeForTest
:
resize_long
:
1536
-
NormalizeImage
:
scale
:
1./255.
mean
:
[
0.485
,
0.456
,
0.406
]
std
:
[
0.229
,
0.224
,
0.225
]
order
:
'
hwc'
-
ToCHWImage
:
-
KeepKeys
:
keep_keys
:
[
'
image'
,
'
shape'
,
'
polys'
,
'
ignore_tags'
]
loader
:
shuffle
:
False
drop_last
:
False
batch_size_per_card
:
1
# must be 1
num_workers
:
2
\ No newline at end of file
configs/det/det_r50_vd_sast_totaltext.yml
0 → 100644
View file @
631fd9fd
Global
:
use_gpu
:
true
epoch_num
:
5000
log_smooth_window
:
20
print_batch_step
:
2
save_model_dir
:
./output/sast_r50_vd_tt/
save_epoch_step
:
1000
# evaluation is run every 5000 iterations after the 4000th iteration
eval_batch_step
:
[
4000
,
5000
]
# if pretrained_model is saved in static mode, load_static_weights must set to True
load_static_weights
:
True
cal_metric_during_train
:
False
pretrained_model
:
./pretrain_models/ResNet50_vd_ssld_pretrained/
checkpoints
:
save_inference_dir
:
use_visualdl
:
False
infer_img
:
save_res_path
:
./output/sast_r50_vd_tt/predicts_sast.txt
Architecture
:
model_type
:
det
algorithm
:
SAST
Transform
:
Backbone
:
name
:
ResNet_SAST
layers
:
50
Neck
:
name
:
SASTFPN
with_cab
:
True
Head
:
name
:
SASTHead
Loss
:
name
:
SASTLoss
Optimizer
:
name
:
Adam
beta1
:
0.9
beta2
:
0.999
lr
:
# name: Cosine
learning_rate
:
0.001
# warmup_epoch: 0
regularizer
:
name
:
'
L2'
factor
:
0
PostProcess
:
name
:
SASTPostProcess
score_thresh
:
0.5
sample_pts_num
:
6
nms_thresh
:
0.2
expand_scale
:
1.2
shrink_ratio_of_width
:
0.2
Metric
:
name
:
DetMetric
main_indicator
:
hmean
Train
:
dataset
:
name
:
SimpleDataSet
label_file_list
:
[
./train_data/icdar2013/train_label_json.txt
,
./train_data/icdar2015/train_label_json.txt
,
./train_data/icdar17_mlt_latin/train_label_json.txt
,
./train_data/coco_text_icdar_4pts/train_label_json.txt
]
ratio_list
:
[
0.1
,
0.45
,
0.3
,
0.15
]
transforms
:
-
DecodeImage
:
# load image
img_mode
:
BGR
channel_first
:
False
-
DetLabelEncode
:
# Class handling label
-
SASTProcessTrain
:
image_shape
:
[
512
,
512
]
min_crop_side_ratio
:
0.3
min_crop_size
:
24
min_text_size
:
4
max_text_size
:
512
-
KeepKeys
:
keep_keys
:
[
'
image'
,
'
score_map'
,
'
border_map'
,
'
training_mask'
,
'
tvo_map'
,
'
tco_map'
]
# dataloader will return list in this order
loader
:
shuffle
:
True
drop_last
:
False
batch_size_per_card
:
4
num_workers
:
4
Eval
:
dataset
:
name
:
SimpleDataSet
data_dir
:
./train_data/
label_file_list
:
-
./train_data/total_text_icdar_14pt/test_label_json.txt
transforms
:
-
DecodeImage
:
# load image
img_mode
:
BGR
channel_first
:
False
-
DetLabelEncode
:
# Class handling label
-
DetResizeForTest
:
resize_long
:
768
-
NormalizeImage
:
scale
:
1./255.
mean
:
[
0.485
,
0.456
,
0.406
]
std
:
[
0.229
,
0.224
,
0.225
]
order
:
'
hwc'
-
ToCHWImage
:
-
KeepKeys
:
keep_keys
:
[
'
image'
,
'
shape'
,
'
polys'
,
'
ignore_tags'
]
loader
:
shuffle
:
False
drop_last
:
False
batch_size_per_card
:
1
# must be 1
num_workers
:
2
\ No newline at end of file
configs/rec/ch_ppocr_v
1.1
/rec_chinese_common_train_v
1.1
.yaml
→
configs/rec/ch_ppocr_v
2.0
/rec_chinese_common_train_v
2.0
.yaml
View file @
631fd9fd
...
...
@@ -3,7 +3,7 @@ Global:
epoch_num
:
500
log_smooth_window
:
20
print_batch_step
:
10
save_model_dir
:
./output/rec_chinese_common_v
1.1
save_model_dir
:
./output/rec_chinese_common_v
2.0
save_epoch_step
:
3
# evaluation is run every 5000 iterations after the 4000th iteration
eval_batch_step
:
[
0
,
2000
]
...
...
configs/rec/ch_ppocr_v
1.1
/rec_chinese_lite_train_v
1.1
.yaml
→
configs/rec/ch_ppocr_v
2.0
/rec_chinese_lite_train_v
2.0
.yaml
View file @
631fd9fd
...
...
@@ -3,7 +3,7 @@ Global:
epoch_num
:
500
log_smooth_window
:
20
print_batch_step
:
10
save_model_dir
:
./output/rec_chinese_lite_v
1.1
save_model_dir
:
./output/rec_chinese_lite_v
2.0
save_epoch_step
:
3
# evaluation is run every 5000 iterations after the 4000th iteration
eval_batch_step
:
[
0
,
2000
]
...
...
@@ -19,7 +19,7 @@ Global:
character_type
:
ch
max_text_length
:
25
infer_mode
:
False
use_space_char
:
Fals
e
use_space_char
:
Tru
e
Optimizer
:
...
...
configs/rec/multi_language/rec_en_number_lite_train.yml
View file @
631fd9fd
Global
:
use_gpu
:
t
rue
use_gpu
:
T
rue
epoch_num
:
500
log_smooth_window
:
20
print_batch_step
:
10
...
...
@@ -15,7 +15,7 @@ Global:
use_visualdl
:
False
infer_img
:
# for data or label process
character_dict_path
:
ppocr/utils/dict/
ic15
_dict.txt
character_dict_path
:
ppocr/utils/dict/
en
_dict.txt
character_type
:
ch
max_text_length
:
25
infer_mode
:
False
...
...
configs/rec/multi_language/rec_french_lite_train.yml
View file @
631fd9fd
Global
:
use_gpu
:
t
rue
use_gpu
:
T
rue
epoch_num
:
500
log_smooth_window
:
20
print_batch_step
:
10
...
...
@@ -9,9 +9,9 @@ Global:
eval_batch_step
:
[
0
,
2000
]
# if pretrained_model is saved in static mode, load_static_weights must set to True
cal_metric_during_train
:
True
pretrained_model
:
pretrained_model
:
checkpoints
:
save_inference_dir
:
save_inference_dir
:
use_visualdl
:
False
infer_img
:
# for data or label process
...
...
@@ -19,7 +19,7 @@ Global:
character_type
:
french
max_text_length
:
25
infer_mode
:
False
use_space_char
:
Tru
e
use_space_char
:
Fals
e
Optimizer
:
...
...
configs/rec/multi_language/rec_german_lite_train.yml
View file @
631fd9fd
Global
:
use_gpu
:
t
rue
use_gpu
:
T
rue
epoch_num
:
500
log_smooth_window
:
20
print_batch_step
:
10
...
...
@@ -19,7 +19,7 @@ Global:
character_type
:
german
max_text_length
:
25
infer_mode
:
False
use_space_char
:
Tru
e
use_space_char
:
Fals
e
Optimizer
:
...
...
configs/rec/multi_language/rec_japan_lite_train.yml
View file @
631fd9fd
Global
:
use_gpu
:
t
rue
use_gpu
:
T
rue
epoch_num
:
500
log_smooth_window
:
20
print_batch_step
:
10
...
...
@@ -19,7 +19,7 @@ Global:
character_type
:
japan
max_text_length
:
25
infer_mode
:
False
use_space_char
:
Tru
e
use_space_char
:
Fals
e
Optimizer
:
...
...
configs/rec/multi_language/rec_korean_lite_train.yml
View file @
631fd9fd
Global
:
use_gpu
:
t
rue
use_gpu
:
T
rue
epoch_num
:
500
log_smooth_window
:
20
print_batch_step
:
10
...
...
@@ -19,7 +19,7 @@ Global:
character_type
:
korean
max_text_length
:
25
infer_mode
:
False
use_space_char
:
Tru
e
use_space_char
:
Fals
e
Optimizer
:
...
...
configs/rec/rec_mv3_none_bilstm_ctc.yml
View file @
631fd9fd
...
...
@@ -5,7 +5,7 @@ Global:
print_batch_step
:
10
save_model_dir
:
./output/rec/mv3_none_bilstm_ctc/
save_epoch_step
:
3
# evaluation is run every
5
000 iterations
after the 4000th iteration
# evaluation is run every
2
000 iterations
eval_batch_step
:
[
0
,
2000
]
# if pretrained_model is saved in static mode, load_static_weights must set to True
cal_metric_during_train
:
True
...
...
@@ -13,7 +13,7 @@ Global:
checkpoints
:
save_inference_dir
:
use_visualdl
:
False
infer_img
:
doc/imgs_words
/ch
/word_1
.jp
g
infer_img
:
doc/imgs_words
_en
/word_1
0.pn
g
# for data or label process
character_dict_path
:
character_type
:
en
...
...
@@ -21,7 +21,6 @@ Global:
infer_mode
:
False
use_space_char
:
False
Optimizer
:
name
:
Adam
beta1
:
0.9
...
...
configs/rec/rec_mv3_none_none_ctc.yml
0 → 100644
View file @
631fd9fd
Global
:
use_gpu
:
True
epoch_num
:
72
log_smooth_window
:
20
print_batch_step
:
10
save_model_dir
:
./output/rec/mv3_none_none_ctc/
save_epoch_step
:
3
# evaluation is run every 2000 iterations
eval_batch_step
:
[
0
,
2000
]
# if pretrained_model is saved in static mode, load_static_weights must set to True
cal_metric_during_train
:
True
pretrained_model
:
checkpoints
:
save_inference_dir
:
use_visualdl
:
False
infer_img
:
doc/imgs_words_en/word_10.png
# for data or label process
character_dict_path
:
character_type
:
en
max_text_length
:
25
infer_mode
:
False
use_space_char
:
False
Optimizer
:
name
:
Adam
beta1
:
0.9
beta2
:
0.999
lr
:
learning_rate
:
0.0005
regularizer
:
name
:
'
L2'
factor
:
0
Architecture
:
model_type
:
rec
algorithm
:
Rosetta
Transform
:
Backbone
:
name
:
MobileNetV3
scale
:
0.5
model_name
:
large
Neck
:
name
:
SequenceEncoder
encoder_type
:
reshape
Head
:
name
:
CTCHead
fc_decay
:
0.0004
Loss
:
name
:
CTCLoss
PostProcess
:
name
:
CTCLabelDecode
Metric
:
name
:
RecMetric
main_indicator
:
acc
Train
:
dataset
:
name
:
LMDBDateSet
data_dir
:
./train_data/data_lmdb_release/training/
transforms
:
-
DecodeImage
:
# load image
img_mode
:
BGR
channel_first
:
False
-
CTCLabelEncode
:
# Class handling label
-
RecResizeImg
:
image_shape
:
[
3
,
32
,
100
]
-
KeepKeys
:
keep_keys
:
[
'
image'
,
'
label'
,
'
length'
]
# dataloader will return list in this order
loader
:
shuffle
:
False
batch_size_per_card
:
256
drop_last
:
True
num_workers
:
8
Eval
:
dataset
:
name
:
LMDBDateSet
data_dir
:
./train_data/data_lmdb_release/validation/
transforms
:
-
DecodeImage
:
# load image
img_mode
:
BGR
channel_first
:
False
-
CTCLabelEncode
:
# Class handling label
-
RecResizeImg
:
image_shape
:
[
3
,
32
,
100
]
-
KeepKeys
:
keep_keys
:
[
'
image'
,
'
label'
,
'
length'
]
# dataloader will return list in this order
loader
:
shuffle
:
False
drop_last
:
False
batch_size_per_card
:
256
num_workers
:
8
configs/rec/rec_mv3_tps_bilstm_ctc.yml
0 → 100644
View file @
631fd9fd
Global
:
use_gpu
:
true
epoch_num
:
72
log_smooth_window
:
20
print_batch_step
:
10
save_model_dir
:
./output/rec/mv3_tps_bilstm_ctc/
save_epoch_step
:
3
# evaluation is run every 2000 iterations
eval_batch_step
:
[
0
,
2000
]
# if pretrained_model is saved in static mode, load_static_weights must set to True
cal_metric_during_train
:
True
pretrained_model
:
checkpoints
:
save_inference_dir
:
use_visualdl
:
False
infer_img
:
doc/imgs_words_en/word_10.png
# for data or label process
character_dict_path
:
character_type
:
en
max_text_length
:
25
infer_mode
:
False
use_space_char
:
False
Optimizer
:
name
:
Adam
beta1
:
0.9
beta2
:
0.999
lr
:
learning_rate
:
0.0005
regularizer
:
name
:
'
L2'
factor
:
0
Architecture
:
model_type
:
rec
algorithm
:
STARNet
Transform
:
name
:
TPS
num_fiducial
:
20
loc_lr
:
0.1
model_name
:
small
Backbone
:
name
:
MobileNetV3
scale
:
0.5
model_name
:
large
Neck
:
name
:
SequenceEncoder
encoder_type
:
rnn
hidden_size
:
96
Head
:
name
:
CTCHead
fc_decay
:
0.0004
Loss
:
name
:
CTCLoss
PostProcess
:
name
:
CTCLabelDecode
Metric
:
name
:
RecMetric
main_indicator
:
acc
Train
:
dataset
:
name
:
LMDBDateSet
data_dir
:
./train_data/data_lmdb_release/training/
transforms
:
-
DecodeImage
:
# load image
img_mode
:
BGR
channel_first
:
False
-
CTCLabelEncode
:
# Class handling label
-
RecResizeImg
:
image_shape
:
[
3
,
32
,
100
]
-
KeepKeys
:
keep_keys
:
[
'
image'
,
'
label'
,
'
length'
]
# dataloader will return list in this order
loader
:
shuffle
:
False
batch_size_per_card
:
256
drop_last
:
True
num_workers
:
8
Eval
:
dataset
:
name
:
LMDBDateSet
data_dir
:
./train_data/data_lmdb_release/validation/
transforms
:
-
DecodeImage
:
# load image
img_mode
:
BGR
channel_first
:
False
-
CTCLabelEncode
:
# Class handling label
-
RecResizeImg
:
image_shape
:
[
3
,
32
,
100
]
-
KeepKeys
:
keep_keys
:
[
'
image'
,
'
label'
,
'
length'
]
# dataloader will return list in this order
loader
:
shuffle
:
False
drop_last
:
False
batch_size_per_card
:
256
num_workers
:
4
Prev
1
2
3
4
5
Next
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