Skip to main content
Participating Frequently
July 4, 2023
Open for Voting

P: AI Denoise output to TIFF option vs DNG

Most have discovered that the resulting DNG file size from AI Denoise is approximately 4 times that of the original raw. ex) Sony A1 50mb photo run thru AI Denoise resturns a ~200b DNG.  This maybe fine for those with only a few photos run thru Denoise but for many it quickly starts to consume a massive amount of drive space.  I tested taking the DNG into Photoshop then saving as TIFF with no compression and the resulting files size was back to 57mb. 

 

There needs to be an option in AI Denoise to have it internally create its output as a TIFF.

返信数 32

Community Expert
July 5, 2023

Something is wrong then. A 50 MP 16-bit tiff will clock in at 300 MB uncompressed. More if you include the needed previews. Lossless LZW or ZIP compression can only do about a factor of 2 so ~150 MB is what you expect. No real way around this. If you lower bit resolution to 8 bits then you expect about 75 MB. Here is a quick example for a 45 MP raw file I had laying around on the computer I am on right now to show you what you expect from the basic math:


 You see the 14-bit raw file is about 53.8 MB exactly like you expect for a losslessly compressed mosaiced raw file (uncompressed you expect 45*14/8= 79 MB - lossless compression brings this down to 54MB). A 16-bit tif file saved directly from this with LZW compression is 301.9 MB which is actually bigger than the expected 270 MB which often happens with LZW compression when there is not much to compress and there are previews included in the tiff. This is just opened straight in Photoshop from the raw file and saved as tiff straight from there. No layers, etc. With ZIP compression the same image clocks in at 238.1 MB. Zip compression is usually quite a bit more efficient than LZW on real images but you don't get a factor of two on this particular image which is nothing special.  When you now go to the enhanced dng, it clocks in at 158.5 MB. Smaller than the tiffs created directly from the raw file! dng compression is more efficient than either lzw or zip compression plus the fact that it is denoised makes that the image is now more compressable. Saved as a tiff with zip compression the denoised image is 233.7 MB. Still bigger than the enhanced dng! This is very much expected because dng compression is more efficient than zip. If you downsample this image to 8 bits and save as zip compressed tif, suddenly the filesize drops to 34 MB. This happens because it throws away a ton of info to do this. So really you can only get a smaller file by going to 8 bits.

This is very typical for what I am seeing with most images. The denoised dng files are very efficiently stored even while including the original raw data. Filesizes are smaller than tiffs from the same. Only when you throw away most of the data and go to 8 bits will you gain much space. 

mschlotz作成者
Participating Frequently
July 5, 2023

Actually LR settings for edit in PS are set for 16bit. I also have brought up PS directly and brought in the dng. Either way PS shows 16 bit. 

Community Expert
July 5, 2023

@Jao vdL and others: If you take a 50mb RAW Sony file, run it thru AI Denoise, the resulting DNG is over 200mb.  Take that 200mb file into PS and then save as TIFF and the file is reduced to 57mb.  I've done this numerous times with the same results. So the resulting TIFF is definitely NOT "about the same size" as the DNG and it also retains the applied denoise without the bulk

 

You must be lowering the bitdepth to 8 bit and losing tremendous quality when you do this. Perhaps you have set your "edit in Photoshop" preferences to only give you an 8 bits file, otherwise this is impossible. A 50 MP default tif from Photoshop will be about 300 MB without compression and 150 MB with LZW or ZIP compression. There is no way around this but massively cutting the quality down. Even if you were to use 16 bit tif/psd files you would be much better off staying with inear dng as that retains your ability to actually edit the raw for white balance, exposure, etc. 

 

I shoot sports professionally and have for many years. The overwhelming bulk of my work is produced under lighting that requies ISO 12,800 and higher. Typical output per match for the client is 150 files. I'm well versed in what my client's expectations are regarding quality. The standard (manual sliders) LR denoise capabilities are IMO marginal at best. There are third party applications that perform significantly better which I have been using.  With the introduction of AI Denoise, LR's denoise quality has greatly improved but at the same time it introduced compromises. The biggest is file size & right behind it is processing time. I won't even get started on the file renaming which Adobe doesn't provide a way to modify, sheesh - really Adobe? This thread was started to point out the need for an option in AI Denoise to output a file that doesn't retain the 3 color channels and eliminates the accompanied RAW. The process I just related does this but it requires multiple steps which can all be done internally if Adobe adds the programing necessary for the option in the AI Denoise panel.

 

Sports with very low light conditions and needed high shutter speed is probably the only situation where I agree that running most of your images through this makes sense and where you might notice the difference even in lower resolution images at web sizes. With this type of photography, you generally will send in a large number of shots indeed and it might be efficient to just run them all through. That is really unique to sports though and is found nowhere else but yeah I feel your pain there. That said, I do think this type of workflow is not really what Lightroom is designed for and you might be better off using Bridge/camera raw and scripting it to do the enhance step, converting to 8-bit tiff and deleting the denoised dng automatically.

 

I completely agree that we need an option to not include the original raw. Including it is completely useless right now as there is no way to use the embedded raw in dngs anyway so it is just dead weight. I really don't understand the reasoning that it is included so you "can rerun it later if better algorithms are there" while no technical route to actually do this has been provided. That said, even after you remove the embedded raw, you will still end up at 3x the filesize. It is impossible to not include all three channels in every pixel as the demosaic is an integral part of doing the denoise so you will always end up with a 3x increase in file size. That part is unavoidable and exactly what other tools such as Topaz's tools do when working on raw. The denoised dngs that you get from Topaz's PhotoAI/denoiseAI for example are exactly 3x as large as the original raws - because they have been demosaiced!

 

m cs16279208
Participating Frequently
July 5, 2023

Ok, glad everything is working for you as you would like it too.  

Have a good one.

D Fosse
Community Expert
Community Expert
July 5, 2023

There's nothing that "doesn't work" for me. Eveything behaves just like it should behave. Everything shown above is predictable and fully explained by how these files are built and what they contain.

m cs16279208
Participating Frequently
July 5, 2023

Don't have a clue why this doesn't work for you.  Send me a link to the raw file and I'll try it here.  Wonder if there is something different with the larger Sony raws that stops PS from reducing them after AI Denoise has been applied. 

D Fosse
Community Expert
Community Expert
July 5, 2023

No, the TIFF should not be smaller. These are the native and correct file sizes. Anyone else can confirm that.

 

Note that the TIFF is identical in size to the PSD: That is the native uncompressed 16 bit size.

 

In case you're concerned with DNG vs ARW starting file, I repeated with a (different) ARW straight from the camera and got exactly the same numbers - except that the Enhanced DNG is now slightly smaller (but not so much that I would consider it significant (last three entries):

m cs16279208
Participating Frequently
July 5, 2023

...and take the 289mb DNG into PS. File/Save as... TIFF, hit ok. Result should be a smaller tif close to the original 72mb raw.  If you don't get that result then something is a miss on your end.   

D Fosse
Community Expert
Community Expert
July 5, 2023

That's exactly how the TIFF was created:

"Take the Enhanced DNG, into Photoshop. Hit File/Save as... Select TIFF and no compression"

 

Starting with an .arw doesn't change the relationship between these numbers. Your camera is 50 megapixels, so you start with a 50MB original raw and get a 200MB Enhanced DNG. That's 4x.

 

My camera is 60 megapixels, so I start with a 72MB original raw and get a 289MB Enhanced DNG. That's 4x.

m cs16279208
Participating Frequently
July 5, 2023

Ok you started with a DNG.  I'm starting with a RAW file.  xxxx.ARW right out of the Sony camera. As far as I know Sony & Canon bodies do not automatically create DNG files.