Skip to content
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 interpolation method checking in Resize #547

Merged
merged 2 commits into from
Nov 19, 2021

Conversation

LeoXing1996
Copy link
Contributor

@LeoXing1996 LeoXing1996 commented Nov 19, 2021

Motivation

mmcv.imresize with pillow backend support different interpolation methods with cv2 ones. Interpolation method checking in Resize raise an error for some of the use case, e.g. Resize(size=SIZE, interpolation='box', backend='pillow').

Modification

Perform an interpolation method check for pillow backend and cv2 backend, respectively.

Checklist

Before PR:

  • Pre-commit or other linting tools are used to fix the potential lint issues.
  • Bug fixes are fully covered by unit tests, the case that causes the bug should be added in the unit tests.
  • The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
  • The documentation has been modified accordingly, like docstring or example tutorials.

After PR:

  • If the modification has potential influence on downstream or other related projects, this PR should be tested with those projects, like MMDet or MMSeg.
  • CLA has been signed and all committers have signed the CLA in this PR.

@CLAassistant
Copy link

CLAassistant commented Nov 19, 2021

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented Nov 19, 2021

Codecov Report

Merging #547 (4e0352c) into master (7977dc8) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #547   +/-   ##
=======================================
  Coverage   79.87%   79.88%           
=======================================
  Files         107      107           
  Lines        6093     6095    +2     
  Branches      987      988    +1     
=======================================
+ Hits         4867     4869    +2     
  Misses       1094     1094           
  Partials      132      132           
Flag Coverage Δ
unittests 79.88% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mmcls/datasets/pipelines/transforms.py 88.22% <100.00%> (+0.04%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7977dc8...4e0352c. Read the comment docs.

Copy link
Member

@mzr1996 mzr1996 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mzr1996 mzr1996 merged commit 49cbfd7 into open-mmlab:master Nov 19, 2021
mzr1996 pushed a commit to mzr1996/mmpretrain that referenced this pull request Nov 24, 2022
* fix interpolation method checking in resize

* revise docstring + add unit test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants