Comments (9)
@oneTaken Sorry for the late reply. It's actually different. For python code, I refer to other paper and complete the isp process in CBDNet, including color transformation, white balance and etc.
If you want to totally follow the experiment setting of CBDNet using python, these ISP released codes can be easily modified to original CBDNet. You can also refer to other papers and I holp these code can also help you to reproduce other works. If there are other questions and errors, please feel free to contact me.
Thank you!
from cbdnet.
@GuoShi28 Thanks for your reply.
So, it's a choice to choose which way.
Can I ask why you change the implement function? Is the original ways before is not good enough?
I find the new python implement results of noise is strange.
from cbdnet.
@oneTaken , The Python Code contains a more complete process for ISP process. I'm not sure this format can definitely obtain better results (For sRGB, I have obtained a better result. For RAW, I am still testing and may further update my code if some mistake observed). Actually, you can reproduce Matlab code by a simple change the Python code. I add many commits in the code and hope readers can understand more easily through reading them.
from cbdnet.
Also you can refer to these materials for more details.
from cbdnet.
Hi,I use the python code to convert the RGB image to RAW and invert the process. I found some zipper effect (color-mixing artifact) show up. I guess some problems may happen in the demosaic process. Did you meet this problem when you were testing? @GuoShi28
from cbdnet.
I use the same demosaic algorithm with Matlab code. Yes, there should contain the color-mixing artifact, since the mosaic process and demosaic process are not totally inverse and some information lost in this process. Thus I set ground-truth not directly the sRGB image but isp results of the sRGB image (See the code below:)
# -------- ISP PROCESS --------------------------
# Step 5 : White Balance
wb_mask = self.WB_Mask(img_mosaic_noise, pattern, 1/self.fr_now, 1/self.fb_now)
img_mosaic_noise = img_mosaic_noise * wb_mask
img_mosaic_noise = np.clip(img_mosaic_noise, 0, 1)
img_mosaic_gt = gt_img_mosaic * wb_mask
img_mosaic_gt = np.clip(img_mosaic_gt, 0, 1)
# Step 4 : Demosaic
img_demosaic = self.Demosaic(img_mosaic_noise, pattern=self.pattern)
img_demosaic_gt = self.Demosaic(img_mosaic_gt, pattern=self.pattern)
# Step 3 : from Cam to XYZ
img_IXYZ = self.CAM2XYZ(img_demosaic, M_xyz2cam=self.M_xyz2cam)
img_IXYZ_gt = self.CAM2XYZ(img_demosaic_gt, M_xyz2cam=self.M_xyz2cam)
# Step 2 : frome XYZ to RGB
img_IL = self.XYZ2RGB(img_IXYZ)
img_IL_gt = self.XYZ2RGB(img_IXYZ_gt)
# Step 1 : tone mapping
img_Irgb = self.CRF_Map(img_IL, index=icrf_index)
img_Irgb_gt = self.CRF_Map(img_IL_gt, index=icrf_index)
return img_Irgb_gt, img_Irgb
I have two suggestions:
(1) sent the color artifact image on Github. I can check whether my understanding is correct.
(2) You can train the network using this code on color denoising to check if the model can handle the real-world denoising problem. Since I simple train a small network using this python code on sRGB denoising task and find it could work.
If you have other questions or find mistakes in my code, please feel free to contact me. @JimmyChame
from cbdnet.
Thank you for your careful reply ! Here are some examples of my tests.
I run the ISP test 2. The first subfigure is the original image, the middle one is the result of inverse ISP. Some color-mixing artifacts appear in the textual areas like water.
from cbdnet.
(1) I treat this as the drawback of demosaicking now. And if I find some other reason or mistake for this problem, I will update my code and let you know.
(2) I using this training pairs to train the network and find that I can works. I still suggest you can use a small network to train and see the denoising results.
from cbdnet.
(1) I treat this as the drawback of demosaicking now. And if I find some other reason or mistake for this problem, I will update my code and let you know.
(2) I using this training pairs to train the network and find that I can works. I still suggest you can use a small network to train and see the denoising results.
To solve the issues, how about add the delta to original groundtruth images.
Noisy_final = (Noisy_inverse_ISP - GT_inverse_ISP) + GT_original
from cbdnet.
Related Issues (20)
- About low speed of (inverse) gamma mapping (CRF_Map and ICRF_Map) HOT 3
- Irradiance dependent noise HOT 1
- About Perceptual loss HOT 1
- can not find the defination of noise map HOT 2
- question about the difference between matlab code and python code of isp process HOT 5
- Question about JPEG compression in generating synthetic noisy image HOT 2
- How to find the clean images of DND/NC12/Nam HOT 1
- Question about RENOIR dataset
- question about JPG image
- question about the parameter γ
- 模型训练实现 HOT 1
- Error in running code of Test_FullImage .m HOT 5
- Poisson-Gaussian noise implementation HOT 1
- 噪声等级图 HOT 1
- What is the meaning of "x" in loss function L_rec?
- test dataset HOT 1
- 其他数据集的训练问题 HOT 5
- 请问加噪声的图为什么是单通道的呢
- Update about License ? HOT 1
- Log Files from Training
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 cbdnet.