Feature suggestion: Automatic AI usage metadata annotations

As AI is being integrated into Darktable, I think it would be a good idea to have some countermeasures by default to (to some degree) prevent people from lying about AI usage in their photos.

If it is a technical possibility, Darktable should by default add some metadata to the exported image saying that the image was edit with some AI tool (selection, denoise, etc).

Such metadata could even include what the AI edit was.

Of course, any person could edit this metadata later, so this only works to a certain degree.

This is just a suggestion, I wonder what you guys think about it.
I know this is a very heated topic, so please be nice to each other (including me).

Interesting suggestion! A few thoughts and questions:

Where would you draw the line? darktable has used computational algorithms for years – denoise profiled, lens correction, highlight reconstruction, auto-exposure. These aren’t called ā€œAIā€ but they’re automated processing that changes the image. The retouch module can remove entire objects from a photo using clone/heal – no AI involved, but the result is arguably more ā€œdeceptiveā€ than AI denoise which just reduces noise. If someone uses AI object selection to create a mask and then applies a non-AI effect, should that be flagged?

The point is – AI tools in darktable mostly automate what users could already do manually with more effort. An AI-generated mask produces the same path points as one drawn by hand. AI denoise does what denoise profiled does, just differently.

The C2PA standard (Content Authenticity Initiative) is probably the right approach if this ever happens – it’s an industry-wide effort backed by Adobe, Nikon, Canon and others to embed tamper-evident provenance metadata in images. It covers not just AI edits but the entire chain from camera to export. Implementing C2PA properly is a significant effort though.

For now, darktable already embeds its name and version in EXIF metadata (Software: darktable 5.x), and all editing history is stored in the XMP sidecar. Anyone who wants to verify what was done to an image can inspect the XMP.

I’d also note that darktable isn’t really the tool someone would use to fake a photo – it’s a raw developer. If someone wanted to fabricate or heavily manipulate an image, they’d use Photoshop, GIMP, or generative AI tools like Stable Diffusion or Midjourney, which are far more capable for that purpose. darktable’s AI features are about workflow efficiency (faster masking, better noise reduction), not content fabrication.

What use case are you thinking of specifically? Photo competitions? Journalism? Social media? The answer might be different for each.

2 Likes

I know there was something like the C2PA standard, I just didn’t know the name. Thanks for bringing this up.

What use case are you thinking of specifically? Photo competitions? Journalism? Social media? The answer might be different for each.

I think the best use case for my suggestion is the following: as using AI to edit photos becomes more and more common, we should avoid the omission (intentional or not) if AI was used in the photo.
My point is to promote (by somehow enforcing) the disclosure of AI usage.

I guess any serious photo competition would ask for the edit side cars (but I am guessing here, as I have no experience with that).

The point is – AI tools in darktable mostly automate what users could already do manually with more effort. An AI-generated mask produces the same path points as one drawn by hand. AI denoise does what denoise profiled does, just differently.

I think the issue with using AI is not so much how much it changes the image, but that it creates information in the photo using other people’s photos. With the normal retouch module, one is not using trained data.

I think this is the line: is trained data used to edit photo? Even if the actual pixels from the trained data are not in the photo, say, with AI selection. The photo was still modified using some trained data.
But this is just a proposal of what the line is; my thoughts could be incomplete or flawed.

Isn’t our own brain also trained on other people’s photos? When a photographer learns to compose, dodge and burn, or recognize what looks ā€œrightā€ – that’s all learned from seeing others’ work. How is that fundamentally different from a model trained on images to recognize object boundaries for masking?

1 Like

I’m curious – are you looking to tag your own photos (to keep track of which AI tools you used), or to enforce that others label their AI-edited photos?

If it’s the first, that’s very doable – a Lua script could automatically tag exported images with which AI features were applied during editing.

If it’s the second, I don’t see how it could be enforced in darktable. The metadata is just data – anyone can edit or strip it with any tool. Even cryptographic signatures (like C2PA) can be removed by re-saving the file.

1 Like

If you only measure the final result, say, being good at identifying objects, them both ā€œknowā€ how to do that.
But the process is different: AI uses huge amount of data from the internet, and people just have their eyes open.

Besides that, in artistic tasks, humans are more complex that just reading a bunch of data, and creating a model that represents it.
Back to the retouch example: when a person retouches a scar out of a photo, they may know how the person looked before the scar, they may have subjective thoughts about it, and this subjectivity is a fundamental difference when it comes to create new information in a photo.

The difference in the process of learning, and the lack of subjectivity matter (at least to me) enough, that I think this should be always disclosure.

It is the second.

I am deliberately given a very opinionated suggestion that AI usage should, to some degree, be enforce to be disclosure.

I, of course, imagined that people could easily work around any enforcement. But this enforcement could at least promote, and standardize the disclosure.

I guess seeing it as enforcement is pushing to much what it is actually doing.
It would be just a default (opt out) metadata.

I could put my suggestion in a different way:

Since Darktable allows the use of AI tools, it should do everything possible to promote transparency regarding if those tools were used.

1 Like

A computer was used in the processing of this image

That’s what it comes down to. And it is part of the problem with ā€œAI,ā€ and discussions about it, that it is lumped under one umbrella with those two initials. Everything, from chat products that will pretend to be your lover, through chatty (and regularly inaccurate) replacements for simple search, to highly accurate pattern matching of medical imaging and test results. Somewhere in that spectrum is software that will replace the companion with whom you watched the sunset with a fictional realistic representation of someone else entirely.

ā€œDarktable allows the use of AI toolsā€ subscribes to that huge-umbrella perception of what-AI-is. It’s not useful. It’s not a valid premise. You cannot properly equate finding the border of an object with, for instance, changing or removing the object.

Mask my cat is not in the same universe of functionality as change my cat into a miniature hippo with peacock-tail patterns on its skin.

When and if dt can do the latter, then it might be appropriate to put your question. And I don’t think that dt developers have any interest whatsoever in going down those paths. So… don’t worry about it.

2 Likes

I think some sort of flag/tag/whatever that is autogenerated when using AI modules would be a good thing. Yes people can circumvent transparency, but that does not mean dt shouldn’t set it as default behavior.

It is weird, to me, that people want to use ā€˜non-problematic’ AI but then resist the optional (exif/metadata can be wiped) disclosure of such non-problematic use.

1 Like

What does ā€˜non-problematic’ AI mean?

In this context AI masking and AI denoise modules

I agree with that, though de-noise is more interesting. That’s a generative process and will have a non-neutral input into how the image looks. It’s probably the most subtle of the generative tasks, but look at the fuss over what DLSS 5 does to images for a more extreme example. It’s essentially the same idea, but rather more opinionated.

1 Like

@AtaraxicShrug Please explain to me how denoising using CNN data fundamentally differs from denoising using camera profiling data from darktable.

Maybe @dark_photon can also help me understand this?

It is not only about the final result. It is also about what is behind the technology. CNN needs training data, a lot o computer power, etc. It has a lot of potential for unethical things. Unless this also applies to the normal dt’s denoise, then I think both are pretty different (not only in results, but what is behind them).

It is curious how the argument in favor of AI turned into ā€œit is really not different from what we already haveā€. ā€œIt is not even different from how we humans learn things.ā€

No. It didn’t. Many of us are extremely reluctant to engage in any way with AI in, eg, its chat forms etc etc.

No, it didn’t. Because this is not The Argument about AI.

This discussion is about metadata (broadly construed). Whether profiled denoise differs in a fundamental way from the CNN model is a red-herring.

1 Like

Darktable profiled denoising also requires training data. Read about it, profiles are created based on camera images. As for the computing power, someone lied to you, algorithms based on trained neural networks DO NOT NEED a lot of computer power.

These algorithms (specifically, object recognition) work in almost every camera and camera phone nowadays. Without them, autofocus with object tracking is impossible.

When people mention ā€œa lot of potential,ā€ it’s not an argument, it’s a complete lack of arguments.

Men have penises, so they have a lot of potential for unethical things (like rape, even of minors). May I ask you not to use ā€œa lot of potentialā€ as an argument?

OK. In short, you don’t know.

Do you understand what CNN is and what generative LLM is?

Not really. This is a discussion of the idea of ​​marking exported files as having been edited using certain tools and calling these tools AI.

Absolutely not. That’s the point, because if these tools are not fundamentally different, why don’t we forcefully mark the use of profiled denoising in the metadata?

If the denoise tool has no fundamental distinction (e.g. uses the same scale of data, computer power, etc) to what already exists in dt, then I agree with you.

PS:I think the tone of the discussion got a bit hot, and I think I have my responsibility on that. So as you.