wangjin0928 1 рік тому
джерело
коміт
84aa015d73
4 змінених файлів з 156 додано та 3 видалено
  1. +3
    -3
      ocrUtils2/run.sh
  2. +61
    -0
      weights/conf/ocr2/360CC_config.yaml
  3. +92
    -0
      weights/conf/ocr2/chars.txt
  4. BIN
      weights/conf/ocr2/crnn_448X32.pth

+ 3
- 3
ocrUtils2/run.sh Переглянути файл

@@ -1,4 +1,4 @@
gpu=2080Ti mWidth=448 mHeight=32
pth=/mnt/thsw2/DSP2/weights/ocr2/checkpoint_99_acc_0.9737
gpu=4090 mWidth=448 mHeight=32
pth=/mnt/thsw2/DSP2/weights/ocr2/crnn
python pth2onnx.py --weights ${pth}.pth --mWidth ${mWidth} --mHeight ${mHeight}
#mv ${pth}_${mWidth}X${mHeight}.engine $pth_${gpu}_fp16_${mWidth}X${mHeight}.engine
mv ${pth}_${mWidth}X${mHeight}.engine ${pth}_${gpu}_fp16_${mWidth}X${mHeight}.engine

+ 61
- 0
weights/conf/ocr2/360CC_config.yaml Переглянути файл

@@ -0,0 +1,61 @@
GPUID: 0
WORKERS: 1
PRINT_FREQ: 10
SAVE_FREQ: 10
PIN_MEMORY: False
OUTPUT_DIR: 'output'

CUDNN:
BENCHMARK: True
DETERMINISTIC: False
ENABLED: True

DATASET:
DATASET: 360CC
ROOT: "../textGenerator/dataset/dataset9/images"
CHAR_FILE: '../textGenerator/dataset/dataset9/chars.txt'
JSON_FILE: {'train': '../textGenerator/dataset/dataset9/train.txt', 'val': '../textGenerator/dataset/dataset9/val.txt'}
# JSON_FILE: {'train': 'H:/DL-DATASET/360M/train.txt', 'val': 'H:/DL-DATASET/360M/test.txt'}
SCALE_FACTOR: 0.25
ROT_FACTOR: 30
STD: 0.193
MEAN: 0.588
ALPHABETS: ''

TRAIN:
BATCH_SIZE_PER_GPU: 32
SHUFFLE: True
BEGIN_EPOCH: 0
END_EPOCH: 100
RESUME:
IS_RESUME: False
FILE: 'output/360CC/crnn/2023-04-27-13-01/checkpoints/checkpoint_99_acc_0.5030.pth'
OPTIMIZER: 'adam'
LR: 0.0001
WD: 0.0
LR_STEP: [60, 80]
LR_FACTOR: 0.1
MOMENTUM: 0.0
NESTEROV: False
RMSPROP_ALPHA:
RMSPROP_CENTERED:
FINETUNE:
IS_FINETUNE: False
FINETUNE_CHECKPOINIT: 'output/checkpoints/mixed_second_finetune_acc_97P7.pth'
FREEZE: true

TEST:
BATCH_SIZE_PER_GPU: 16
SHUFFLE: True # for random test rather than test on the whole validation set
NUM_TEST_BATCH: 1000
NUM_TEST_DISP: 10

MODEL:
NAME: 'crnn'
IMAGE_SIZE:
OW: 160 # origial width: 280
H: 32
W: 160 # resized width: 160
NUM_CLASSES: 0
NUM_HIDDEN: 256


+ 92
- 0
weights/conf/ocr2/chars.txt Переглянути файл

@@ -0,0 +1,92 @@
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
0
1
2
3
4
5
6
7
8
9
°
!
"
#
$
%
&
'
(
)
*
+
,
-
.
/
:
;
?
@
[
\
]
^
_
`
{
|
}
~

BIN
weights/conf/ocr2/crnn_448X32.pth Переглянути файл


Завантаження…
Відмінити
Зберегти