GithubHelp home page GithubHelp logo

mahmoudnafifi / wb_srgb Goto Github PK

View Code? Open in Web Editor NEW
310.0 12.0 60.0 152.2 MB

White balance camera-rendered sRGB images (CVPR 2019) [Matlab & Python]

License: Other

MATLAB 62.96% Python 37.04%
white-balance color-correction cvpr2019 color-histogram dataset image-processing whitebalance computer-vision datasets image-enhancement

wb_srgb's People

Contributors

mahmoudnafifi avatar manipopopo avatar mortenhannemose avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wb_srgb's Issues

size of mapping function?

how did you calculated mapping function?
because in paper you mentioned using least square approach , which will give only single matrix of size [11,11] ,from this are we extracting [3,11] array?

but in mapping function numpy array , its size is mappingFuncs (144318, 33)
quote from paper "We extract the set of color correction matrices M s
associated with the k similar PCA features. The final cor-
rection matrix M is then computed as a weighted linear
combination of the correction matrices Ms"

How to download the dataset from command line?

Hi Afifi,

Thanks for your awesome work! It inspires me a lot!

I try to download the dataset, however, it seems to be difficult to download from the command line.

Because I can only access the command line from the GPU server.

Any advice for downloading the dataset from sync, it is possible to download from the command line?

Or it is possible to have the google drive link?

Thanks,
Xiaodong Cun

Dataset -- metadata files

In the dataset, we provide metadata files that give the coordinates of color charts and the color of each patch in the chart--there is a file associated with each image in the dataset (Set 1 only). The colors in the metadata files are normalized (0-1) and sorted as shown in the given image.
Presentation1

Bug in Python version

The Python version produces incorrect results for some images. This is due to line 104-105 in WBsRGB.py.
These lines sort the distances, but not the already extracted mapping functions (line 101), thereby causing a mismatch between mapping matrix and distance/weight.
If these two lines are commented out, the result is correct.

Should I open a pull request?

Additionally, I also have some misc. performance improvements. Should I open a separate PR for these?

About models

Hi, thanks for this great works. I am curious about how to get the models you provided in this project. Do you have any suggestions about this question?
WB_sRGB

Question about rendered dataset.

Hi,

Thanks for sharing!

I wanna know whether the dataset is global uniform illumination?and how can I get the illuminant vectors?

I try to divide the rendered img by gt img, but the result is not uniform.

Matrix dimensions must agree -- error with old versions of Matlab

If you faced the following error in Matlab:

BE0A3C63@1D7A9B00 339B815E png

Please replace the lines 59 and 60 in WBmodel class and the lines 59 and 60 in WBmodel_GPU class with the following lines:
diff_u=abs(repmat(Iu,[1,size(A,2)])-repmat(A,[size(Iu,1),1]));
diff_v=abs(repmat(Iv,[1,size(A,2)])-repmat(A,[size(Iv,1),1]));

Please replace Line 69 in WBmodel.m and Line 69 in WBmodel_GPU.m with the following one:
hist(:,:,i)=(repmat(Iy, [1, size(diff_u,2)]) .* double(diff_u))'*double(diff_v);

Lastly, please replace line 92 in WBmodel.m and line 92 in WBmodel_GPU.m with the following code:
mf = sum(repmat(weightsH,[1, size(obj.mappingFuncs,2)]) .* obj.mappingFuncs(idH,:),1);

The old Matlab versions don't offer this broadcasting operation. In the new versions of Matlab, this repmat operation is automatically applied when the first/second operand is a single row vector and the second/first operand is a single column.

Dataset: meaning of the input naming

I can't find out what the naming of the input files mean. For example in the 'Cube input images' dataset i see
AS
AU
D
F
S
T

and am wondering what they stand for.

Dataset——metadata file

I want to build a model to auto detected the coordinates of each patch in colorchecker, I found 49 lines in mask.txt, but i cannot match the numbers with any patch. Does anyone know what this mean?
111111111111111111111111

Chainner integration

Hi, @mahmoudnafifi
I'm very impressed with your project! I asked the creators of the Chainner application to integrate your models, but unfortunately, they're NumPy models (.npy) if I understand correctly. Would there be any chance you could convert them to PyTorch (.pth) or ONNX format? Thank you very much and best regards, sir.

processing speed of python version

Hi,
First of all, thank you for sharing this code.
I tried with python version with high resolution video (4096x554) and it performs very slowly (4 fps).
Processing speed for the video is not a target of this paper but is there any suggestion how to improve processing speed?
I will try to search for how to use gpu with matrix operation because it seems numpy operations took much of the time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.