ocr识别,单一的ctc-head输出,使用MultiScaleSampler,精度一直为0,loss为nanxxx,使用SimpleDataSet精度正常 #12849
Unanswered
zhangxiaopang88
asked this question in
Q&A
Replies: 1 comment
-
is your problem solved? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Architecture:
model_type: rec
algorithm: SVTR
Transform:
Backbone:
name: PPLCNetV3
scale: 0.95
Neck:
name: SequenceEncoder
encoder_type: reshape
Head:
name: CTCHead
#fc_decay: 0.00001
Loss:
name: CTCLoss
PostProcess:
name: CTCLabelDecode
Metric:
name: RecMetric
main_indicator: acc
Train:
dataset:
name: MultiScaleDataSet
ds_width: false
data_dir: ./
ext_op_transform_idx: 1
label_file_list:
- data/train.txt
transforms:
- DecodeImage:
img_mode: BGR
channel_first: false
- RecConAug:
prob: 0.5
ext_data_num: 2
image_shape: [48, 128, 3]
max_text_length: *max_text_length
- RecAug:
- MultiLabelEncode:
gtc_encode: NRTRLabelEncode
- KeepKeys:
keep_keys:
- image
- label_ctc
- label_gtc
- length
- valid_ratio
sampler:
name: MultiScaleSampler
scales: [[128, 32], [128, 48], [128, 64]]
first_bs: &bs 192
fix_bs: false
divided_factor: [8, 16] # w, h
is_training: True
loader:
shuffle: true
batch_size_per_card: *bs
drop_last: true
num_workers: 16
Eval:
dataset:
name: SimpleDataSet
data_dir: ./
label_file_list:
- data/eval.txt
transforms:
- DecodeImage:
img_mode: BGR
channel_first: false
- MultiLabelEncode:
gtc_encode: NRTRLabelEncode
- RecResizeImg:
image_shape: [3, 48, 128]
- KeepKeys:
keep_keys:
- image
- label_ctc
- label_gtc
- length
- valid_ratio
loader:
shuffle: false
drop_last: false
batch_size_per_card: 128
num_workers: 16
log一直是这样
ppocr INFO: epoch: [1/200], global_step: 1580, lr: 0.000004, acc: 0.000000, norm_edit_dis: 0.000000, loss: nanxxx, avg_reader_cost: 0.00013 s, avg_batch_cost: 0.32655 s, avg_samples: 147.2, ips: 450.77714 samples/s, eta: 6 days, 4:14:47
Beta Was this translation helpful? Give feedback.
All reactions