Replies: 5 comments
-
Same issue here. Standard en_PP-OCRv4_rec.yml does not work out of the box: Changing the name of the Train/Eval to SimpleDataSet gives me the error as well. |
Beta Was this translation helpful? Give feedback.
-
解决了吗,我是AttributeError: 'LMDBDataSet' object has no attribute 'ds_width' |
Beta Was this translation helpful? Give feedback.
-
Hi @Sincerely12 , @tschijvenaars, @anbo724 I've encountered with the same problem. Have you fixed it? |
Beta Was this translation helpful? Give feedback.
-
您好,请问v4模型微调您跑通了吗?能指点一下如何操作吗? |
Beta Was this translation helpful? Give feedback.
-
Hi, I've encountered this problem when I used my GPU for PaddleOCR and another Deep Learning framework. One script initialized both at the same time, but always the second instance gave an error (also the other framework). Sadly this meant for me I could not initialize both at the same time to make use of my GPU, so I chose CPU paddle version in this case. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
W0927 21:53:55.562623 92255 gpu_context.cc:306] device: 1, cuDNN Version: 8.1.
[2023/09/27 21:53:58] ppocr INFO: Initialize indexs of datasets:['./train_data/rec/rec_gt_train.txt']
list index out of range
Traceback (most recent call last):
File "tools/train.py", line 227, in
main(config, device, logger, vdl_writer)
File "tools/train.py", line 53, in main
train_dataloader = build_dataloader(config, 'Train', device, logger)
File "/data/**/ocr/PaddleOCR/ppocr/data/init.py", line 123, in build_dataloader
batch_sampler = eval(sampler_name)(dataset, config_sampler)
File "/data//ocr/PaddleOCR/ppocr/data/multi_scale_sampler.py", line 32, in init
self.ds_width = data_source.ds_width
AttributeError: 'SimpleDataSet' object has no attribute 'ds_width'
INFO 2023-09-27 21:54:04,231 launch_utils.py:322] terminate process group gid:92255
INFO 2023-09-27 21:54:04,231 launch_utils.py:322] terminate process group gid:92255
INFO 2023-09-27 21:54:04,232 launch_utils.py:322] terminate process group gid:92260
INFO 2023-09-27 21:54:04,232 launch_utils.py:322] terminate process group gid:92260
INFO 2023-09-27 21:54:04,233 launch_utils.py:322] terminate process group gid:92265
INFO 2023-09-27 21:54:04,233 launch_utils.py:322] terminate process group gid:92265
config
Global:
debug: false
use_gpu: true
epoch_num: 10
log_smooth_window: 20
print_batch_step: 10
save_model_dir: ./output/rec_ppocr_v4
save_epoch_step: 10
eval_batch_step:
cal_metric_during_train: true
pretrained_model: refactor
checkpoints: null
save_inference_dir: null
use_visualdl: false
infer_img: train_data/rec/test/1142515.png
character_dict_path: ppocr/utils/dict/ipa_dict.txt
max_text_length: 25
infer_mode: false
use_space_char: true
distributed: true
save_res_path: ./output/rec/predicts_ppocrv4.txt
Optimizer:
name: Adam
beta1: 0.9
beta2: 0.999
lr:
name: Cosine
learning_rate: 0.0005
warmup_epoch: 5
regularizer:
name: L2
factor: 3.0e-05
Architecture:
model_type: rec
algorithm: SVTR_LCNet
Transform: null
Backbone:
name: PPLCNetV3
scale: 0.95
Head:
name: MultiHead
head_list:
Neck:
name: svtr
dims: 120
depth: 2
hidden_dims: 120
kernel_size:
- 1
- 3
use_guide: true
Head:
fc_decay: 1.0e-05
nrtr_dim: 384
max_text_length: 25
Loss:
name: MultiLoss
loss_config_list:
PostProcess:
name: CTCLabelDecode
Metric:
name: RecMetric
main_indicator: acc
ignore_space: false
Train:
dataset:
name: SimpleDataSet
ds_width: false
data_dir: ./train_data/rec
ext_op_transform_idx: 1
label_file_list:
transforms:
img_mode: BGR
channel_first: false
prob: 0.5
ext_data_num: 2
image_shape:
max_text_length: 25
gtc_encode: NRTRLabelEncode
keep_keys:
sampler:
name: MultiScaleSampler
scales:
first_bs: 96
fix_bs: false
divided_factor:
is_training: true
loader:
shuffle: true
batch_size_per_card: 96
drop_last: true
num_workers: 8
Eval:
dataset:
name: SimpleDataSet
data_dir: ./train_data/rec
label_file_list:
transforms:
img_mode: BGR
channel_first: false
gtc_encode: NRTRLabelEncode
image_shape:
keep_keys:
loader:
shuffle: false
drop_last: false
batch_size_per_card: 128
num_workers: 4
profiler_options: null
Beta Was this translation helpful? Give feedback.
All reactions