-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Fix] Fix output dtype of RandomNoise #1585
[Fix] Fix output dtype of RandomNoise #1585
Conversation
Sorry this branch is aimed to add new features to random_degradations. But used to fix a bug first. Really should do that in another branch LOL |
This bug you mentioned is exactly existing. Thanks for your contribution. Does PairedRandomResize be used in any model or some cases? @dienachtderwelt |
Can refer to this paper in section 3.2 where it talks about resizing as part of the data synthesis pipeline: https://arxiv.org/pdf/2203.13278.pdf |
So are you supporting SCUNet based on MMEditing? I think you can create a pull request to commit SCUNet with this PairedRandomResize pipeline together in another PR. And this PR only fixs the bug. |
Actually I’m only using mmediting for training lol |
Merging PairedRandomResize in MMEditing when it's used in some models would be better. Now you can just fix this bug. |
Codecov ReportBase: 87.93% // Head: 87.93% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## dev-1.x #1585 +/- ##
========================================
Coverage 87.93% 87.93%
========================================
Files 399 399
Lines 26059 26059
Branches 4051 4051
========================================
Hits 22914 22914
Misses 2240 2240
Partials 905 905
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Sure. Branch rebased. @Z-Fran |
Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.
Motivation
_apply_poisson_noise() will change image dtype to np.float64. When other RandomNoise exists in degradations it can cause cv2.cvtColor(noise[..., [2, 1, 0]], cv2.COLOR_BGR2GRAY) to collapse.
Modification
Who can help? @ them here!
@liuwenran Thanks for invitation. Here comes my first tech PR 😃
Checklist
Before PR:
After PR: