We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
extensions = ['jpg', 'JPG', 'jpeg', 'JPEG', 'png', 'PNG'] # ... for extension in extensions: file_glob = os.path.join(image_dir, '*.' + extension) file_list.extend(gfile.Glob(file_glob))
在Windows上,后缀大小写不区分,同一张图片会被载入两次:
The text was updated successfully, but these errors were encountered:
哇, 你真细心! `file_list = [] for extension in extensions: file_glob = os.path.join('./tttt', '*.' + extension) file_list.extend(gfile.Glob(file_glob))
file_list Out[11]: ['.\tttt\0018_num6235.png', '.\tttt\0023_num5141.png', '.\tttt\0023_num8005.png', '.\tttt\0018_num6235.png', '.\tttt\0023_num5141.png', '.\tttt\0023_num8005.png']`
这样可能会解决这个重复的问题: for file_name in list(set(file_list)):
for file_name in list(set(file_list)):
Sorry, something went wrong.
是的,windows下只保留小写或者大写就可以了,用set过滤也不错。不管也可以,不影响训练。
No branches or pull requests
在Windows上,后缀大小写不区分,同一张图片会被载入两次:
The text was updated successfully, but these errors were encountered: