Getting data shapes right when classifying a large # of images

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Getting data shapes right when classifying a large # of images

Jason
I'm following the image classification tutorial, but having to modify it a bit to account for the fact that I'm dealing with ~200,000 images.

I have used File > Import > Image Sequence as a work-around, and I think it would suffice for my purposes but my training data loads in R with 101 columns (slice1, slice2, ... slice101) and the only way I can figure to send the test data to R results in a list of matrices with the correct number of rows, but > 3,000 columns (X1, X2,...X3000).

Can someone help me figure this out?

I also posted this question with more detail on StackOverflow and created a new tag for bio7 on that site:

http://stackoverflow.com/questions/36507974/unequal-column-numbers-of-test-images-to-r-from-imagej-via-bio7
Reply | Threaded
Open this post in threaded view
|

Re: Getting data shapes right when classifying a large # of images

Marcel
Hello Jason,

the problem is that "Pixel" action only transfers pixel data from one selection. This action is extra available
if you don't want to use the ROI Manager of ImageJ.

If you import the image sequence you can e.g. transfer one ROI from the ROI Manager with the "Pixel RM Stack" action in the best data efficient data type.

Documentation:

http://bio7.org/manual/Main.html#toc-Subsection-4.4.3

http://bio7.org/manual/Main.html#toc-Subsubsection-4.4.3.1

In addition you can also transfer images (imported image sequence as a stack) with the Java API and then
classify and store images one by one, e.g. with a Groovy or Jython script calling the Rserve API.

See example here:

http://bio7.622846.n4.nabble.com/Use-ProcessAviStack-Java-tp4640289p4640290.html


Apropos you can import the image sequence as a virtual stack (disk resident images) to save RAM memory, see:

https://imagej.nih.gov/ij/docs/guide/146-8.html

Reply | Threaded
Open this post in threaded view
|

Re: Getting data shapes right when classifying a large # of images

Marcel
This post was updated on .
In reply to this post by Jason
See also on YouTube:

https://www.youtube.com/watch?v=CyGB8uUjbWk&list=PLzCgXMp4TBsVKSRHZ8Q9y_3ZSlGl2kcrp&index=3

Apropos the 'Selection' button only transfers the selection coordinates and not the pixel data.

See:

https://www.youtube.com/watch?v=P2NflfBB2Tg


I think the last step in the tutorial can be misleading for a hughe number of images because it uses only one image.

And with this method you can simply omit a signature whereas the 'Pixel RM Stack' method always create a signature column which of course can be deleted afterwards (I used the 'Pixel' transfer in the video to make it as simple as possible).