Help to choose the correct scale to apply the network
Opened this issue · 2 comments
To get the correct segmentation it's important that the objects on the new image are approximately the same size as in the training data. This doesn't necessarily mean that the voxel size should be the same.
For example, if I apply the same generic_plant_nuclei_3D
to an image scaled differently, I can get results as different as the following:
raw
nuclei channel of prediction
nuclei channel of prediction for a rescaled image
Suggestion: add a function similar to Cellpose's average diameter. Make a look up table for each available model with an average size of the segmented objects, then suggest the user to estimate the expected size in their data and get the rescale factors from this. For example, a model was trained on the ground truth where average nuclei size in pixels was (50, 50, 50). In user's data the size is (10, 100, 100) (estimated by just counting pixels in the image). Then suggest rescaling with factors (5, 0.5, 0.5).
The way that it is now it's not obvious that correct scaling is important, so a non-expert user can just decide that none of the networks work for them.
According to Lorenzo, this was in fact a feature since the beginning of PlantSeg. It has been improved in #249 in response to this issue, and I think it will be merged into master tomorrow.