SVMs/k-NNs for image classification?

Hi, I have a data set of about 2100 gray scale PNG images belonging to 2 classes, which is split into sub-directories as

  • train (80%)
    • class 1
    • class 2
  • test (10%)
    • class 1
    • class 2
  • valid (10%)
    • class 1
    • class 2

So far, I have tried transfer learning via ResNets and VGG16 in keras, and it yields good results.
Now, I want to check how the traditional machine learning algorithms like SVMs and k-NNs perform on the same data set.

However, I do not know how to prepare data or read in this image data which is present in this keras style train-test-valid directories format for SVMs/k-NNs to work on. I’d be grateful if someone who has experience doing such tasks could help or provide links to tutorials.

PS : Sorry if I sound inexperienced, I’ve only had the experience of working with tabular data like CSV files in R before this. I don’t have a lot of prior exposure to Python or Image classification tasks.