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

[Enhancement] Support resize or rescale to multiple #1121

Merged
merged 5 commits into from
Jun 24, 2021

Conversation

Junjun2016
Copy link
Contributor

Motivation

To meet the requirement of some networks that the size of the input image should be multiple to the divisor

Modification

Add divisor argument to imresize and imrescale in mmcv.image.
This argument rounds up the resized or rescaled image size to the nearest value that can be divisible by the divisor.

@CLAassistant
Copy link

CLAassistant commented Jun 21, 2021

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented Jun 22, 2021

Codecov Report

Merging #1121 (1da5f4c) into master (f7caa80) will increase coverage by 0.08%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1121      +/-   ##
==========================================
+ Coverage   67.64%   67.72%   +0.08%     
==========================================
  Files         159      159              
  Lines       10295    10315      +20     
  Branches     1858     1865       +7     
==========================================
+ Hits         6964     6986      +22     
+ Misses       2965     2964       -1     
+ Partials      366      365       -1     
Flag Coverage Δ
unittests 67.72% <100.00%> (+0.08%) ⬆️

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

Impacted Files Coverage Δ
mmcv/image/__init__.py 100.00% <ø> (ø)
mmcv/image/geometric.py 94.67% <100.00%> (+0.47%) ⬆️
mmcv/utils/misc.py 95.00% <0.00%> (+1.42%) ⬆️

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 f7caa80...1da5f4c. Read the comment docs.

mmcv/image/geometric.py Outdated Show resolved Hide resolved
mmcv/image/geometric.py Outdated Show resolved Hide resolved
mmcv/image/geometric.py Outdated Show resolved Hide resolved
mmcv/image/geometric.py Outdated Show resolved Hide resolved
mmcv/image/geometric.py Outdated Show resolved Hide resolved
@ZwwWayne
Copy link
Collaborator

LGTM, can be merged if @xvjiarui has no further comments.

mmcv/image/geometric.py Outdated Show resolved Hide resolved
@ZwwWayne ZwwWayne merged commit 49a1d34 into open-mmlab:master Jun 24, 2021
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.

4 participants