angelolab / ark-analysis

Integrated pipeline for multiplexed image analysis
https://ark-analysis.readthedocs.io/en/latest/
MIT License
70 stars 25 forks source link

Bad filtering in fiber segmentation #1055

Closed camisowers closed 11 months ago

camisowers commented 11 months ago

Please refer to our FAQ and look at our known issues before opening a bug report.

Describe the bug The current fiber segmentation notebook gives worse outputs than previously, although nothing has been changed in our code. Turns out by bumping scikit-image >=0.20 in ark, the frangi filtering step is now pretty different because of the changes made in this PR (scikit-image/scikit-image/pull/6446).

previous vs current ouput

Screenshot 2023-09-05 at 11 32 39 AM

Expected behavior It should look better.

We'll probably need to explore a bit to see what's the best decision moving forward, but here's a few options to consider first:

  1. Pin scikit-image to 0.19.3 (a quick fix but probably not the best long-term plan)
  2. See if we can get better results with the new version of frangi() by tweaking some parameters
  3. Find a new filtering function that works better

To Reproduce Run the fiber segmentation on the example data.

camisowers commented 11 months ago

I think the best option for now is to pin scikit-image for now. I was able to get the filtering using the new version to look somewhat better by changing a few parameters, but this will need a bit more testing to make sure it's consistent across different images.