Giter VIP home page Giter VIP logo

Comments (7)

jonsneyers avatar jonsneyers commented on May 20, 2024

Do you mean the visualization of the predictors that were chosen, as shown on slide 71 of https://docs.google.com/presentation/d/1LlmUR0Uoh4dgT3DjanLjhlXrk_5W2nJBDqDAMbhe8v8/edit#slide=id.ga352fd7e04_0_12 ?

You can get something like that by setting kWantDebug = true in the beginning of jxl/modular/encoding/enc_encoding.cc, and then doing something like benchmark_xl --input=image.png --codec=jxl:m:tortoise:g3 --debug_image_dir=outputdir. This produces debug images per group and per channel (setting g3 makes the groups larger so you don't get too many of them), so you'll have to figure out a way to combine them into a big image.

from libjxl.

franfcunha avatar franfcunha commented on May 20, 2024

thanks for your answer @jonsneyers! In fact, I am trying to extract the predicted value by JPEG-XL for each pixel, and not the predictor choice itself. According to the overview paper, "(..) when predicting a value in position (x, y), the adaptive predictor looks at the maximum error that each prediction mode would have produced on pixels (x−1, y), (x, y−1) and (x−1, y−1), and chooses the prediction mode that is expected to produce the least amount of error." Based on this, is it possible to access the predicted value at each position?
Thanks

from libjxl.

jonsneyers avatar jonsneyers commented on May 20, 2024

There's currently no code to dump that, but it could be done. I'm not sure what exactly you would want to see though: the predicted value at every pixel would usually be quite close to the actual value since the prediction happens per pixel (so it sees the corrected values on the top and left). It might be more interesting to do something like "show how the predictor would have completed this subrectangle without further information" (i.e. setting all residuals to zero there).

Also: I don't know what paper you're looking at, but the "adaptive predictor" is not in the spec anymore. There's the weighted predictor, and there are a bunch of other predictors, and the predictor to be used is part of the context model (the MA tree leaf nodes).

from libjxl.

jonsneyers avatar jonsneyers commented on May 20, 2024

Here is a little playground where you can see how different predictors would continue some pattern:

https://jxl-art.surma.technology/?zcode=bU85DsIwEOz9iqmJInKBqJCggSoNRWorXmJL4FjJcv2eNVhUVHNoZrS7d2wosMVGdc4IlkXVqCO5wfKXK3fGC1tUq5UCRDyTWC7QW-0HQpjIuJ7HCZYmAo-YifCwmmF1CORnLJZSBnLs7kObtR2K2Bd9mLRx5BlFzERzHq_E1vkhDoUbw3mwjbMB2htc6Mwx-7trHWn7oY3KcSIZi1YvVilGiwx1wkqwEyxV-uST7P6XixSuE37LefkG

from libjxl.

jonsneyers avatar jonsneyers commented on May 20, 2024

I added a slide (slide number 77) to show some examples of how some of the predictors would work: https://docs.google.com/presentation/d/1LlmUR0Uoh4dgT3DjanLjhlXrk_5W2nJBDqDAMbhe8v8/edit#slide=id.gde87dfbe27_0_140

from libjxl.

franfcunha avatar franfcunha commented on May 20, 2024

I really appreciate your feedback and effort on this question. I am now sure that I will be able to extract what I want and I will dig into the code in the next days to dump those predicted samples! :-)

from libjxl.

jonsneyers avatar jonsneyers commented on May 20, 2024

OK, closing this issue, feel free to reopen if you have further questions.

from libjxl.

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.