0

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
gggrunt
  • 31
  • 3

1 Answers1

0

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.

  • A link to a solution is welcome, but please ensure your answer is useful without it: [add context around the link](https://meta.stackexchange.com/a/8259) so your fellow users will have some idea what it is and why it is there, then quote the most relevant part of the page you are linking to in case the target page is unavailable. – cursorrux Jul 06 '22 at 11:54