GPU accelerated image processing for everyone
Trains a Weka model using functionality of Fijis Trainable Weka Segmentation plugin.
It takes a 3D feature stack (e.g. first plane original image, second plane blurred, third plane edge image)and trains a Weka model. This model will be saved to disc. The given groundTruth image is supposed to be a label map where pixels with value 1 represent class 1, pixels with value 2 represent class 2 and so on. Pixels with value 0 will be ignored for training.
Categories: Segmentation, Machine Learning
Availability: Available in Fiji by activating the update sites clij and clij2. This function is part of clijx-weka_-0.32.0.1.jar.
Ext.CLIJx_trainWekaModel(Image featureStack3D, Image groundTruth2D, String saveModelFilename);
// init CLIJ and GPU import net.haesleinhuepf.clijx.CLIJx; import net.haesleinhuepf.clij.clearcl.ClearCLBuffer; CLIJx clijx = CLIJx.getInstance(); // get input parameters ClearCLBuffer featureStack3D = clijx.push(featureStack3DImagePlus); ClearCLBuffer groundTruth2D = clijx.push(groundTruth2DImagePlus);
// Execute operation on GPU CLIJxWeka2 resultTrainWekaModel = clijx.trainWekaModel(featureStack3D, groundTruth2D, saveModelFilename);
// show result System.out.println(resultTrainWekaModel); // cleanup memory on GPU clijx.release(featureStack3D); clijx.release(groundTruth2D);
% init CLIJ and GPU clijx = init_clatlabx(); % get input parameters featureStack3D = clijx.pushMat(featureStack3D_matrix); groundTruth2D = clijx.pushMat(groundTruth2D_matrix);
% Execute operation on GPU CLIJxWeka2 resultTrainWekaModel = clijx.trainWekaModel(featureStack3D, groundTruth2D, saveModelFilename);
% show result System.out.println(resultTrainWekaModel); % cleanup memory on GPU clijx.release(featureStack3D); clijx.release(groundTruth2D);