-
Notifications
You must be signed in to change notification settings - Fork 76
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
WIP: 1d and non squared 2d input shapes #74
WIP: 1d and non squared 2d input shapes #74
Conversation
…niform* fixtures to almost_uniform_2d*
- get_channel_first -> is_channel_first - get_channel_first_batch -> make_channel_first - get_channel_last_batch -> make_channel_last
…rst and make_channel_last.
I did some first work today for 1d-support, mainly working on For better clarity I renamed the channel first methods as can be seen here:
I hope you don't mind the renaming. |
…ng metrics has to be done next.
…ould actually support any number of dimensions.
Codecov Report
@@ Coverage Diff @@
## main #74 +/- ##
==========================================
- Coverage 97.36% 94.18% -3.18%
==========================================
Files 16 16
Lines 2235 2458 +223
==========================================
+ Hits 2176 2315 +139
- Misses 59 143 +84
Continue to review full report at Codecov.
|
This PR is comprehensive but 1d-support is not implemented for the following perturbation functions:
Also:
|
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.
A summary of contribution:
- Comprehensive changes that allow for more flexibility in input shapes for Quantus - 1D and flexible img_sizes where img width != height.
- Additional pytests tests created for these purposes
1d-support is NOT implemented for the following functions/ metrics:
baseline_replacement_by_blur
: uses conv2D_numpy, scipy.signal.convolverotation
,translation_x_direction
,translation_y_direction
: these usecv2
which expect images as inputget_superpixels also doesn't support 1d, as
skimage` uses 2d only.IterativeRemovalOfFeatures
therefore won't work for 1d yet.
Other notes:
- We disregard for now the decrease in code coverage by approx ~3% as it relates to the depreciation warnings added to each of the metrics
- Also an issue is created for making a tutorial to showcase this new functionality New tutorial: for how to use Quantus with 1D shapes #83 but does not necessarily have to be completed to merge this PR
OK - ACCEPTED.
Done as discussed. |
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.
OK
…t-shapes WIP: 1d and non squared 2d input shapes
Add support for 1d and non-squared 2d input shapes