Receptive field measure improvement
etasnadi opened this issue · comments
The _compute_receptive_field
function sometimes crashes during prediction with the following error:
ValueError: zero-size array to reduction operation minimum which has no identity
.
The issue is that ind
can contain empty arrays if y
and y0
are the same in line
stardist/stardist/models/base.py
Line 1078 in c056445
Second, since only one point is placed in x
to test the receptive field size, it is normal that the prediction stays zero if a model is properly trained on larger objects. It would be better to run this function prior loading the weights because it would have a higher change of not predicting zero output for a single test pixel.
I can make a pull request if anybody is interested in the fix.