[PaddlePaddle/PaddleOCR]找不到数据集

2024-05-14 357 views
9

Initialize indexs of datasets:['..\pubtabnet\PubTabNet_2.0.0_train.jsonl'] [2023/03/07 15:00:02] ppocr ERROR: No Images in train dataset, please ensure

  1. The images num in the train label_file_list should be larger than or equal with batch size.
  2. The annotation file and path in the configuration file are provided normally.

我的数据集路径没问题可就是用配置文件读取,读不到,报找不到数据集

回答

1

配置文件发出来看看

1

Global: use_gpu: true epoch_num: 100 log_smooth_window: 20 print_batch_step: 20 save_model_dir: ./output/SLANet save_epoch_step: 400

evaluation is run every 1000 iterations after the 0th iteration

eval_batch_step: [0, 1000] cal_metric_during_train: True pretrained_model: checkpoints: save_inference_dir: ./output/SLANet/infer use_visualdl: False infer_img: ppstructure/docs/table/table.jpg

for data or label process

character_dict_path: ../ppocr/utils/dict/table_structure_dict.txt character_type: en max_text_length: &max_text_length 500 box_format: &box_format 'xyxy' # 'xywh', 'xyxy', 'xyxyxyxy' infer_mode: False use_sync_bn: True save_res_path: 'output/infer'

Optimizer: name: Adam beta1: 0.9 beta2: 0.999 clip_norm: 5.0 lr: name: Piecewise learning_rate: 0.001 decay_epochs : [40, 50] values : [0.001, 0.0001, 0.00005] regularizer: name: 'L2' factor: 0.00000

Architecture: model_type: table algorithm: SLANet Backbone: name: PPLCNet scale: 1.0 pretrained: true use_ssld: true Neck: name: CSPPAN out_channels: 96 Head: name: SLAHead hidden_size: 256 max_text_length: *max_text_length loc_reg_num: &loc_reg_num 4

Loss: name: SLALoss structure_weight: 1.0 loc_weight: 2.0 loc_loss: smooth_l1

PostProcess: name: TableLabelDecode merge_no_span_structure: &merge_no_span_structure True

Metric: name: TableMetric main_indicator: acc compute_bbox_metric: False loc_reg_num: loc_reg_num box_format: box_format

Train: dataset: name: PubTabDataSet data_dir: D:\computer-vision\PaddleOCR-release-2.6\pubtabnet\train label_file_list: [../pubtabnet/PubTabNet_2.0.0_train.jsonl] transforms:

  • DecodeImage: # load image img_mode: BGR channel_first: False
  • TableLabelEncode: learn_empty_box: False merge_no_span_structure: merge_no_span_structure replace_empty_cell_token: False loc_reg_num: loc_reg_num max_text_length: *max_text_length
  • TableBoxEncode: in_box_format: box_format out_box_format: box_format
  • ResizeTableImage: max_len: 488
  • NormalizeImage: scale: 1./255. mean: [0.485, 0.456, 0.406] std: [0.229, 0.224, 0.225] order: 'hwc'
  • PaddingTableImage: size: [488, 488]
  • ToCHWImage:
  • KeepKeys: keep_keys: [ 'image', 'structure', 'bboxes', 'bbox_masks', 'shape' ] loader: shuffle: True batch_size_per_card: 48 drop_last: True num_workers: 1

Eval: dataset: name: PubTabDataSet data_dir: D:\computer-vision\PaddleOCR-release-2.6\pubtabnet\val label_file_list: [../pubtabnet/PubTabNet_2.0.0_val.jsonl] transforms:

  • DecodeImage: # load image img_mode: BGR channel_first: False
  • TableLabelEncode: learn_empty_box: False merge_no_span_structure: merge_no_span_structure replace_empty_cell_token: False loc_reg_num: loc_reg_num max_text_length: *max_text_length
  • TableBoxEncode: in_box_format: box_format out_box_format: box_format
  • ResizeTableImage: max_len: 488
  • NormalizeImage: scale: 1./255. mean: [0.485, 0.456, 0.406] std: [0.229, 0.224, 0.225] order: 'hwc'
  • PaddingTableImage: size: [488, 488]
  • ToCHWImage:
  • KeepKeys: keep_keys: [ 'image', 'structure', 'bboxes', 'bbox_masks', 'shape' ] loader: shuffle: False drop_last: False batch_size_per_card: 48 num_workers: 1 这是那个配置
6

label_file_list改成绝对路径试试

2

(PreconditionNotMet) The third-party dynamic library (cudnn64_7.dll) that Paddle depends on is not configured correctly. (error code is 126) Suggestions:

  1. Check if the third-party dynamic library (e.g. CUDA, CUDNN) is installed correctly and its version is matched with paddlepaddle you installed.
  2. Configure third-party dynamic library environment variables as follows:
    • Linux: set LD_LIBRARY_PATH by export LD_LIBRARY_PATH=...
    • Windows: set PATH by `set PATH=XXX; (at ..\paddle\phi\backends\dynload\dynamic_loader.cc:305) 又报这个错了
7

是你的环境有问题,根据报错先修一下

5

train with paddle 2.4.2 and device Place(gpu:0) [2023/03/08 09:35:05] ppocr INFO: Initialize indexs of datasets:['D:/computer-vision/PaddleOCR-release-2.6/pubtabnet/PubTabNet_2.0.0_train.jsonl'] [2023/03/08 09:35:11] ppocr ERROR: No Images in train dataset, please ensure

  1. The images num in the train label_file_list should be larger than or equal with batch size.
  2. The annotation file and path in the configuration file are provided normally. 我用了绝对路径只要把那个判断数据集里面个数的打开就会报这个错
2

['D:/computer-vision/PaddleOCR-release-2.6/pubtabnet/PubTabNet_2.0.0_train.jsonl']

把单引号去掉试试?

0

单独debug看看数据读取报错那里,换一个文件看能否读取出来

8

可以自己根据split字段重新划分

2

您好,请问您的问题是怎么解决的,我也遇到一样的问题(路径是绝对路径),非常感谢~ [2023/10/16 13:57:35] ppocr ERROR: No Images in train dataset, please ensure

  1. The images num in the train label_file_list should be larger than or equal with batch size.
  2. The annotation file and path in the configuration file are provided normally.