Image Classification with AutoML component possible?

Hi everyone,

I am testing out knime and am trying to do a binary image classification, wanting to use the AutoML component. According to the AI assistant, I need a table with an image column and a target label column. So I create those and then use this table as an input for the AutoML component.

However, this fails and looking in the configuration of the component, I see that I am unable to select the image column as a feature.

So, am I doing anything wrong in the preperation of the input data or is the AutoML component unable to do image classification?

I am unfamiliar with the AutoML node, but I suspect you need to do some preprocessing and data prep to ensure your dataset is in a proper place before any Machine Learning or Deep Learning flow.

The above screenshot is an example of a simple end-to-end flow that does the following:

  • read in a directory of images
  • ensures they are all the same size
  • takes the list of files and makes it a table
  • extract the label from the file path (images in the same folder share a label)
  • Flatten out the dataset such that each pixel in the image is a column
  • Apply a model to the data

This is a very simple approach, one I use with my MBA students to understand how ML can be applied to images. Other approaches work on the image directly; you may consider reviewing Convolution Neural Nets (CNN).

One last point. I enjoy using the AI feature in KNIME, but I have found that it can “hallucinate” solutions that seem plausible but require more work to get a workflow running as desired. Other times it will suggest nodes that do not exist.

Below is the workflow shown in the screenshot.

basic-images-ml.knar.knwf (173.0 KB)

3 Likes

Thanks for the response and the workflow, I will have a look at it.

I tried to find a more extensive documentation of the AutoML component (AutoML – KNIME Community Hub) regarding the supported input data types, but this does not seem available. Given the available options in the “Type Selection”-view for feature selection, numeric, string and date/time are probably the supported input data types:

I agree that the solution from the AI feature that I got is probably a hallucination, as the links it provided also do not contain relevant information.

@jfleiss this component might not be the right one or you would have to invest in data preparation.

Here is an example of an image classification workflow (adapted from this one). Although this might currently not work on Apple silicon.

2 Likes