AssertionError: The length of ratio_list should be the same as the file_list

         最近想使用百度的PaddleOCR进行许可证识别,想通过训练一些自己的数据集来提高点识别率。但是模型训练时一直报错,就这一个错误折磨了我这个小菜鸡一下午~~>_<~~!,所以写个帖子来记录一下!

一直报错:

Traceback (most recent call last):
File ".\tools\train.py", line 148, in
main(config, device, logger, vdl_writer)
File ".\tools\train.py", line 52, in main
train_dataloader = build_dataloader(config, 'Train', device, logger)
File "D:\PaddleOCR-release-2.4\ppocr\data_init_.py", line 64, in build_dataloader
dataset = eval(module_name)(config, mode, logger, seed)
File "D:\PaddleOCR-release-2.4\ppocr\data\simple_dataset.py", line 41, in init
) == data_source_num, "The length of ratio_list should be the same as the file_list."
AssertionError: The length of ratio_list should be the same as the file_list.

        经过一顿查找发现是configs文件夹下模型使用的.yml配置文件中data_dir,label_file_list的地址没有写对,这里的地址对应的是自己的数据集路径。

 我的数据集位置及目录结构

原始图片和txt文件都直接放在img-licence文件夹下 。

解决方案

 建议如果遇到问题先去github官网直接搜,真的能节约很多时间,血的教训!!!

 

 

 


                
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值