文件路径兼容
#12723
Replies: 1 comment
-
因PPOCRLabel已经搬家了,后续有问题请移步PPOCRLabel提问哈! |
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.
Uh oh!
There was an error while loading. Please reload this page.
-
请提供下述完整信息以便快速定位问题/Please provide the following information to quickly locate the problem
系统环境/System Environment:MacOS
版本号/Version:Paddle:2.6.0 PaddleOCR:2.6.0 问题相关组件/Related components:none
运行指令/Command Code:python gen_ocr_train_val_test.py --trainValTestRatio 6:2:2 --datasetRootPath /Users/xxxx/Documents/images
完整报错/Complete Error Message: No such file or directory: '/Users/xxxx/Documents/images/crop_img\\11_crop_6.jpg'
我们提供了AceIssueSolver来帮助你解答问题,你是否想要它来解答(请填写yes/no)?/We provide AceIssueSolver to solve issues, do you want it? (Please write yes/no):no
请尽量不要包含图片在问题中/Please try to not include the image in the issue.
PPOCRLabel/gen_ocr_train_val_test.py文件第42行,使用"\\"拼接路径,在mac上会报错找不到文件。
imagePath = os.path.join(dataAbsPath, "{}\\{}".format(args.recImageDirName, imageName))
建议改成
imagePath = os.path.join(dataAbsPath, os.path.join(args.recImageDirName, imageName))
Beta Was this translation helpful? Give feedback.
All reactions