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

遇到的一些问题和疑惑(creat_lmdb_dataset 和convert模块) #102

Open
fyy0322 opened this issue Jul 4, 2024 · 0 comments
Open

Comments

@fyy0322
Copy link

fyy0322 commented Jul 4, 2024

首先就是博主提供的数据集和训练集的txt文件中的内容是已经编码好的,图片的相对路径后跟的不是文字而是数字。但是问题在于好像这些数字的索引和Alphabets是不对应的;第二,代码labelList = []
for line in imagePathList:
word = line.split()[1]
labelList.append(word)
似乎应该修改成labelList = []
for line in imagePathList:
word = line.split()
labels=word[1:]
labelList.append(labels)
这样labels才能将第一个元素(也就是图片路径)后的所有元素(也就是文本字符)添加到 labelList中。并且,在处理字符数据并将其存储到 LMDB 数据库时,通常的步骤是先将字符编码,然后再将编码后的数值索引存储到 LMDB 数据库。这种方式更高效,也更符合实际操作流程。所以对于在百度网盘中的数据集,其实都不需要进行convert转换了的。这是目前我遇到问题后从头开始研究想到的一些可能的问题

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

1 participant