fiji / microscope-image-quality

TensorFlow-based classifier for microscope image focus quality.
https://imagej.net/Microscope_Focus_Quality
Apache License 2.0
17 stars 2 forks source link

Question about feeding in inputs #2

Closed bergwerf closed 6 years ago

bergwerf commented 6 years ago

I am studying this source code (and in particular the underlying libraries) to figure out how to implement a similar plugin. In this plugin it seems the entire image is feeded in as one tensor: https://github.com/fiji/microscope-image-quality/blob/3ac47e8fb8e9dd3de6f7a8dc339ca0aacd390798/src/main/java/sc/fiji/imageFocus/MicroscopeImageFocusQualityClassifier.java#L176. As far as I can tell the model in the original code is constructed for patches (e.g. https://github.com/google/microscopeimagequality/blob/7431730eb939c662655561de99f4c2445f94cb87/microscopeimagequality/miq.py#L97). So far I have been unable to figure out where exactly the conversion from a full image to a stack of patches is done. Perhaps someone who worked on this plugin can point this out? (then I can do the same for my case so I don't have to take care of the patches myself). I am also curious what happens when the patches do not align, from trying this plugin it seems the edge edge were no patches can be fitted is just ignored (rather than shifting and having overlapping patches as a result).

ctrueden commented 6 years ago

I did not work on the Python code, so my analysis is not expert, but here is my read of it:

@samueljyang, please correct me if I am wrong.

I am also curious what happens when the patches do not align

What I observed is that partial patches along the bottom and right edges are not considered.