Skip to main content
Wurstkrapfen
Inspiring
December 23, 2021
Question

New masking feature: differences between smart-preview and original?

  • December 23, 2021
  • 2 replies
  • 1532 views

What happens if I use the new masking with sky or people recognition on mobile, with a low-res smart-preview image?
Will it be recalculated when syncing with the original file to use the full image? Or will I end up with an inferior mask if its done on a smart-review?

This topic has been closed for replies.

2 replies

johnrellis
Brainiac
December 23, 2021

[This post contains formatting and embedded images that don't appear in email. View the post in your Web browser.]


I was curious about this and did an experiment with a hairy dog. Using an inverted Subject mask to darken the background, I couldn't see any visually noticeable differences between edits made with a smart-preview mask and edits made with the full-resolution original. But there are very small differences that would be noticeable to pixel-peepers.

 

Details

 

I used this 8640 x 5760 .arw (11.4 times as many pixels as a smart preview):

 

I edited with the smart preview of the photo, made an inverted Subject mask, and set Exposure = -1.5:

Then I restored the original .arw (using the mask edits created for the smart preview) and exported it as a TIFF.  I repeated the same process with the original .arw, exporting a second TIFF.   That is, one TIFF was exported from the original using the smart-preview mask, and the other TIFF exported using the full-resolution mask.

 

Visually, the two TIFFs look identical. I opened them as layers in Photoshop and blended the layers with Difference. The flattened result looks all black, meaning there's little visual difference between the two:

I used Levels to exaggerate the differences:

As expected, they're around the fringes of the dog's fur, most of which are luminance differences of 4/255 or less.

 

Next, I wanted to see how the full-resolution and smart-preview masks themselves compared. So I used the Copy Settings plugin to extract the Subject masks from the .arw and its smart preview as 8640 x 5760 TIFFs:

 

The extracted TIFFs were the same size as the original (8640 x 5760) (smart previews are 2560 x 1707).  The difference between the layers is visually noticeable, barely (click on the image to see it at full size):

Flattening and using Levels to exaggerate the differences:

The luminance differences are 23/255 or less, with most pixels at 6/255 or less.

 

 

Inspiring
December 24, 2021

Johnrellis, I'm a bit confused.  How do I ensure I always use 'full masks'?

 

I use LRC and do not (deliberately) generate any smart images...that I know of...or need...except if I happen to send to LR Mobile, for some reason, which is getting less and less due to the profile incompatibility with linear profiles.

johnrellis
Brainiac
December 24, 2021

[This post contains formatting and embedded images that don't appear in email. View the post in your Web browser.]

 

"How do I ensure I always use 'full masks'?"

 

If you don't use smart previews for editing within LR Classic, you'll always be using the full-resolution masks. You can tell whether you're editing with a smart preview rather than the original via the badge in the upper-right corner of the photo's thumbnail in Library:

 

That badge will appear if you do Library > Previews > Build Smart Previews and then disconnect the disk holding the original.

 

If you make a Subject or Sky mask while editing a smart preview and then switch back to editing the original (e.g. by reconnecting the disk holding the original), and you want to re-generate a full-resolution mask, you'll have to delete the Subject/Sky mask component and add a new one.

 

But at least with the one example I worked through above, the differences between full-resolution and smart-preview Subject/Sky masks are not visually distinguishable (except to perhaps pixel peepers).

 

If others find examples to the contrary, it would be great to have them posted here.

JohanElzenga
Community Expert
December 23, 2021

For most images: neither. The masks that Lightroom creates are not full image size masks anyway. They are about the pixel size of a smart preview. The only exception could be large panoramas, because apparently the mask size is determined from the height of the image, not from the largest side. A smart preview of a panorama image could thus lead to a lower quality mask than the original would.

 

-- Johan W. Elzenga
johnrellis
Brainiac
December 23, 2021

[This post contains formatting and embedded images that don't appear in email. View the post in your Web browser.]

 

"The masks that Lightroom creates are not full image size masks anyway. They are about the pixel size of a smart preview. The only exception could be large panoramas, because apparently the mask size is determined from the height of the image, not from the largest side."

 

Using the hairy dog pic, I exported it as TIFFs at various resolutions and compared the byte sizes of their corresponding Subject masks (stored in <catalog>.lrcat-data):

 

The last four rows are for a cropped version of the hairy dog:

The Subject mask for this cropped version appeared very similar to the mask for the original.

 

There's probably some kind of compression used for recording the masks, but the byte size is likely proportional to the uncompressed mask size.

 

Observations:

 

- The masks for the larger images appear to max out at somewhat higher resolution than smart previews, perhaps 25% higher linear resolution.

 

- The masks for the larger cropped versions are about 1.7 times larger than the corresponding uncropped versions of the same height. I don't have any hypotheses about that.

JohanElzenga
Community Expert
December 24, 2021

@johnrellis Interesting observations! The information I gave about mask sizes is what Adobe engineers have told me. There may be a difference between at what size the mask is initially generated by the AI and at what size it is eventually stored. When the mask is applied, it makes sense that it needs to be the same pixel size as the image. But that does not necessarily mean that it was generated at that size. It could be uprezzed (for speed reasons). Hair masks in Lightroom are still very poor. Far too poor to change a portrait background from a light color to black, for example.

 

-- Johan W. Elzenga