-
Notifications
You must be signed in to change notification settings - Fork 0
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
Refactor code #3
Conversation
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.
Looks good !
README.md
Outdated
This is the official implementation of [MicroSSIM](https://arxiv.org/abs/2408.08747), accepted at BIC, ECCV 2024. | ||
# MicroSSIM | ||
|
||
MicroSSIM is an image metrics aimed at addressing the shortcominbs of the Structural |
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.
it is a "measure" and not a metric.
spelling of shortcoming
README.md
Outdated
# MicroSSIM | ||
|
||
MicroSSIM is an image metrics aimed at addressing the shortcominbs of the Structural | ||
Similarity Index (SSIM), in particular in the context of microscopy images. Indeed, |
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.
M in SSIM is missing . M is for measure
Unfortunately, between the lack of time and me trying to understand the code, the refactoring has been performed on sight until a few commits ago where I finally formed an idea of what I wanted. The fact that everything moved to
src
layout in such a big PR, means that everything is basically new... Making reviewing the PR kinda difficult... Let's discuss it!Here is a summary of the changes, sorted by categories.
Tooling
src
layout (see reasons here)pyproject.toml
to hold the package metadata and packaging instructions.pyproject.toml
, createdev
optional dependencies.sybil
) to test the examples in the doc.Testing and chore
Refactoring and changes
Main code base
np.ravel
to avoid unnecessary array copy (seeMicroSSIM
class).SSIMElements
andScaledSSIM
). This allows better static code checking and type inference, as well as being more readable.microssim.ssim
,microssim.ri_factor
,microssim.image_processing
) and split into different files (e.g.ri_factor.py
,mse_ri_factor.py
). The final modules are kinda similar to what you had though, just with different names and in submodules.get_ri_factor
).micro_structural_similarity
), this method is compatible with lists of arrays and arrays with a 3rd dimension.MicroSSIM
to make the internal calls simpler to follow, refactor some of the code into utility functions in other submodules (e.g. normalization, parameters computation).Example notebook
utils
).Others