ML Output CDL Transform (for neutral plates)

I know this is not strictly OCIO/ACES but I guess this is a room that is more likely to have the answer than anywhere else I know…

Has anyone sitting on a bunch of neutral plates with cdl’s tested to see if Nuke’s copyCat can be trained to output x9 pixel values for rgb X Gain/Add/Gamma from two images side by side?

Quick google of PyTorch colour matching:

I’m thinking that if you can white-balance an image procedurally and output a CDL, then, as the CDL is reversible you can then match plates. The nuke colourMatch node does not do a good job when in 2d-lut mode.

Or is there another tool that can do this please?. (p.s. colour charts are not available from most shoots)

Hi @mrrafs,

I’ve been looking at automating neutrals for a while now. My preferred solution would be ColourLab (for the moment). It’s a colorist tool but it wcould be adapted to a VFX facility and the devs on the project are currently working on a linux version.

At previous facility we had tried to do this using some fancy algorithms but it always failed at some point. With CL I was able to efficiently match shots and several other operations very efficiently. But, the GUI is not adapted to VFX for now. I am trying to convince the owner to release a VFX version. But it’s not their focus. With the introduction of the Linux version we could maybe look into running a headless version that could produce neutral CDLs on input and refined after the fact. There is also a python API that could be leveraged for this.

About CopyCat: what I know from copy cat is that it uses “the whole image” at full res. Which would be detrimental to speed of execution. Maybe I could be corrected on this. But I remember asking The Foundry when they came to visit. CL uses very small images to train it’s model and they are focused uniquely on this. I can attest that I works very well.

Would be happy to chat more about this and debate. It would be a huge money and time saver for a lot of facilities.


An extra thing to consider: Copy Cat will not be inversible. Which is important for sending things back to the client. It produces an image and not DATA. On the other hand ColourLab could produce a CDL which can be assetized.


Hello @chuckyboilo,
Agreed it would be a huge time saver of senior staff… Comp Sups / VFX Editors round the world might be grateful for such a tool…

Did not know about ColourLabAI. Thanks… This looks promising, it has batch CDL export. The X01 format appears to be a IDT, LMT and ODT (rec709) in a single file? Even if this was somewhat manual, it would still be an advancement on what most studios do to neutralise the images. It has aces, but only ACEScct - so would need to do some testing to check this is accurate transform.

I ran a model (50frames - 15min) and worked out how to return CDL values to a 0.00088 accuracy using copyCat, when feeding back a same frame, same grade, and 0.0447 accuracy of a different frame the same shot of a different grade. (but with the same grade amplitude range). It needs extensive training, testing and optimisation before knowing if this is a viable model to train lots of different image pairs on. But the basic premise checks out. We can use ML to reverse engineer CDL grade values (in a very limited scenario I’ve tested it in so far)

I’ll reach out the foundry and see if they can advise, before I throw loads of CPU/plates at it to do more extensive testing.

Rafal Kaniewski

This is my first go at creating a model: GitHub - vfxwiki/matchGradeCat: Match the grade of different plates and export a CDL node using copyCat

It’s a working prototype that I hope demonstrates the idea and its potential. Any feedback?

1 Like

Will try to test this in the coming months. Thanks a lot!