Error running the ClassifyPixels-Unet plugin

I dear,
I’ve run CellProfiler from source in Windows 10 and I’m trying to use ClassifyPixels-Unet plugin.
In the end, when I try to run plug-in module I get an error saying as follow:
“Your are trying to load a weight file contianing 29 layers into a model with 21 layers.” and is impossibile to run the test. As I read online seems to be a problem of serialization with Keras, but I’m running ver. 2.2.4. and this should be the right version.

What I can do? Any help would be appreciated!

Thanks in advance.

I think you need an earlier version of Keras (earlier than 2.2) but I don’t know exactly which one. When I tried to use the plugin with Keras 2.2.1 I ran into some bugs (I don’t think it was the same one though) and I fixed them for my own use (see this pull request, but that may again be outdated).

If it is of interest, I also grabbed the trained model for nuclei detection, extracted the code from the Cellprofiler plugin and turned them into a stand-alone python package so I can run the detection without the other Cellprofiler dependencies. This one will require python >= 3.6 though. I also added some instructions on how to get GPU acceleration using PlaidML-Keras if you have a GPU that is not supported by CUDA. See here: