Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

训练集Chinese_dataset 下的label 文件load的时候报错 #8

Open
chenzhuo2016 opened this issue Jan 25, 2019 · 2 comments
Open

Comments

@chenzhuo2016
Copy link

报错信息如下: 且每次报错还指向不同的labeltxt,请问有啥解决办法吗
File "F:\Python Project\text-detection-ocr\dlocr\densenet\data_loader.py", line 111, in
for img, label_len, input_len, label in executor.map(lambda t: load_single_example(*t), image_labels):
File "F:\Python Project\text-detection-ocr\dlocr\densenet\data_loader.py", line 96, in load_single_example
label[0: len(image_label)] = [int(i) - 1 for i in image_label] #int 改成float by chenz
File "F:\Python Project\text-detection-ocr\dlocr\densenet\data_loader.py", line 96, in
label[0: len(image_label)] = [int(i) - 1 for i in image_label] #int 改成float by chenz
ValueError: invalid literal for int() with base 10: '也受到了牵连,老是嘟着嘴,无'

@GlassyWing
Copy link
Owner

由于数据集源自其它开源项目,这里也沿用了原来的格式,数据集的格式是这样的:
图像文件名 \t 文本标签在字典中的位置
例如:图像文件名为a.jpg,所对应的标签为你好,那么数据集并非是a.jpg 你好 的格式,假如”你“和”好“在字典中的位置为11和13,则数据集格式应为a.jpg 11 13

@Ianwtg
Copy link

Ianwtg commented Jul 20, 2020

请问有什么工具能快速转换成这种格式的数据集吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants