-
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] Merge resize and sr_resize. #310
Conversation
Codecov Report
@@ Coverage Diff @@
## master #310 +/- ##
==========================================
+ Coverage 80.74% 80.89% +0.15%
==========================================
Files 163 164 +1
Lines 8147 8213 +66
Branches 1194 1194
==========================================
+ Hits 6578 6644 +66
Misses 1425 1425
Partials 144 144
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@@ -33,7 +33,7 @@ class Resize: | |||
keys (list[str]): The images to be resized. | |||
scale (float | Tuple[int]): If scale is Tuple(int), target spatial | |||
size (h, w). Otherwise, target spatial size is scaled by input | |||
size. If any of scale is -1, we will rescale short edge. | |||
size. |
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.
Reason for the deletion?
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.
The code doesn't support scale=-1
if isinstance(scale, float): if scale <= 0: raise ValueError(f'Invalid scale {scale}, must be positive.')
backend (str | None): The image resize backend type. Options are `cv2`, | ||
`pillow`, `None`. If backend is None, the global imread_backend | ||
specified by ``mmcv.use_backend()`` will be used. | ||
Default: "cv2". |
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.
Again, the default backend should be None. Otherwise you will change behavior of old codes
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
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.
In fact, if backend=None, cv2 will be used in mmcv.resize
* [Fix] Merge resize and sr_resize. * Fix * Fix Co-authored-by: liyinshuo <[email protected]>
No description provided.