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 potential interger overflow in imequalize. #1198

Merged
merged 2 commits into from
Jul 14, 2021

Conversation

mzr1996
Copy link
Member

@mzr1996 mzr1996 commented Jul 13, 2021

Motivation

imequalize in mmcv have a potential integer overflow bug and get result like the following image:
mmcv

While in Pillow, it's right.
Pillow

Modification

Conver all numbers in lut greater than 255 to 255.

BC-breaking (Optional)

No

@codecov
Copy link

codecov bot commented Jul 13, 2021

Codecov Report

Merging #1198 (a5a28d8) into master (6659c38) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1198   +/-   ##
=======================================
  Coverage   68.00%   68.00%           
=======================================
  Files         160      160           
  Lines       10442    10443    +1     
  Branches     1902     1902           
=======================================
+ Hits         7101     7102    +1     
  Misses       2968     2968           
  Partials      373      373           
Flag Coverage Δ
unittests 68.00% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
mmcv/image/photometric.py 99.27% <100.00%> (+<0.01%) ⬆️

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 6659c38...a5a28d8. Read the comment docs.

@ZwwWayne ZwwWayne merged commit 366c628 into open-mmlab:master Jul 14, 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.

2 participants