I am new to Weka, and from the examples on how to use it, I have only seen text problems. Can I use images in Weka with the machine learning classifiers?
Mike Mayo shows that with appropriate features, Weka can be used to classify images.
Weka supports several standard data mining tasks, more specifically, data pre-processing, clustering, classification, regressing, visualization and feature selection.
Weka is a collection of machine learning algorithms for data mining tasks. The algorithms can either be applied directly to a dataset or called from your own Java code. Weka contains tools for data pre-processing, classification, regression, clustering, association rules, and visualization.
Weka's Visualize panel lets you look at a dataset and select different attributes – preferably numeric ones – for the x- and y-axes. Instances are shown as points, with different colors for different classes. You can sweep out a rectangle and focus the dataset on the points inside it.
You can directly do pixel classification using the Trainable Weka Segmentation
plugin (former Advanced Weka Segmentation plugin) from Fiji/ImageJ
.
The plugin is designed for segmentation via interactive learning. This means the user is expected to select a set of features (edge detectors, texture filters, etc.), choose the number of classes (by default there are 2) and interactively draw (with the ROI tools) samples of all classes. After training the classifier based on those samples, the whole image pixels will be classified and the segmentation result will be displayed overlaying the original image. The idea is to repeat this process (drawing + training) until obtaining a satisfying segmentation.
The plugin provides as well a set of tools to save/load the samples in ARFF format
and save/load the classifier in .model format, so it's completely compatible with the latest version of WEKA.
If what you want to do is image classification, you might be able to reuse some of the plugin's methods as well.
You can use open source Image processing application such as ImageJ
and Fiji
to extract features from your image and use it in Weka
Fiji has a plugin called Advanced Weka Segmentation which should be very useful in applying Weka classifiers to Image
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With