YAPiC: New open source pixel classification software

Dear image.sc community,

we finally released YAPiC (yet another pixel classifier, based on deep learning).

Pixel classification in YAPiC is based on deep learning with fully convolutional neural networks.
YAPiC was designed to make this kind of AI powered pixel classification simply applicable, i.e feasible to use for a PhD student in his/her imaging project.

“Simply applicable” means here in detail:

  • Easy to install.
  • Working out of the box with 3D multichannel images saved with Fiji.
  • Easy collection of label data by utilizing the great Ilastik user interface.
  • Support of sparse labels. From our experience, labels can be collected within a few hours by one single person.
  • Simple command line and programming interface (Python).

YAPiC was developed by my former co-worker Manuel Schölling and me, as part of our work at the Image and Data Analysis Facility, Core Research Facilities, DZNE Bonn. Within the last years, we applied YAPiC to many imaging projects of our users. It’s now a central tool for us and used on a daily basis.

We are happy to share this useful tool with the community. Of course, we highly appreciate bug reports and pull requests.

12 Likes

Is the YAPiC available as a check box in the FIJI update facility?

1 Like

No, it is not an ImageJ plugin, but a Python package and can be installed with pip.

1 Like

Hi, @cmohl2013. Very intriguing piece of work! Bravo!

I got some practical questions here:
I saw in your tutorial, user have to specify the .ilp and the *.tif.
I do not really understand why. In ilastik project file, the raw image data or the image data path are saved inside. Can’t I just feed Yapic with this all-included project ? Do I have to specify the raw image data separately ?

Dear @BioinfoTongLI, thank you!

Good question. You are right, the ilastik project file already contains a path string
for each image. However, if you move the .ilp and referenced .tif images
to another location, you will have to update the new path for each image in ilastik,
which is quite tedious if you have, say 30 training images.

In our standard workflow, users label data on their own laptops, then we move both
.ilp file and .tif images to a gpu workstation or server. Setting the new path
directly in the command line tool turned out to be much more convenient.

But I see your point. Best solution would be, to make the path for pixel images optional.

By the way, you can also use masks in .tif format as label data instead of .ilp files. In this case, the path for pixel images is absolutely necessary. See CLI documentation.

I see what you mean. But I think you missed an option in ilastik…
You can also manually force a in-project save of raw pixel data.
Right click on raw image data, you will see this.
Screenshot%20from%202019-05-20%2010-23-26
Of course, doing like this will give a huge. ilp file. But I personally prefer this way.:slight_smile:
It seems that some modifications here will do the trick. I’d love to help on that. But I am preparing my thesis defense. So… :joy:

BTW, have images saved in .ilp file, you will know the shape of images. That might help to skip the Fiji based image preprocessing (save part, I mean) ?

1 Like

Saving image data to the project file is also what @ilastik_team recommend to allow portability of an ilastik project.
That’s also what we’re using when running the #ilastik headless integration in #knime.
I agree with @BioinfoTongLI that it would be preferable not to have to provide an extra image path if the image data are stored in the project file already.

Cool, I didn’t know that, indeed. Would be very useful to support this in YAPiC.

Correct: We recommend to save with Fiji, because we read the tiff header to get image dimensions. Reading pixels directly from .ilp file would make things safer (I guess that pixel values are saved directly in hfd5 container)

good luck with your defence!!:+1:

Thank you!
Yeah, it would be great to see Yapic run painlessly with ilastik project. Can’t wait to see this :wink:
In fact, why not wrap YAPiC into ilastik as a workflow (or a widget) ?
GPU installation can be a little painful. But this is the direction where ilastik is heading to, isn’t it?
@ilastik_team @k-dominik

1 Like

I’m a little skeptical on that, because the ilastik team is working on a different
deep learning implementation and we don’t want to compete with it. I saw the presentation in December at the I2K conference in Heidelberg. It looked really great.

A the moment I see YAPiC more as an easy-to-use Python library and command line tool. In the future it would be interesting to add a web api.

1 Like

Do we have competition in open science ? Everyone is friendly, isn’t it :wink: ?
I believe it’s just like the name of YAPiC. It’s just Yet another option. Diversity makes our society better.
But, of course. You are in charge. No matter it’s in ilastik or not.
Thank you for your effort for this handy tool! :clap:
Knowing that It’s super convenient to have CLI option for Python enthusiast and I’m one of them.