nathanin / micron2

0 stars 0 forks source link

refactor `pull_nuclei` to get mean values directly from raw uint16 preprocessed data #11

Closed nathanin closed 3 years ago

nathanin commented 3 years ago

Near-0 real signal gets convolved with near-0 background because of the background suppression --> uint8 conversion. We can tell true positives often times due to the non-random conformation of structures in the image upon inspection.

We have a problem of some channels with very low background , and this foreground segmentation approach to suppress low values has not been working well. What happens is a bad background estimate leads to very low values coming "up" and getting set at 1 in the uint8 image. These then contribute to the cell averages that are based on these uint8 images. One scenario where this comes up is when a slide is almost all-zero for a particular channel... or in the case of very rare cells that are not captured in background estimation. This leads to an actual reversing of the stain representation in near-all-0 slides to be near-all-1 instead. We could detect this post-hoc maybe, but added complexity ought to be avoided.

The desired behavior is a perfect segmentation of background signal. We think that the uint16 has enough range to correctly represent real signal albeit low valued, versus near-0 level background. So take average values directly from the uint16 image.

nathanin commented 3 years ago

testing ed31987