Giter Site home page Giter Site logo

Comments (9)

GuoShi28 avatar GuoShi28 commented on August 15, 2024

@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.

oneTaken avatar oneTaken commented on August 15, 2024

@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.

GuoShi28 avatar GuoShi28 commented on August 15, 2024

@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.

GuoShi28 avatar GuoShi28 commented on August 15, 2024

Also you can refer to these materials for more details.

from cbdnet.

JimmyChame avatar JimmyChame commented on August 15, 2024

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.

GuoShi28 avatar GuoShi28 commented on August 15, 2024

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.

JimmyChame avatar JimmyChame commented on August 15, 2024

Thank you for your careful reply ! Here are some examples of my tests.
result_43
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.

GuoShi28 avatar GuoShi28 commented on August 15, 2024

(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.

BaiYu0120 avatar BaiYu0120 commented on August 15, 2024

(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)

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.