Image size limitations for Weka Segmentation Training

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Image size limitations for Weka Segmentation Training

clarkj
Hi,

I'm trying to do an image classification on a large
2992 by 2000 (23Mb) .jpg image  from a 24MPix
DSLR. I only have four classes and when I go to train
it I get the following string


Warning: at least one dimension of the image is
larger than 1024 pixels. Feature stack creation
and classifier training might take some time
depending on your computer.
The traning did not finish.
Creating feature stack...
Updating features of slice number 1...
Error when updating feature stack.
Feature stack was not updated.
The traning did not finish.

I'm running and updated Fiji on a Macpro 2.2GHz i7
with 8GB of ram.

Any Ideas why this isn't working. Is it the image size,
type, or some other factor?

Thanks,

Jeff Clark
Department of Geology
Lawrence University

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Image size limitations for Weka Segmentation Training

Ignacio Arganda-Carreras
Hello Jeff,

It might happen that you run out of memory, but it seems surprising. Can
you please check how much memory is Fiji using (Edit > Options > Memory and
threads)?

Another thing you can try is to reduce the number of features that are
checked in the settings, to see if that makes it work.

Let me know how it goes!

ignacio


On Fri, May 16, 2014 at 1:53 PM, Jeff Clark <[hidden email]> wrote:

> Hi,
>
> I'm trying to do an image classification on a large
> 2992 by 2000 (23Mb) .jpg image  from a 24MPix
> DSLR. I only have four classes and when I go to train
> it I get the following string
>
>
> Warning: at least one dimension of the image is
> larger than 1024 pixels. Feature stack creation
> and classifier training might take some time
> depending on your computer.
> The traning did not finish.
> Creating feature stack...
> Updating features of slice number 1...
> Error when updating feature stack.
> Feature stack was not updated.
> The traning did not finish.
>
> I'm running and updated Fiji on a Macpro 2.2GHz i7
> with 8GB of ram.
>
> Any Ideas why this isn't working. Is it the image size,
> type, or some other factor?
>
> Thanks,
>
> Jeff Clark
> Department of Geology
> Lawrence University
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>



--
Ignacio Arganda-Carreras, Ph.D.
Seung's lab, 46-5065
Department of Brain and Cognitive Sciences
Massachusetts Institute of Technology
43 Vassar St.
Cambridge, MA 02139
USA

Phone: (001) 617-324-3747
Website: http://bioweb.cnb.csic.es/~iarganda/index_EN.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Image size limitations for Weka Segmentation Training

clarkj
In reply to this post by clarkj
Hi Ignacio,

Thanks for the quick reply.

Once I limited the number of "features" under "settings" to 2 (gaussian blur and difference) it worked fine. I now have a classified image. Thank you!

But now the embarrassing noob question. How do I find the proportion of the ROI of each color?

Cheers,

Jeff

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Image size limitations for Weka Segmentation Training

Ignacio Arganda-Carreras
Hello Jeff,

If you have two classes, this macro should do it:

// id values of each class in the classified image
classLabels = newArray( 0, 1 );

setBatchMode( true );

run("Set Measurements...", "area_fraction redirect=None decimal=3");

for( i=0; i<classLabels.length; i ++ )

{
minTh = classLabels[ i ];

maxTh = classLabels[ i ];

  if( i < classLabels.length - 1 )
maxTh = classLabels[ i+1 ] -1;
else
  {
minTh = classLabels[ i-1 ] +1;
 maxTh = classLabels[ i ];
 }

  selectWindow("Classified image");

  run("Duplicate...", "title=[to-be-thresholded]");

selectWindow("to-be-thresholded");

  setThreshold( minTh, maxTh );

run("Convert to Mask");

  run("Measure");

close();
}


On Fri, May 16, 2014 at 11:36 PM, Jeff Clark <[hidden email]> wrote:

> Hi Ignacio,
>
> Thanks for the quick reply.
>
> Once I limited the number of "features" under "settings" to 2 (gaussian
> blur and difference) it worked fine. I now have a classified image. Thank
> you!
>
> But now the embarrassing noob question. How do I find the proportion of
> the ROI of each color?
>
> Cheers,
>
> Jeff
>
>


--
Ignacio Arganda-Carreras, Ph.D.
Seung's lab, 46-5065
Department of Brain and Cognitive Sciences
Massachusetts Institute of Technology
43 Vassar St.
Cambridge, MA 02139
USA

Phone: (001) 617-324-3747
Website: http://bioweb.cnb.csic.es/~iarganda/index_EN.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html