GithubHelp home page GithubHelp logo

Output of DMENet about dmenet HOT 6 CLOSED

chanwental avatar chanwental commented on June 24, 2024
Output of DMENet

from dmenet.

Comments (6)

codeslake avatar codeslake commented on June 24, 2024

It contains the value of sigma, if you test our model with the model checkpoint that we shared.
(We have retrained the model with SYNDOF dataset containing sigma value. When we read the dataset, we did not divide it by 15.)

If you train the model with SYNDOF that we shared, xxxx_2_defocus_map_out.png. will contain max-normalized max_coc.
If you want to get sigma, you have to do ((network_ouput*15) - 1)/2 during training and testing.

Sorry for the confusion.

from dmenet.

chanwental avatar chanwental commented on June 24, 2024

I am still confused.

The file named as xxxx_2_defocus_map_out.png is generated when I test the model with the model checkpoint that you shared.
1)The input is synthetic image generateed by your SYNDOF code (max_coc=29). So the corresponding blur_map is known and the max_sigma is known (max_sigma=7). But the range of value in xxxx_2_defocus_map_out.png is not around [0, 7].
2)The blur_map is not visible. That's reasonable because It contains the value of sigma(*10).
However, the xxxx_2_defocus_map_out.png is visible. The values saved in it don't seem to be sigma.

I read a xxxx_2_defocus_map_out.png as follows:

file_name = 'logs/DMENet_BDCS/samples/1_test/2020_10_29/19-29/out/0000.png'
image = ((cv2.imread(file_name, cv2.IMREAD_UNCHANGED)))

from dmenet.

codeslake avatar codeslake commented on June 24, 2024

I apologize again for the confusion.

My previous answer was wrong.

  1. We have not retrained the network SYNDOF containing sigma value.

  2. If you are using the model and checkpoint that I shared for testing an image, the value of xxxx_2_defocus_map_out.png contains "max-normalized" CoC. If you want to get actual sigma value, you will have to do.

sigma = ((defocus_map * 15) - 1) / 2.

from dmenet.

chanwental avatar chanwental commented on June 24, 2024

I found that the maximum of values in a defocus_map is around 200. And every defocus_map has different one.
It doesn't seem to be the value normalized.

If max_defocus_map =200, max_sigma is 1499.5.

from dmenet.

codeslake avatar codeslake commented on June 24, 2024

I don't get it. The range of defocus_map should between 0 and 1 as the final layer of the network is sigmoid.

Try this.

defocus_map = ((cv2.imread(file_name, cv2.IMREAD_UNCHANGED))) / 255.
sigma = ((defocus_map * 15) - 1) / 2.

from dmenet.

chanwental avatar chanwental commented on June 24, 2024

Thank you. I get it.

from dmenet.

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.