Upload 4 files
Browse files- .gitattributes +1 -0
- best_accuracy.pdparams +3 -0
- config.yml +91 -0
- inference.yml +127 -0
- kab_dict.txt +109 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
best_accuracy.pdparams filter=lfs diff=lfs merge=lfs -text
|
best_accuracy.pdparams
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:337d323d250022b2802df310419824fcc96958e53f30f67a13acbd4f7ebfbfe8
|
| 3 |
+
size 29587507
|
config.yml
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
Global:
|
| 3 |
+
use_gpu: false
|
| 4 |
+
epoch_num: 50
|
| 5 |
+
log_smooth_window: 20
|
| 6 |
+
print_batch_step: 10
|
| 7 |
+
save_model_dir: /content/paddleocr_kabyle/output/rec_kabyle
|
| 8 |
+
save_epoch_step: 5
|
| 9 |
+
eval_batch_step: [0, 200]
|
| 10 |
+
cal_metric_during_train: true
|
| 11 |
+
character_dict_path: /content/paddleocr_kabyle/PaddleOCR/ppocr/utils/kab_dict.txt
|
| 12 |
+
max_text_length: 25
|
| 13 |
+
infer_mode: false
|
| 14 |
+
use_space_char: true
|
| 15 |
+
distributed: false
|
| 16 |
+
|
| 17 |
+
Optimizer:
|
| 18 |
+
name: Adam
|
| 19 |
+
lr:
|
| 20 |
+
name: Cosine
|
| 21 |
+
learning_rate: 0.001
|
| 22 |
+
warmup_epoch: 3
|
| 23 |
+
regularizer:
|
| 24 |
+
name: L2
|
| 25 |
+
factor: 3e-5
|
| 26 |
+
|
| 27 |
+
Architecture:
|
| 28 |
+
model_type: rec
|
| 29 |
+
algorithm: CRNN
|
| 30 |
+
|
| 31 |
+
Transform:
|
| 32 |
+
|
| 33 |
+
Backbone:
|
| 34 |
+
name: MobileNetV1Enhance
|
| 35 |
+
scale: 0.5
|
| 36 |
+
|
| 37 |
+
Neck:
|
| 38 |
+
name: SequenceEncoder
|
| 39 |
+
encoder_type: rnn
|
| 40 |
+
hidden_size: 256
|
| 41 |
+
|
| 42 |
+
Head:
|
| 43 |
+
name: CTCHead
|
| 44 |
+
|
| 45 |
+
Loss:
|
| 46 |
+
name: CTCLoss
|
| 47 |
+
|
| 48 |
+
PostProcess:
|
| 49 |
+
name: CTCLabelDecode
|
| 50 |
+
|
| 51 |
+
Metric:
|
| 52 |
+
name: RecMetric
|
| 53 |
+
main_indicator: acc
|
| 54 |
+
|
| 55 |
+
Train:
|
| 56 |
+
dataset:
|
| 57 |
+
name: SimpleDataSet
|
| 58 |
+
data_dir: /content/paddleocr_kabyle/train_data
|
| 59 |
+
label_file_list: ["/content/paddleocr_kabyle/train_data/rec_gt_train.txt"]
|
| 60 |
+
transforms:
|
| 61 |
+
- DecodeImage:
|
| 62 |
+
img_mode: BGR
|
| 63 |
+
- CTCLabelEncode:
|
| 64 |
+
- RecResizeImg:
|
| 65 |
+
image_shape: [3, 48, 480]
|
| 66 |
+
- KeepKeys:
|
| 67 |
+
keep_keys: ["image", "label", "length"]
|
| 68 |
+
loader:
|
| 69 |
+
shuffle: true
|
| 70 |
+
batch_size_per_card: 16
|
| 71 |
+
drop_last: true
|
| 72 |
+
num_workers: 0
|
| 73 |
+
|
| 74 |
+
Eval:
|
| 75 |
+
dataset:
|
| 76 |
+
name: SimpleDataSet
|
| 77 |
+
data_dir: /content/paddleocr_kabyle/train_data
|
| 78 |
+
label_file_list: ["/content/paddleocr_kabyle/train_data/rec_gt_val.txt"]
|
| 79 |
+
transforms:
|
| 80 |
+
- DecodeImage:
|
| 81 |
+
img_mode: BGR
|
| 82 |
+
- CTCLabelEncode:
|
| 83 |
+
- RecResizeImg:
|
| 84 |
+
image_shape: [3, 48, 480]
|
| 85 |
+
- KeepKeys:
|
| 86 |
+
keep_keys: ["image", "label", "length"]
|
| 87 |
+
loader:
|
| 88 |
+
shuffle: false
|
| 89 |
+
batch_size_per_card: 16
|
| 90 |
+
drop_last: false
|
| 91 |
+
num_workers: 0
|
inference.yml
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
PreProcess:
|
| 2 |
+
transform_ops:
|
| 3 |
+
- DecodeImage:
|
| 4 |
+
img_mode: BGR
|
| 5 |
+
- CTCLabelEncode: null
|
| 6 |
+
- RecResizeImg:
|
| 7 |
+
image_shape:
|
| 8 |
+
- 3
|
| 9 |
+
- 48
|
| 10 |
+
- 480
|
| 11 |
+
- KeepKeys:
|
| 12 |
+
keep_keys:
|
| 13 |
+
- image
|
| 14 |
+
- label
|
| 15 |
+
- length
|
| 16 |
+
PostProcess:
|
| 17 |
+
name: CTCLabelDecode
|
| 18 |
+
character_dict:
|
| 19 |
+
- a
|
| 20 |
+
- e
|
| 21 |
+
- n
|
| 22 |
+
- c
|
| 23 |
+
- h
|
| 24 |
+
- _
|
| 25 |
+
- i
|
| 26 |
+
- m
|
| 27 |
+
- g
|
| 28 |
+
- /
|
| 29 |
+
- r
|
| 30 |
+
- v
|
| 31 |
+
- l
|
| 32 |
+
- t
|
| 33 |
+
- w
|
| 34 |
+
- o
|
| 35 |
+
- d
|
| 36 |
+
- č
|
| 37 |
+
- ḍ
|
| 38 |
+
- ɛ
|
| 39 |
+
- ǧ
|
| 40 |
+
- ɣ
|
| 41 |
+
- ḥ
|
| 42 |
+
- ṛ
|
| 43 |
+
- ṣ
|
| 44 |
+
- ṭ
|
| 45 |
+
- ẓ
|
| 46 |
+
- '6'
|
| 47 |
+
- '1'
|
| 48 |
+
- .
|
| 49 |
+
- p
|
| 50 |
+
- B
|
| 51 |
+
- u
|
| 52 |
+
- '2'
|
| 53 |
+
- '3'
|
| 54 |
+
- R
|
| 55 |
+
- y
|
| 56 |
+
- '4'
|
| 57 |
+
- U
|
| 58 |
+
- E
|
| 59 |
+
- A
|
| 60 |
+
- '5'
|
| 61 |
+
- P
|
| 62 |
+
- O
|
| 63 |
+
- S
|
| 64 |
+
- T
|
| 65 |
+
- D
|
| 66 |
+
- '7'
|
| 67 |
+
- Z
|
| 68 |
+
- '8'
|
| 69 |
+
- I
|
| 70 |
+
- N
|
| 71 |
+
- L
|
| 72 |
+
- G
|
| 73 |
+
- M
|
| 74 |
+
- H
|
| 75 |
+
- '0'
|
| 76 |
+
- J
|
| 77 |
+
- K
|
| 78 |
+
- '-'
|
| 79 |
+
- '9'
|
| 80 |
+
- F
|
| 81 |
+
- C
|
| 82 |
+
- V
|
| 83 |
+
- Č
|
| 84 |
+
- X
|
| 85 |
+
- Ḥ
|
| 86 |
+
- Ṛ
|
| 87 |
+
- s
|
| 88 |
+
- Ṣ
|
| 89 |
+
- Q
|
| 90 |
+
- ':'
|
| 91 |
+
- Ṭ
|
| 92 |
+
- Ẓ
|
| 93 |
+
- Ɛ
|
| 94 |
+
- x
|
| 95 |
+
- b
|
| 96 |
+
- Y
|
| 97 |
+
- Ǧ
|
| 98 |
+
- Ɣ
|
| 99 |
+
- z
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