-
Notifications
You must be signed in to change notification settings - Fork 2
Preprocessing wingdisc #66
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
Preprocessing wingdisc #66
Conversation
…processing_wingdisc
…float rescale factors)
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
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.
some tiny comments @Skxsmy - looking good. Almost there, I think :)
|
||
# Apply median filter to the downsampled image | ||
mf_image = median_filter(down_sampled_image, size=3) | ||
mf_image = np.pad(mf_image, ((15, 15), (0, 0), (0, 0)), mode="reflect") |
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.
mf_image = np.pad(mf_image, ((15, 15), (0, 0), (0, 0)), mode="reflect") | |
mf_image = np.pad(mf_image, ((15, 15), (0, 0), (0, 0))) |
I think?
normalised_image = (mf_image - np.min(mf_image)) / ( | ||
np.max(mf_image) - np.min(mf_image) | ||
) |
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.
Think we are "squishing" the range of pixels too much here for our new images?
normalised_image = (mf_image - np.min(mf_image)) / ( | |
np.max(mf_image) - np.min(mf_image) | |
) | |
normalised_image = (mf_image - np.min(mf_image)) / (( | |
np.max(mf_image) - np.min(mf_image)*65535 | |
) |
maybe? (to limit to unsigned int 16)
Or we can try using the bias correction algorithm we used for the bird template instead of this.
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.
Or actually, after discussing today, replace with slice-wise normalisation?
daa6613
to
52ee4d2
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #66 +/- ##
========================================
- Coverage 8.63% 8.42% -0.21%
========================================
Files 16 17 +1
Lines 730 748 +18
========================================
Hits 63 63
- Misses 667 685 +18 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This looks good now @Skxsmy , 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.
Thanks @Skxsmy
normalised_image = (mf_image - np.min(mf_image)) / ( | ||
np.max(mf_image) - np.min(mf_image) | ||
) |
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.
Or actually, after discussing today, replace with slice-wise normalisation?
Before submitting a pull request (PR), please read the contributing guide.
Please fill out as much of this template as you can, but if you have any problems or questions, just leave a comment and we will help out :)
Description
Add functionality of preprocessing wing disc images for future template building.
What is this PR
Why is this PR needed?
Enable software to preprocess wingdisc images.
What does this PR do?
Add preprocessing pipeline for wing disc images.
References
Please reference any existing issues/PRs that relate to this PR.
How has this PR been tested?
Locally and with pre-commits
Is this a breaking change?
No
Does this PR require an update to the documentation?
If any features have changed, or have been added. Please explain how the documentation has been updated (and link to the associated PR). See here for details.
Checklist: