PaddleOCR V3 训练 ValueError: too many values to unpack (expected 4) #15871
Replies: 1 comment
-
❗ Error when using custom evaluation and training KeepKeys settings Here is the log output: lua pgsql yaml
Any help or suggestions on how to fix this and properly include shape in KeepKeys during evaluation and training would be appreciated. Global:
Architecture: Loss:
Optimizer: PostProcess: Metric: Train: Eval: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
[2025/06/26 15:14:51] ppocr INFO: During the training process, after the 0th iteration, an evaluation is run every 5 iterations
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2025.1.2\plugins\python-ce\helpers\pydev\pydevd.py", line 1570, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\Program Files\JetBrains\PyCharm 2025.1.2\plugins\python-ce\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "tools/train.py", line 273, in
main(config, device, logger, vdl_writer, seed)
File "tools/train.py", line 225, in main
program.train(
File "C:\Users\Admin\Desktop\Tool\Paddle\PaddleOCR\tools\program.py", line 421, in train
post_result = post_process_class(preds, batch[1])
File "C:\Users\Admin\Desktop\Tool\Paddle\PaddleOCR\ppocr\postprocess\db_postprocess.py", line 288, in call
results[k] = self.post_process(predicts[k], shape_list=shape_list)
File "C:\Users\Admin\Desktop\Tool\Paddle\PaddleOCR\ppocr\postprocess\db_postprocess.py", line 236, in call
src_h, src_w, ratio_h, ratio_w = shape_list[batch_index]
ValueError: too many values to unpack (expected 4)
python-BaseException
Traceback (most recent call last):
File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 524, in run
raise CalledProcessError(retcode, process.args,
PP-OCRv3_det_cml.yml
Eval:
dataset:
name: SimpleDataSet
data_dir: ./train_data/val_image/val_img/
label_file_list:
- ./train_data/val_image/val_label/val_label.txt
transforms:
- DecodeImage: # load image
img_mode: BGR
channel_first: False
- DetLabelEncode: # Class handling label
- DetResizeForTest:
image_shape: [ 960, 960 ]
resize_type: 0
- NormalizeImage:
scale: 1./255.
mean: [0.485, 0.456, 0.406]
std: [0.229, 0.224, 0.225]
order: 'hwc'
- ToCHWImage:
- KeepKeys:
keep_keys: ['image', 'shape', 'polys', 'ignore_tags']
Beta Was this translation helpful? Give feedback.
All reactions