How do I label images from a CSV file?

How do I label images from a CSV file?

I have 1500+ TIF images which are defined in a corresponding label.csv file on my machine, which contains 2 columns of attributes needed for supervised learning.

I’m brand new to Knime, so any assistance is appreciated, thanks.


Hi @asrichardson,
You want to use a List files node followed by an Image Reader (Table) node to read all images into a table.
Next you read the csv file using a File Reader node.
To combine the labels with the images, use a Joiner node. You might need to manipulate the tables using e.g. string manipulation nodes to get a column that contains the same values in both tables to join over.


Thank you for this, very helpful. I started going down this path, but you confirmed it. Thanks again.

Hi Gabriel,

I was able to use the joiner and create a table that has the images in a column and also the other labels. I was then able to use the partitioning node to make (2) other table for Train and Test data at an 80/20 split.

I am now trying to use the “Supervised Image Segmentation” node to perform classification on the images, using the labels as a reference, but I keep getting a “No column in spec is compatible to imgplusvalue” error.

I simply want to classify (multi-class) the images to the label I have added, so that I build a model that can classify on the multi-class problem when I feed it new unseen data.

Attached is my high-level workflow.

Any ideas or suggestions to other workflows is helpful, thanks.


Hi @asrichardson,
the error means that there are no Image values available in the input table to the node that throws this error. In your case this means you either need to use a node that only calculates features on segments, such as the Segment Features node, or to add the images to the table, e.g. by changing the Column Settings in the Image to Labeling node from New Table to Append.


1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.