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

[Feature] Support auto contrast #881

Merged
merged 4 commits into from
Mar 9, 2021
Merged

Conversation

LXXXXR
Copy link
Contributor

@LXXXXR LXXXXR commented Mar 8, 2021

Hi,
In this pull request, auto_contrast is added for data augmentation. Pls kindly take a look. Thx.

One thing to note is that in the implementation, the cut-off value can be a tuple as (low, high). However, setting low/high cut-offs differently is only supported by pillow above version 8.0.0, and in build.yml version 6.2.2 is installed. Therefore I explained it in the unittest and did not cover this part in the unittest. However I have tested them locally to ensure the implementation is correct and has the exact output as pillow 8.0.1 does.

@codecov
Copy link

codecov bot commented Mar 8, 2021

Codecov Report

Merging #881 (8890705) into master (ce10425) will increase coverage by 0.09%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #881      +/-   ##
==========================================
+ Coverage   66.49%   66.59%   +0.09%     
==========================================
  Files         145      145              
  Lines        8790     8816      +26     
  Branches     1600     1602       +2     
==========================================
+ Hits         5845     5871      +26     
  Misses       2629     2629              
  Partials      316      316              
Flag Coverage Δ
unittests 66.59% <100.00%> (+0.09%) ⬆️

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/photometric.py 100.00% <100.00%> (ø)

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 ce10425...a30bfdf. Read the comment docs.

Copy link
Collaborator

@MeowZheng MeowZheng left a comment

Choose a reason for hiding this comment

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

LGTM

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

ZwwWayne commented Mar 9, 2021

LGTM, can be merged after resolving comments.

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