-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove scikit image #2011
Remove scikit image #2011
Conversation
Reviewer's Guide by SourceryThis pull request removes the dependency on scikit-image and modifies the superpixels function to use numpy operations instead. The changes aim to optimize the implementation and reduce external dependencies. Entity relationship diagram for setup.py dependencieserDiagram
INSTALL_REQUIRES {
string numpy
string scipy
string PyYAML
string typing-extensions
string pydantic
}
note for INSTALL_REQUIRES "Removed scikit-image dependency"
Class diagram for the updated superpixels functionclassDiagram
class SuperpixelsFunction {
- skimage.measure.regionprops(segments + 1, intensity_image=image[..., c])
+ np.unique(segments)
+ np.mean(image_sp_c[mask])
}
note for SuperpixelsFunction "Replaced scikit-image operations with numpy operations"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @ternaus - I've reviewed your changes - here's some feedback:
Overall Comments:
- Great initiative in removing the scikit-image dependency. To ensure the change doesn't introduce any regressions, please provide information on the testing performed, especially comparing the output of the new implementation with the old one across various input types and edge cases.
- Consider adding performance benchmarks comparing the new implementation to the old one. This information would be valuable for users and could highlight the benefits of this change.
- Some comments in the
superpixels
function (e.g., about 'segments+1') are no longer relevant to the new implementation. Consider updating or removing these to reflect the current approach.
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Fixes: #1895
Summary by Sourcery
Remove the dependency on scikit-image by refactoring the superpixels function to use numpy operations instead of regionprops, and update the setup.py to reflect this change.
Enhancements:
Build: