angelolab / ark-analysis

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

Pin to scikit-image to v0.19.3 #1060

Closed camisowers closed 11 months ago

camisowers commented 11 months ago

If you haven't already, please read through our contributing guidelines before opening your PR

What is the purpose of this PR?

Closes #1055. Improves fiber segmentation results by pinning scikit-image to an older version.

How did you implement your changes

Update pyproject.toml.

Remaining issues

Short term solution. Should be looked into for a more permanent fix in the future.

camisowers commented 11 months ago

I looked at the frangi implementation in skimage.filters.ridges and it looks like one of the key differences is in the handling of the gamma parameter. In 0.19.3, it's automatically set to 15, whereas in >=0.20.0, it's dynamically computed based on the eigenvalues by default. Maybe as a step 0 try manually setting the gamma param to 15 and see how that turns out?

Sorry I added this comment to the issue, but not the PR description: I was able to get something comparable to the previous implementation by tweaking a few parameters (gamma for one, and also the fiber widths). It's much better than the current version but still not as good as using scikit-learn v0.19.3. I can further look into adjusting the code with v0.21 at the end of the month, but in the interim we should pin it.

camisowers commented 11 months ago

Does it need to be exactly this version, or just less than or equal?

Less than or equal should be fine.