有没有办法将sklearn.datasets.datasets.load_files用于图像文件
尝试将自定义文件夹与x,y = sklearn.datasets.datasets.load_digits(return_x_y = true)
用于SkLearn Image分类任务。 load_files可以执行我需要的工作,但似乎是为文本文件创建的。使用图像文件的任何技巧都将不胜感激。
我有以下结构中存储的图像文件
DataSet/label1/image1.png
DataSet/label1/image2.png
DataSet/label1/image3.png
DataSet/label2/image1.png
DataSet/label2/image2.png
Trying to use custom folders with images instead of X, y = sklearn.datasets.load_digits(return_X_y=True)
for sklearn image classification tasks.
load_files does what I need, but it seems to be created for text files. Any tips for working with image files, would be appreciated.
I have the image files stored in following structure
DataSet/label1/image1.png
DataSet/label1/image2.png
DataSet/label1/image3.png
DataSet/label2/image1.png
DataSet/label2/image2.png
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我有相同的任务,并找到了此线程:使用Sklearn Load_files()将来自PNG的图像作为数据
希望,这对您也有帮助。
I had the same task and found this thread: Using sklearn load_files() to load images from png as data
Hopefully, this helps you too.