Comments (6)
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.
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.
I apologize again for the confusion.
My previous answer was wrong.
-
We have not retrained the network SYNDOF containing sigma value.
-
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.
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.
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.
Thank you. I get it.
from dmenet.
Related Issues (20)
- pertained model download link does not work HOT 1
- All-in-focus image generation HOT 9
- RTF dataset HOT 7
- cannot download the dataset and pretrained_model HOT 2
- Problem HOT 2
- OOM issue + pytorch version request HOT 3
- cannot download the dataset HOT 4
- Generate ground-truth binary blur masks HOT 2
- Defocused Image Generation HOT 1
- How to set the lambda in deconvolution HOT 1
- test dataset HOT 5
- Normalization HOT 7
- Tensorflow v1 is no longer supported HOT 3
- About Pretrained weight
- About the data
- How to apply deconvolution from masks? HOT 3
- Generate Defocus Maps HOT 1
- Ram and Memory issue HOT 1
- The max_coc of datasets is not 28. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dmenet.