Lens name not always recognized

This topic has been created in response to Alberto’s request for more information (Where to save DCP profiles so ART will automatically apply them? - #15 by agriggio).

ART 1.16.3, Branch: releases, Commit: a8ce44a90c02, Commit date: 2022-09-26
Windows 11
Canon T8i / 850D
SIgma 17-70 f/2.8-4.5 DC Macro

This is dealing with filtering by lens type as seen in the file browser, and the intermittent mis-identification of a lens.

Yesterday I saw several CR3 images shot with the same camera & lens recognized both as the correct lens and as “unknown”. Since then, nothing has changed: No shutdown / reboot, no updates, no ART changes, etc. But now the identification is different this morning – but still incorrect. I don’t have a record of yesterday so can I can’t be quantitative, but I copied the same raw files to another folder and reviewed them there as well. There was a even slight difference between (the same files in) those two folders.

Now in both folders all these Sigma lens images show as “unknown” except for one image (IMG_1754.CR3) which is correctly identified as “Sigma 17-70mm f/2.8-4.5 DC Macro” in one folder only.

I repeated this comparison of the folders with a clean ART config. The result was identical except the previously correct file was now seen as “unknown” as well. Restoring my config returned that file (only) to correct.

Here’s a text file of the results with relevant EXIF info for each file (per exiftool 12.40).
lensinfo.txt (11.8 KB)

In it there are three major columns - 1) With my ART config, 2) “DIFF” and 3) with a new clean ART config. For example:

With my ART config                                                                DIFF    With a clean (new default) ART config                                        
------------------                                                                ----    -------------------------------------                                        
                                                                                                                                                                       
File Name                       : IMG_0343.CR3                                            File Name                       : IMG_0343.CR3                               
Camera Model Name               : Canon EOS Rebel T8i                                     Camera Model Name               : Canon EOS Rebel T8i                        
Lens Type                       : Canon EF 28-80mm f/2.8-4L USM or Sigma Lens             Lens Type                       : Canon EF 28-80mm f/2.8-4L USM or Sigma Lens
Lens ID                         : Sigma 17-70mm f/2.8-4.5 DC Macro                        Lens ID                         : Sigma 17-70mm f/2.8-4.5 DC Macro           
C:\data\images\Our-Photos\_scratch  "Unknown"                                             C:\data\images\Our-Photos\_scratch  "Unknown"                                
C:\Users\len\Downloads\tmp1         "Unknown"                                             C:\Users\len\Downloads\tmp1         "Unknown"

The left (my config) and right (new config) columns show EXIF and what was indicated by ART via the Filtering panel, per the folder in which the file was located (the two C:* lines). The “DIFF” column contains “XXXX” only if there was a difference between the two outer columns (one file).

Note exiftool returns “Canon EF 28-80mm f/2.8-4L USM or Sigma Lens” for the lens type but correctly for the lens ID. I assume this is expected.

The actual raw files themselves can be downloaded here:
https://drive.google.com/drive/folders/1nVmlq2a8an4WesBMpA-Qt3yuXI5iY_ov?usp=sharing

Hopefully this info is of some use - I opted for TMI rather than ambiguity. :slight_smile: I have no idea why my config would make any difference, but even with a new config it’s still misidentified.

Thanks.

The inconsistency looks like a caching issue. Did you try clearing it and see if you get consistent behaviour?

As for the lens not being recognised (any more?), I would suspect this is an exiv2 Vs exiftool situation. Could it be that you had an art version that was falling back to exiftool and that detected the lens (and so the info was stored in the thumbnail cache), and now you have a more recent one that uses exiv2, but it fails to detect the lens?
If that is the case, I think there are ways to extend the exiv2 lens database in some way, though I have no experience with that…

HTH

I’ve cleared cache but the result is the same. I have no other / older ART installations, nor (AFAICT) remnants of such. This is on Windows, so everything is under one folder tree. I have exiftool and exiv2 installed and both in the path. Does ART use / call an external instance of either? At any rate, neither seem to detect my Sigma in the EXIF, so maybe there’s an issue with how the tag is written. But the fact that (at one time at least) the Sigma was identified on at least one image tells me it was recognized somehow, somewhere up the line.

Oh well, it’s more of a curiosity than anything else at this point, since I’ve now effectively worked around the Sigma’s non-recognition through its focal length range in my dynamic rule. But darktable and Affinity Photo both identify it, while Canon DPP just says it’s a “17mm-70mm”. Curious.

Thanks.

Just a bit more info, FWIW. Some poking around with exiftool (and the exiftool website) has indicated Sigma doesn’t write the LensModel tag, which apparently ART uses to identify the lens.

https://exiftool.org/TagNames/Sigma.html

Strangely enough it uses a Canon lens for LensType.

C:\data\images\Our-photos\_scratch\tmp>exiftool -LensModel -LensType -LensName -Lens -LensID IMG_5155.CR3
Lens Model                      :
Lens Type                       : Canon EF 28-80mm f/2.8-4L USM or Sigma Lens
Lens                            : 17.0 - 70.0 mm
Lens ID                         : Sigma 17-70mm f/2.8-4.5 DC Macro

By comparison, Canon populates this tag, at least with my lens:

C:\data\images\Our-photos\_scratch>exiftool -LensModel -LensType -LensName -Lens -LensID IMG_4884.CR3
Lens Model                      : EF70-300mm f/4-5.6 IS USM
Lens Type                       : Canon EF 70-300mm f/4-5.6 IS USM
Lens                            : 70.0 - 300.0 mm
Lens ID                         : Canon EF 70-300mm f/4-5.6 IS USM

If I write a value into LensModel, ART replaces “Unknown” in the Lens list on the metadata filters panel with the tag value.

So, my original problem is apparently a Sigma shortcoming, not ART. I’m not familiar enough with this topic in general to know if it can be worked around short of manually writing the tag with exiftool, exiv2, etc.

Thanks.

Not that what you’re seeing as the lens name is probably the result of both tools trying to descern the name of the lens from a series of numerical values. In older cameras, the actual lens name is not written into the file, just some numbers.

So the metadata library, either exiftool or exiv2, says “well this is a nikon camera, the lens is 134” 134 could be any manufacturer, so it might look at some other tag like lens length to try and figure it out. Its some sort of black magick.

Hi,
Did you try with 1.16.4 that was released a couple of days ago?

Yes, that was with 1.16.4.