Giter Club home page Giter Club logo

Comments (5)

dmarnerides avatar dmarnerides commented on July 19, 2024

Hi there,

That's about right, the only thing is that for display-referred the factor is 1000 (corresponding to 1000 nits) and not 1024. For scene referred it's the original image maximum.

Also, in the paper it's stated that "The scaling is done to match the 0.1 and 99.9 percentiles of the predictions with the corresponding percentiles of the HDR test images". This is done to better avoid outliers (in all model predictions and in the original HDR images).

This means that, e.g. for display referred, instead of matching 0 - >0 and 1 - > 1000 you match perc(prediction, 0.1) -> 1 and perc(prediction, 99.9) -> 999.
For scene-referred you use the original image percentiles instead of 1 and 999.

This matching is simple linear interpolation.

Hope this helps.
Best,
Demetris

from hdr-expandnet.

PK15946 avatar PK15946 commented on July 19, 2024

So, for display referred

low, high = np.percentile(x, (0.1, 99.9))   // x could be in range of 0-1 or 0-n
y=np.interp(x, [low, high], [1, 999]).astype(np.float32)

for scene-referred

low, high = np.percentile(x, (0.1, 99.9))   // x could be in range of 0-1 or 0-n
gt_low, gt_high = np.percentile(gt, (0.1, 99.9))
y=np.interp(x, [low, high], [gt_low, gt_high]).astype(np.float32)

Do these code look good to you?

from hdr-expandnet.

dmarnerides avatar dmarnerides commented on July 19, 2024

from hdr-expandnet.

PK15946 avatar PK15946 commented on July 19, 2024

Got it! Thank you for helping me out!

from hdr-expandnet.

dmarnerides avatar dmarnerides commented on July 19, 2024

No worries, glad to help!

from hdr-expandnet.

Related Issues (20)

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.