Compare commits
327 Commits
release/2.
...
release/1.
| Author | SHA1 | Date |
|---|---|---|
|
|
2b16323080 | 6 years ago |
|
|
7f477619c0 | 6 years ago |
|
|
43874ba967 | 6 years ago |
|
|
d851f2c8d3 | 6 years ago |
|
|
ac1df3dbca | 6 years ago |
|
|
e4b09948d1 | 6 years ago |
|
|
280cff56dc | 6 years ago |
|
|
5da58b146c | 6 years ago |
|
|
84a49ca05b | 6 years ago |
|
|
fc512a84e3 | 6 years ago |
|
|
ccd40ec85f | 6 years ago |
|
|
8b64f4c2ea | 6 years ago |
|
|
0c8bdc0885 | 6 years ago |
|
|
e634afe76c | 6 years ago |
|
|
d0d0c4f95c | 6 years ago |
|
|
3ec7d48c0f | 6 years ago |
|
|
3218b48148 | 6 years ago |
|
|
02ae18abf9 | 6 years ago |
|
|
815f20b550 | 6 years ago |
|
|
5f8c3e07d9 | 6 years ago |
|
|
a5fbd902fe | 6 years ago |
|
|
5e25ed64a2 | 6 years ago |
|
|
47703d16ce | 6 years ago |
|
|
764d8f5fc2 | 6 years ago |
|
|
2c35dafeb5 | 6 years ago |
|
|
358182a6d1 | 6 years ago |
|
|
829fe749cc | 6 years ago |
|
|
8750361a5d | 6 years ago |
|
|
ecad10eb02 | 6 years ago |
|
|
51b57c47c7 | 6 years ago |
|
|
04c5c6ab3b | 6 years ago |
|
|
1af833e2b6 | 6 years ago |
|
|
63e4074ab4 | 6 years ago |
|
|
58e0a62799 | 6 years ago |
|
|
c320457d73 | 6 years ago |
|
|
83c420bf31 | 6 years ago |
|
|
c67d04ad6e | 6 years ago |
|
|
e11b8aff79 | 6 years ago |
|
|
43f6ab7a63 | 6 years ago |
|
|
62f85ec0bd | 6 years ago |
|
|
115b517584 | 6 years ago |
|
|
0005f4d171 | 6 years ago |
|
|
2d07a0bcb9 | 6 years ago |
|
|
5d202e44d7 | 6 years ago |
|
|
d93f006212 | 6 years ago |
|
|
9411df5ae7 | 6 years ago |
|
|
f196376249 | 6 years ago |
|
|
3a18b08fc5 | 6 years ago |
|
|
896e573975 | 6 years ago |
|
|
2dfb1cfaa1 | 6 years ago |
|
|
e266466a9a | 6 years ago |
|
|
f94ebce2f5 | 6 years ago |
|
|
29405e325d | 6 years ago |
|
|
d8b9e7a063 | 6 years ago |
|
|
10808204cd | 6 years ago |
|
|
0de72f5d97 | 6 years ago |
|
|
6e87c90486 | 6 years ago |
|
|
90f30dbeb6 | 6 years ago |
|
|
f7ae9a5fb3 | 6 years ago |
|
|
c58fb6e822 | 6 years ago |
|
|
b7e9a81a05 | 6 years ago |
|
|
1063ecbee3 | 6 years ago |
|
|
9bcba212b2 | 6 years ago |
|
|
e53c427330 | 6 years ago |
|
|
ac439ae1aa | 6 years ago |
|
|
95f820b835 | 6 years ago |
|
|
f7dbf2b702 | 6 years ago |
|
|
3a347ebc3a | 6 years ago |
|
|
a52587d91f | 6 years ago |
|
|
e5fcccc495 | 6 years ago |
|
|
7e97976ce6 | 6 years ago |
|
|
0d12338fa9 | 6 years ago |
|
|
4d1e17e70b | 6 years ago |
|
|
c4720557e8 | 6 years ago |
|
|
8ed0882996 | 6 years ago |
|
|
ac7e9dd9f2 | 6 years ago |
|
|
4a839b9d92 | 6 years ago |
|
|
60763646b9 | 6 years ago |
|
|
97c767ccfb | 6 years ago |
|
|
853f6db37d | 6 years ago |
|
|
0eab30cb17 | 6 years ago |
|
|
571275e03c | 6 years ago |
|
|
bad8211491 | 6 years ago |
|
|
6825ee4e11 | 6 years ago |
|
|
d9e005d2a7 | 6 years ago |
|
|
7cacfc97d9 | 6 years ago |
|
|
bb7eca34e7 | 6 years ago |
|
|
f37745ff7c | 6 years ago |
|
|
fa53bc3817 | 6 years ago |
|
|
72faa11b77 | 6 years ago |
|
|
89ea21bf9e | 6 years ago |
|
|
b195d7586f | 6 years ago |
|
|
667d393ecf | 6 years ago |
|
|
e8a649ab5b | 6 years ago |
|
|
580a973841 | 6 years ago |
|
|
4fb914dafe | 6 years ago |
|
|
8b74966a28 | 6 years ago |
|
|
706b25bff3 | 6 years ago |
|
|
250412a408 | 6 years ago |
|
|
0f86cebb57 | 6 years ago |
|
|
03125024cc | 6 years ago |
|
|
e10e788855 | 6 years ago |
|
|
732bb6eb21 | 6 years ago |
|
|
e8ba14955c | 6 years ago |
|
|
3f89879c19 | 6 years ago |
|
|
1cc991e5a8 | 6 years ago |
|
|
cf8bc662de | 6 years ago |
|
|
80608bd618 | 6 years ago |
|
|
a9e7c8f923 | 6 years ago |
|
|
a6db27161a | 6 years ago |
|
|
7d5ce84956 | 6 years ago |
|
|
bd2370f1b9 | 6 years ago |
|
|
6be762d6a0 | 6 years ago |
|
|
4ac63947c4 | 6 years ago |
|
|
de05f4fa43 | 6 years ago |
|
|
0a6537845b | 6 years ago |
|
|
e5d7571503 | 6 years ago |
|
|
3d11aba92d | 6 years ago |
|
|
d8ac92cdad | 6 years ago |
|
|
03960fde89 | 6 years ago |
|
|
c66b97f840 | 6 years ago |
|
|
1614282b23 | 6 years ago |
|
|
96c2e3f136 | 6 years ago |
|
|
3b286e70c3 | 6 years ago |
|
|
6af341a37b | 6 years ago |
|
|
f4d826a5f3 | 6 years ago |
|
|
a0f13f4340 | 6 years ago |
|
|
f6408e11e1 | 6 years ago |
|
|
25d7eb87c2 | 6 years ago |
|
|
bcc8f208ec | 6 years ago |
|
|
a38de9bdbe | 6 years ago |
|
|
278530239d | 6 years ago |
|
|
b578edd6a1 | 6 years ago |
|
|
6ac1497a31 | 6 years ago |
|
|
3e3d06b606 | 6 years ago |
|
|
16352beb89 | 6 years ago |
|
|
f57e23a902 | 6 years ago |
|
|
75fde81704 | 6 years ago |
|
|
e086071da2 | 6 years ago |
|
|
36fbabb108 | 6 years ago |
|
|
f0ce9b90ef | 6 years ago |
|
|
706cfe8391 | 6 years ago |
|
|
7831f18b08 | 6 years ago |
|
|
954c3313d2 | 6 years ago |
|
|
d7080099e9 | 6 years ago |
|
|
bc7dd36e0e | 6 years ago |
|
|
afc752248b | 6 years ago |
|
|
e600d787f5 | 6 years ago |
|
|
dcbc20e20e | 6 years ago |
|
|
28cfb93df5 | 6 years ago |
|
|
6b35afb50a | 6 years ago |
|
|
47f9972a20 | 6 years ago |
|
|
5fa8b5c666 | 6 years ago |
|
|
e01a4b623d | 6 years ago |
|
|
15be2fb979 | 6 years ago |
|
|
0439dfb112 | 6 years ago |
|
|
2681ad5f90 | 6 years ago |
|
|
8e90a40547 | 6 years ago |
|
|
9028077999 | 6 years ago |
|
|
17e722de59 | 6 years ago |
|
|
3fb28d2a87 | 6 years ago |
|
|
9228a49342 | 6 years ago |
|
|
f4d2ebcb3a | 6 years ago |
|
|
3dce09ead4 | 6 years ago |
|
|
3d43a760e6 | 6 years ago |
|
|
136ff79047 | 6 years ago |
|
|
1a19bce923 | 6 years ago |
|
|
d181c7a3ed | 6 years ago |
|
|
b254cdb73a | 6 years ago |
|
|
fb2c33bcb1 | 6 years ago |
|
|
d6b83901fc | 6 years ago |
|
|
bb873ce14d | 6 years ago |
|
|
f3bac1b981 | 6 years ago |
|
|
0983ca7ad2 | 6 years ago |
|
|
3cfffcb5c5 | 6 years ago |
|
|
21d0869b6e | 6 years ago |
|
|
30648fbc84 | 6 years ago |
|
|
60967e8b77 | 6 years ago |
|
|
9295e25091 | 6 years ago |
|
|
c762ca4707 | 6 years ago |
|
|
17e5df1de3 | 6 years ago |
|
|
d53dcb225e | 6 years ago |
|
|
5ea014f5bf | 6 years ago |
|
|
fe35728b7d | 6 years ago |
|
|
a8c8ec1f82 | 6 years ago |
|
|
0f8dc0a622 | 6 years ago |
|
|
1ee51e2f56 | 6 years ago |
|
|
3872da8de0 | 6 years ago |
|
|
bf60c4e7e3 | 6 years ago |
|
|
64ae0c4e38 | 6 years ago |
|
|
7cfc0b910b | 6 years ago |
|
|
ad1aca64d3 | 6 years ago |
|
|
72e4f3643b | 6 years ago |
|
|
eef60848ba | 6 years ago |
|
|
d64a4c3f6d | 6 years ago |
|
|
f27b7edd99 | 6 years ago |
|
|
37f5ff9696 | 6 years ago |
|
|
dc0aea4ec3 | 6 years ago |
|
|
1a024c69c7 | 6 years ago |
|
|
edd4c33f4a | 6 years ago |
|
|
b287673a0b | 6 years ago |
|
|
2a03948d7c | 6 years ago |
|
|
2ee7dcb53a | 6 years ago |
|
|
7a45786ab7 | 6 years ago |
|
|
1392c9c477 | 6 years ago |
|
|
ad545e52f2 | 6 years ago |
|
|
24dfd8b2b2 | 6 years ago |
|
|
de5c741a91 | 6 years ago |
|
|
b6289d0eb0 | 6 years ago |
|
|
77cd8c1e66 | 6 years ago |
|
|
0d17196f94 | 6 years ago |
|
|
84576471c3 | 6 years ago |
|
|
1fd763f89b | 6 years ago |
|
|
8e53734f35 | 6 years ago |
|
|
235b3aff8e | 6 years ago |
|
|
e9a39e2d27 | 6 years ago |
|
|
ae68afd622 | 6 years ago |
|
|
06feb23dff | 6 years ago |
|
|
821149e090 | 6 years ago |
|
|
98c01dabce | 6 years ago |
|
|
2b68ae333a | 6 years ago |
|
|
b063599418 | 6 years ago |
|
|
3942482e2d | 6 years ago |
|
|
78a428dce6 | 6 years ago |
|
|
aee0a1fe96 | 6 years ago |
|
|
be6e69a84f | 6 years ago |
|
|
f1c4f413be | 6 years ago |
|
|
aafa88db70 | 6 years ago |
|
|
a6ccaa513e | 6 years ago |
|
|
cf054cffc1 | 6 years ago |
|
|
f9170fcfce | 6 years ago |
|
|
289bf76067 | 6 years ago |
|
|
9958fdde66 | 6 years ago |
|
|
f415f5fcb6 | 6 years ago |
|
|
cf7372475e | 6 years ago |
|
|
3e1d8f2dee | 6 years ago |
|
|
9cd6e11b3e | 6 years ago |
|
|
a63d91c83f | 6 years ago |
|
|
4d816b6149 | 6 years ago |
|
|
4559f16ec7 | 6 years ago |
|
|
867a60f474 | 6 years ago |
|
|
4a81e9481c | 6 years ago |
|
|
1edfc308b1 | 6 years ago |
|
|
cf2a483369 | 6 years ago |
|
|
06430c9359 | 6 years ago |
|
|
b10bd395c9 | 6 years ago |
|
|
d4c47e2f50 | 6 years ago |
|
|
b479372cd3 | 6 years ago |
|
|
2cdf7a666e | 6 years ago |
|
|
76b8bb7ef1 | 6 years ago |
|
|
e01515599b | 6 years ago |
|
|
e3ac559430 | 6 years ago |
|
|
79180223dc | 6 years ago |
|
|
df14801b43 | 6 years ago |
|
|
c5f9b69c4e | 6 years ago |
|
|
ede5a3f4b6 | 6 years ago |
|
|
b8ed953142 | 6 years ago |
|
|
42f0219cda | 6 years ago |
|
|
bf60cd827b | 6 years ago |
|
|
a3dee6a4b1 | 6 years ago |
|
|
b8bf9b2c66 | 6 years ago |
|
|
fd76c1234b | 6 years ago |
|
|
6b906ad239 | 6 years ago |
|
|
27384a5a5d | 6 years ago |
|
|
ecba3f85d6 | 6 years ago |
|
|
5b5b72e651 | 6 years ago |
|
|
594d34f5ed | 6 years ago |
|
|
cb1cc43259 | 6 years ago |
|
|
227f5f3a36 | 6 years ago |
|
|
d9d51f7daf | 6 years ago |
|
|
0da95ed13b | 6 years ago |
|
|
5d248b168f | 6 years ago |
|
|
99f253bc41 | 6 years ago |
|
|
c7819af417 | 6 years ago |
|
|
25ff7eb517 | 6 years ago |
|
|
f8e01b2ea7 | 6 years ago |
|
|
00a889e166 | 6 years ago |
|
|
a88764eae4 | 6 years ago |
|
|
dbbfe96761 | 6 years ago |
|
|
2aa0c8eb2d | 6 years ago |
|
|
5858441b3d | 6 years ago |
|
|
f78678dd66 | 6 years ago |
|
|
74f983d182 | 6 years ago |
|
|
a7e915bf7b | 6 years ago |
|
|
d4f1758d55 | 6 years ago |
|
|
14dfa73e07 | 6 years ago |
|
|
2ac3ec96f4 | 6 years ago |
|
|
eafa136cf1 | 6 years ago |
|
|
2c6f0b0d55 | 6 years ago |
|
|
f3f2b38efb | 6 years ago |
|
|
03979d71d2 | 6 years ago |
|
|
742cb9a3c6 | 6 years ago |
|
|
74f6a5cb3d | 6 years ago |
|
|
144b022fb6 | 6 years ago |
|
|
ed6b2f0c71 | 6 years ago |
|
|
fc9933354d | 6 years ago |
|
|
d31effaf97 | 6 years ago |
|
|
5fb3c419c9 | 6 years ago |
|
|
5fc9fff98f | 6 years ago |
|
|
29e2fed39c | 6 years ago |
|
|
f265f94c65 | 6 years ago |
|
|
aa7e9ac34e | 6 years ago |
|
|
bc1ad20701 | 6 years ago |
|
|
21af7660b5 | 6 years ago |
|
|
7165f5899d | 6 years ago |
|
|
4009fcf3d0 | 6 years ago |
|
|
3ebf46dae6 | 6 years ago |
|
|
f76ef16e9f | 6 years ago |
|
|
567c74c508 | 6 years ago |
|
|
54d562bfd9 | 6 years ago |
|
|
c75ad203e9 | 6 years ago |
|
|
e33026f38a | 6 years ago |
|
|
78f894f607 | 6 years ago |
|
|
725b17a111 | 6 years ago |
|
|
e11b2108fa | 6 years ago |
|
|
f7cf83eab3 | 6 years ago |
|
|
7bfbbe47bc | 6 years ago |
|
|
bf9833bd94 | 6 years ago |
|
|
935966a2c2 | 6 years ago |
|
|
e0bf9c9cfa | 6 years ago |
|
|
fef18931bd | 6 years ago |
|
|
f893d5bb86 | 6 years ago |
|
|
ff6ba9edcc | 6 years ago |
|
|
6887a320a5 | 6 years ago |
|
|
ea91f26f06 | 6 years ago |
|
|
59cdce6a88 | 6 years ago |
|
|
91341b81bd | 6 years ago |
@ -0,0 +1,44 @@
|
||||
Global:
|
||||
algorithm: CLS
|
||||
use_gpu: False
|
||||
epoch_num: 100
|
||||
log_smooth_window: 20
|
||||
print_batch_step: 100
|
||||
save_model_dir: output/cls_mv3
|
||||
save_epoch_step: 3
|
||||
eval_batch_step: 500
|
||||
train_batch_size_per_card: 512
|
||||
test_batch_size_per_card: 512
|
||||
image_shape: [3, 48, 192]
|
||||
label_list: ['0','180']
|
||||
distort: True
|
||||
reader_yml: ./configs/cls/cls_reader.yml
|
||||
pretrain_weights:
|
||||
checkpoints:
|
||||
save_inference_dir:
|
||||
infer_img:
|
||||
|
||||
Architecture:
|
||||
function: ppocr.modeling.architectures.cls_model,ClsModel
|
||||
|
||||
Backbone:
|
||||
function: ppocr.modeling.backbones.rec_mobilenet_v3,MobileNetV3
|
||||
scale: 0.35
|
||||
model_name: small
|
||||
|
||||
Head:
|
||||
function: ppocr.modeling.heads.cls_head,ClsHead
|
||||
class_dim: 2
|
||||
|
||||
Loss:
|
||||
function: ppocr.modeling.losses.cls_loss,ClsLoss
|
||||
|
||||
Optimizer:
|
||||
function: ppocr.optimizer,AdamDecay
|
||||
base_lr: 0.001
|
||||
beta1: 0.9
|
||||
beta2: 0.999
|
||||
decay:
|
||||
function: cosine_decay
|
||||
step_each_epoch: 1169
|
||||
total_epoch: 100
|
||||
@ -0,0 +1,13 @@
|
||||
TrainReader:
|
||||
reader_function: ppocr.data.cls.dataset_traversal,SimpleReader
|
||||
num_workers: 8
|
||||
img_set_dir: ./train_data/cls
|
||||
label_file_path: ./train_data/cls/train.txt
|
||||
|
||||
EvalReader:
|
||||
reader_function: ppocr.data.cls.dataset_traversal,SimpleReader
|
||||
img_set_dir: ./train_data/cls
|
||||
label_file_path: ./train_data/cls/test.txt
|
||||
|
||||
TestReader:
|
||||
reader_function: ppocr.data.cls.dataset_traversal,SimpleReader
|
||||
@ -0,0 +1,59 @@
|
||||
Global:
|
||||
algorithm: DB
|
||||
use_gpu: true
|
||||
epoch_num: 1200
|
||||
log_smooth_window: 20
|
||||
print_batch_step: 2
|
||||
save_model_dir: ./output/det_db/
|
||||
save_epoch_step: 200
|
||||
# evaluation is run every 5000 iterations after the 4000th iteration
|
||||
eval_batch_step: [4000, 5000]
|
||||
train_batch_size_per_card: 16
|
||||
test_batch_size_per_card: 16
|
||||
image_shape: [3, 640, 640]
|
||||
reader_yml: ./configs/det/det_db_icdar15_reader.yml
|
||||
pretrain_weights: ./pretrain_models/MobileNetV3_large_x0_5_pretrained/
|
||||
checkpoints:
|
||||
save_res_path: ./output/det_db/predicts_db.txt
|
||||
save_inference_dir:
|
||||
|
||||
Architecture:
|
||||
function: ppocr.modeling.architectures.det_model,DetModel
|
||||
|
||||
Backbone:
|
||||
function: ppocr.modeling.backbones.det_mobilenet_v3,MobileNetV3
|
||||
scale: 0.5
|
||||
model_name: large
|
||||
disable_se: true
|
||||
|
||||
Head:
|
||||
function: ppocr.modeling.heads.det_db_head,DBHead
|
||||
model_name: large
|
||||
k: 50
|
||||
inner_channels: 96
|
||||
out_channels: 2
|
||||
|
||||
Loss:
|
||||
function: ppocr.modeling.losses.det_db_loss,DBLoss
|
||||
balance_loss: true
|
||||
main_loss_type: DiceLoss
|
||||
alpha: 5
|
||||
beta: 10
|
||||
ohem_ratio: 3
|
||||
|
||||
Optimizer:
|
||||
function: ppocr.optimizer,AdamDecay
|
||||
base_lr: 0.001
|
||||
beta1: 0.9
|
||||
beta2: 0.999
|
||||
decay:
|
||||
function: cosine_decay_warmup
|
||||
step_each_epoch: 16
|
||||
total_epoch: 1200
|
||||
|
||||
PostProcess:
|
||||
function: ppocr.postprocess.db_postprocess,DBPostProcess
|
||||
thresh: 0.3
|
||||
box_thresh: 0.6
|
||||
max_candidates: 1000
|
||||
unclip_ratio: 1.5
|
||||
@ -0,0 +1,57 @@
|
||||
Global:
|
||||
algorithm: DB
|
||||
use_gpu: true
|
||||
epoch_num: 1200
|
||||
log_smooth_window: 20
|
||||
print_batch_step: 2
|
||||
save_model_dir: ./output/det_r_18_vd_db/
|
||||
save_epoch_step: 200
|
||||
eval_batch_step: [3000, 2000]
|
||||
train_batch_size_per_card: 8
|
||||
test_batch_size_per_card: 1
|
||||
image_shape: [3, 640, 640]
|
||||
reader_yml: ./configs/det/det_db_icdar15_reader.yml
|
||||
pretrain_weights: ./pretrain_models/ResNet18_vd_pretrained/
|
||||
save_res_path: ./output/det_r18_vd_db/predicts_db.txt
|
||||
checkpoints:
|
||||
save_inference_dir:
|
||||
|
||||
Architecture:
|
||||
function: ppocr.modeling.architectures.det_model,DetModel
|
||||
|
||||
Backbone:
|
||||
function: ppocr.modeling.backbones.det_resnet_vd,ResNet
|
||||
layers: 18
|
||||
|
||||
Head:
|
||||
function: ppocr.modeling.heads.det_db_head,DBHead
|
||||
model_name: large
|
||||
k: 50
|
||||
inner_channels: 256
|
||||
out_channels: 2
|
||||
|
||||
Loss:
|
||||
function: ppocr.modeling.losses.det_db_loss,DBLoss
|
||||
balance_loss: true
|
||||
main_loss_type: DiceLoss
|
||||
alpha: 5
|
||||
beta: 10
|
||||
ohem_ratio: 3
|
||||
|
||||
Optimizer:
|
||||
function: ppocr.optimizer,AdamDecay
|
||||
base_lr: 0.001
|
||||
beta1: 0.9
|
||||
beta2: 0.999
|
||||
decay:
|
||||
function: cosine_decay_warmup
|
||||
step_each_epoch: 32
|
||||
total_epoch: 1200
|
||||
|
||||
PostProcess:
|
||||
function: ppocr.postprocess.db_postprocess,DBPostProcess
|
||||
thresh: 0.3
|
||||
box_thresh: 0.6
|
||||
max_candidates: 1000
|
||||
unclip_ratio: 1.5
|
||||
|
||||
@ -0,0 +1,52 @@
|
||||
Global:
|
||||
algorithm: CRNN
|
||||
use_gpu: true
|
||||
epoch_num: 500
|
||||
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: 128
|
||||
test_batch_size_per_card: 128
|
||||
image_shape: [3, 32, 320]
|
||||
max_text_length: 25
|
||||
character_type: ch
|
||||
character_dict_path: ./ppocr/utils/ppocr_keys_v1.txt
|
||||
loss_type: ctc
|
||||
distort: true
|
||||
use_space_char: true
|
||||
reader_yml: ./configs/rec/rec_chinese_reader.yml
|
||||
pretrain_weights:
|
||||
checkpoints:
|
||||
save_inference_dir:
|
||||
infer_img:
|
||||
|
||||
Architecture:
|
||||
function: ppocr.modeling.architectures.rec_model,RecModel
|
||||
|
||||
Backbone:
|
||||
function: ppocr.modeling.backbones.rec_resnet_vd,ResNet
|
||||
layers: 34
|
||||
|
||||
Head:
|
||||
function: ppocr.modeling.heads.rec_ctc_head,CTCPredict
|
||||
encoder_type: rnn
|
||||
fc_decay: 0.00004
|
||||
SeqRNN:
|
||||
hidden_size: 256
|
||||
|
||||
Loss:
|
||||
function: ppocr.modeling.losses.rec_ctc_loss,CTCLoss
|
||||
|
||||
Optimizer:
|
||||
function: ppocr.optimizer,AdamDecay
|
||||
base_lr: 0.0005
|
||||
l2_decay: 0.00004
|
||||
beta1: 0.9
|
||||
beta2: 0.999
|
||||
decay:
|
||||
function: cosine_decay_warmup
|
||||
step_each_epoch: 254
|
||||
total_epoch: 500
|
||||
warmup_minibatch: 1000
|
||||
@ -0,0 +1,54 @@
|
||||
Global:
|
||||
algorithm: CRNN
|
||||
use_gpu: true
|
||||
epoch_num: 500
|
||||
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, 320]
|
||||
max_text_length: 25
|
||||
character_type: ch
|
||||
character_dict_path: ./ppocr/utils/ppocr_keys_v1.txt
|
||||
loss_type: ctc
|
||||
distort: true
|
||||
use_space_char: true
|
||||
reader_yml: ./configs/rec/rec_chinese_reader.yml
|
||||
pretrain_weights:
|
||||
checkpoints:
|
||||
save_inference_dir:
|
||||
infer_img:
|
||||
|
||||
Architecture:
|
||||
function: ppocr.modeling.architectures.rec_model,RecModel
|
||||
|
||||
Backbone:
|
||||
function: ppocr.modeling.backbones.rec_mobilenet_v3,MobileNetV3
|
||||
scale: 0.5
|
||||
model_name: small
|
||||
small_stride: [1, 2, 2, 2]
|
||||
|
||||
Head:
|
||||
function: ppocr.modeling.heads.rec_ctc_head,CTCPredict
|
||||
encoder_type: rnn
|
||||
fc_decay: 0.00001
|
||||
SeqRNN:
|
||||
hidden_size: 48
|
||||
|
||||
Loss:
|
||||
function: ppocr.modeling.losses.rec_ctc_loss,CTCLoss
|
||||
|
||||
Optimizer:
|
||||
function: ppocr.optimizer,AdamDecay
|
||||
base_lr: 0.0005
|
||||
l2_decay: 0.00001
|
||||
beta1: 0.9
|
||||
beta2: 0.999
|
||||
decay:
|
||||
function: cosine_decay_warmup
|
||||
step_each_epoch: 254
|
||||
total_epoch: 500
|
||||
warmup_minibatch: 1000
|
||||
@ -0,0 +1,53 @@
|
||||
Global:
|
||||
algorithm: CRNN
|
||||
use_gpu: true
|
||||
epoch_num: 500
|
||||
log_smooth_window: 20
|
||||
print_batch_step: 10
|
||||
save_model_dir: ./output/en_number
|
||||
save_epoch_step: 3
|
||||
eval_batch_step: 2000
|
||||
train_batch_size_per_card: 256
|
||||
test_batch_size_per_card: 256
|
||||
image_shape: [3, 32, 320]
|
||||
max_text_length: 30
|
||||
character_type: ch
|
||||
character_dict_path: ./ppocr/utils/ic15_dict.txt
|
||||
loss_type: ctc
|
||||
distort: false
|
||||
use_space_char: false
|
||||
reader_yml: ./configs/rec/multi_languages/rec_en_reader.yml
|
||||
pretrain_weights:
|
||||
checkpoints:
|
||||
save_inference_dir:
|
||||
infer_img:
|
||||
|
||||
Architecture:
|
||||
function: ppocr.modeling.architectures.rec_model,RecModel
|
||||
|
||||
Backbone:
|
||||
function: ppocr.modeling.backbones.rec_mobilenet_v3,MobileNetV3
|
||||
scale: 0.5
|
||||
model_name: small
|
||||
small_stride: [1, 2, 2, 2]
|
||||
|
||||
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
|
||||
l2_decay: 0.00001
|
||||
base_lr: 0.001
|
||||
beta1: 0.9
|
||||
beta2: 0.999
|
||||
decay:
|
||||
function: cosine_decay_warmup
|
||||
warmup_minibatch: 1000
|
||||
step_each_epoch: 6530
|
||||
total_epoch: 500
|
||||
@ -0,0 +1,13 @@
|
||||
TrainReader:
|
||||
reader_function: ppocr.data.rec.dataset_traversal,SimpleReader
|
||||
num_workers: 8
|
||||
img_set_dir: ./train_data
|
||||
label_file_path: ./train_data/en_train.txt
|
||||
|
||||
EvalReader:
|
||||
reader_function: ppocr.data.rec.dataset_traversal,SimpleReader
|
||||
img_set_dir: ./train_data
|
||||
label_file_path: ./train_data/en_eval.txt
|
||||
|
||||
TestReader:
|
||||
reader_function: ppocr.data.rec.dataset_traversal,SimpleReader
|
||||
@ -0,0 +1,52 @@
|
||||
Global:
|
||||
algorithm: CRNN
|
||||
use_gpu: true
|
||||
epoch_num: 500
|
||||
log_smooth_window: 20
|
||||
print_batch_step: 10
|
||||
save_model_dir: ./output/rec_french
|
||||
save_epoch_step: 1
|
||||
eval_batch_step: 2000
|
||||
train_batch_size_per_card: 256
|
||||
test_batch_size_per_card: 256
|
||||
image_shape: [3, 32, 320]
|
||||
max_text_length: 25
|
||||
character_type: french
|
||||
character_dict_path: ./ppocr/utils/french_dict.txt
|
||||
loss_type: ctc
|
||||
distort: true
|
||||
use_space_char: false
|
||||
reader_yml: ./configs/rec/multi_languages/rec_french_reader.yml
|
||||
pretrain_weights:
|
||||
checkpoints:
|
||||
save_inference_dir:
|
||||
infer_img:
|
||||
|
||||
Architecture:
|
||||
function: ppocr.modeling.architectures.rec_model,RecModel
|
||||
|
||||
Backbone:
|
||||
function: ppocr.modeling.backbones.rec_mobilenet_v3,MobileNetV3
|
||||
scale: 0.5
|
||||
model_name: small
|
||||
small_stride: [1, 2, 2, 2]
|
||||
|
||||
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
|
||||
l2_decay: 0.00001
|
||||
base_lr: 0.001
|
||||
beta1: 0.9
|
||||
beta2: 0.999
|
||||
decay:
|
||||
function: cosine_decay
|
||||
step_each_epoch: 254
|
||||
total_epoch: 500
|
||||
@ -0,0 +1,13 @@
|
||||
TrainReader:
|
||||
reader_function: ppocr.data.rec.dataset_traversal,SimpleReader
|
||||
num_workers: 8
|
||||
img_set_dir: ./train_data
|
||||
label_file_path: ./train_data/french_train.txt
|
||||
|
||||
EvalReader:
|
||||
reader_function: ppocr.data.rec.dataset_traversal,SimpleReader
|
||||
img_set_dir: ./train_data
|
||||
label_file_path: ./train_data/french_eval.txt
|
||||
|
||||
TestReader:
|
||||
reader_function: ppocr.data.rec.dataset_traversal,SimpleReader
|
||||
@ -0,0 +1,52 @@
|
||||
Global:
|
||||
algorithm: CRNN
|
||||
use_gpu: true
|
||||
epoch_num: 500
|
||||
log_smooth_window: 20
|
||||
print_batch_step: 10
|
||||
save_model_dir: ./output/rec_german
|
||||
save_epoch_step: 1
|
||||
eval_batch_step: 2000
|
||||
train_batch_size_per_card: 256
|
||||
test_batch_size_per_card: 256
|
||||
image_shape: [3, 32, 320]
|
||||
max_text_length: 25
|
||||
character_type: german
|
||||
character_dict_path: ./ppocr/utils/german_dict.txt
|
||||
loss_type: ctc
|
||||
distort: true
|
||||
use_space_char: false
|
||||
reader_yml: ./configs/rec/multi_languages/rec_ger_reader.yml
|
||||
pretrain_weights:
|
||||
checkpoints:
|
||||
save_inference_dir:
|
||||
infer_img:
|
||||
|
||||
Architecture:
|
||||
function: ppocr.modeling.architectures.rec_model,RecModel
|
||||
|
||||
Backbone:
|
||||
function: ppocr.modeling.backbones.rec_mobilenet_v3,MobileNetV3
|
||||
scale: 0.5
|
||||
model_name: small
|
||||
small_stride: [1, 2, 2, 2]
|
||||
|
||||
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
|
||||
l2_decay: 0.00001
|
||||
base_lr: 0.001
|
||||
beta1: 0.9
|
||||
beta2: 0.999
|
||||
decay:
|
||||
function: cosine_decay
|
||||
step_each_epoch: 254
|
||||
total_epoch: 500
|
||||
@ -0,0 +1,13 @@
|
||||
TrainReader:
|
||||
reader_function: ppocr.data.rec.dataset_traversal,SimpleReader
|
||||
num_workers: 8
|
||||
img_set_dir: ./train_data
|
||||
label_file_path: ./train_data/de_train.txt
|
||||
|
||||
EvalReader:
|
||||
reader_function: ppocr.data.rec.dataset_traversal,SimpleReader
|
||||
img_set_dir: ./train_data
|
||||
label_file_path: ./train_data/de_eval.txt
|
||||
|
||||
TestReader:
|
||||
reader_function: ppocr.data.rec.dataset_traversal,SimpleReader
|
||||
@ -0,0 +1,52 @@
|
||||
Global:
|
||||
algorithm: CRNN
|
||||
use_gpu: true
|
||||
epoch_num: 500
|
||||
log_smooth_window: 20
|
||||
print_batch_step: 10
|
||||
save_model_dir: ./output/rec_japan
|
||||
save_epoch_step: 1
|
||||
eval_batch_step: 2000
|
||||
train_batch_size_per_card: 256
|
||||
test_batch_size_per_card: 256
|
||||
image_shape: [3, 32, 320]
|
||||
max_text_length: 25
|
||||
character_type: japan
|
||||
character_dict_path: ./ppocr/utils/japan_dict.txt
|
||||
loss_type: ctc
|
||||
distort: true
|
||||
use_space_char: false
|
||||
reader_yml: ./configs/rec/multi_languages/rec_japan_reader.yml
|
||||
pretrain_weights:
|
||||
checkpoints:
|
||||
save_inference_dir:
|
||||
infer_img:
|
||||
|
||||
Architecture:
|
||||
function: ppocr.modeling.architectures.rec_model,RecModel
|
||||
|
||||
Backbone:
|
||||
function: ppocr.modeling.backbones.rec_mobilenet_v3,MobileNetV3
|
||||
scale: 0.5
|
||||
model_name: small
|
||||
small_stride: [1, 2, 2, 2]
|
||||
|
||||
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
|
||||
l2_decay: 0.00001
|
||||
base_lr: 0.001
|
||||
beta1: 0.9
|
||||
beta2: 0.999
|
||||
decay:
|
||||
function: cosine_decay
|
||||
step_each_epoch: 254
|
||||
total_epoch: 500
|
||||
@ -0,0 +1,13 @@
|
||||
TrainReader:
|
||||
reader_function: ppocr.data.rec.dataset_traversal,SimpleReader
|
||||
num_workers: 8
|
||||
img_set_dir: ./train_data
|
||||
label_file_path: ./train_data/japan_train.txt
|
||||
|
||||
EvalReader:
|
||||
reader_function: ppocr.data.rec.dataset_traversal,SimpleReader
|
||||
img_set_dir: ./train_data
|
||||
label_file_path: ./train_data/japan_eval.txt
|
||||
|
||||
TestReader:
|
||||
reader_function: ppocr.data.rec.dataset_traversal,SimpleReader
|
||||
@ -0,0 +1,52 @@
|
||||
Global:
|
||||
algorithm: CRNN
|
||||
use_gpu: true
|
||||
epoch_num: 500
|
||||
log_smooth_window: 20
|
||||
print_batch_step: 10
|
||||
save_model_dir: ./output/rec_korean
|
||||
save_epoch_step: 1
|
||||
eval_batch_step: 2000
|
||||
train_batch_size_per_card: 256
|
||||
test_batch_size_per_card: 256
|
||||
image_shape: [3, 32, 320]
|
||||
max_text_length: 25
|
||||
character_type: korean
|
||||
character_dict_path: ./ppocr/utils/korean_dict.txt
|
||||
loss_type: ctc
|
||||
distort: true
|
||||
use_space_char: false
|
||||
reader_yml: ./configs/rec/multi_languages/rec_korean_reader.yml
|
||||
pretrain_weights:
|
||||
checkpoints:
|
||||
save_inference_dir:
|
||||
infer_img:
|
||||
|
||||
Architecture:
|
||||
function: ppocr.modeling.architectures.rec_model,RecModel
|
||||
|
||||
Backbone:
|
||||
function: ppocr.modeling.backbones.rec_mobilenet_v3,MobileNetV3
|
||||
scale: 0.5
|
||||
model_name: small
|
||||
small_stride: [1, 2, 2, 2]
|
||||
|
||||
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
|
||||
l2_decay: 0.00001
|
||||
base_lr: 0.001
|
||||
beta1: 0.9
|
||||
beta2: 0.999
|
||||
decay:
|
||||
function: cosine_decay
|
||||
step_each_epoch: 254
|
||||
total_epoch: 500
|
||||
@ -0,0 +1,13 @@
|
||||
TrainReader:
|
||||
reader_function: ppocr.data.rec.dataset_traversal,SimpleReader
|
||||
num_workers: 8
|
||||
img_set_dir: ./train_data
|
||||
label_file_path: ./train_data/korean_train.txt
|
||||
|
||||
EvalReader:
|
||||
reader_function: ppocr.data.rec.dataset_traversal,SimpleReader
|
||||
img_set_dir: ./train_data
|
||||
label_file_path: ./train_data/korean_eval.txt
|
||||
|
||||
TestReader:
|
||||
reader_function: ppocr.data.rec.dataset_traversal,SimpleReader
|
||||
|
After Width: | Height: | Size: 198 KiB |
|
After Width: | Height: | Size: 171 KiB |
|
After Width: | Height: | Size: 61 KiB |
@ -0,0 +1,46 @@
|
||||
// Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
|
||||
//
|
||||
// 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.
|
||||
|
||||
#include "ocr_cls_process.h"
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
const std::vector<int> CLS_IMAGE_SHAPE = {3, 48, 192};
|
||||
|
||||
cv::Mat cls_resize_img(const cv::Mat &img) {
|
||||
int imgC = CLS_IMAGE_SHAPE[0];
|
||||
int imgW = CLS_IMAGE_SHAPE[2];
|
||||
int imgH = CLS_IMAGE_SHAPE[1];
|
||||
|
||||
float ratio = float(img.cols) / float(img.rows);
|
||||
int resize_w = 0;
|
||||
if (ceilf(imgH * ratio) > imgW)
|
||||
resize_w = imgW;
|
||||
else
|
||||
resize_w = int(ceilf(imgH * ratio));
|
||||
|
||||
cv::Mat resize_img;
|
||||
cv::resize(img, resize_img, cv::Size(resize_w, imgH), 0.f, 0.f,
|
||||
cv::INTER_CUBIC);
|
||||
|
||||
if (resize_w < imgW) {
|
||||
cv::copyMakeBorder(resize_img, resize_img, 0, 0, 0, int(imgW - resize_w),
|
||||
cv::BORDER_CONSTANT, {0, 0, 0});
|
||||
}
|
||||
return resize_img;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue