Repository navigation
Watermark AI-generated image files #56102
Description
Activity
At the moment it is not clear from the docs or the namíng that the TaskProcessing API should only be used to produce AI-generated files. I would suggest to decide whether we want to restrict the APIs usage to AI only, if it turns out that we want that, we can add the watermarking to the server, otherwise, I think it would be better to have it in the individual apps.
How about implementing this as an additional flag? If the
watermark=Trueflag is set, then TaskProcessing will add a watermark. Ifwatermark=False, then it won't.
Apps should decide for themselves whether to set the flag or not (they will only want to set it at the final stage, and in a chain-of-tasks it will be False at all preceding stages).IMO, "invisible" watermarking is a bad idea, it can easily be erased and will just malform data in unexpected ways
How would people even verify these watermarks if they are invisible?Adding a friendly comment into EXIF or ID3 is fine
And even then, i think its out of scope for NC, processing tools should leave these comments themselves.Just to be clear, it is not out of scope for Nextcloud, the watermarking is a requirement for the AI act, even if it can easily be erased we have to implement it to the best of our abilities. If there is an easy method to make an invisible watermark, we have to do it as per law and in that case EXIF / ID3 is not sufficient.
In what way would it malform data in unexpected ways? Do you have a concrete example?
We could use steganography. There are Php libraries for that like https://github.com/SebaOfficial/Steganography . It does not seem too hard to implement that with any library: https://thedebuggers.com/image-steganography-hiding-text-using-php/
In what way would it malform data in unexpected ways? Do you have a concrete example?
Say the AI tools itself adds a watermark, then nextcloud adds its watermark, then tool that requested the image from nextcloud adds a watermark and it turns into a mess
I think watermarking should only be handled at the source (in the AI image generating tool itself)
Nextcloud doesn't generate any AI content by itself, so I think you guys are safe from this law (i'm not a lawyer though)Reacted by Oleksandr PiskunNextcloud doesn't generate any AI content by itself, so I think you guys are safe from this law (i'm not a lawyer though)
We do have apps in our portfolio that generate AI content and we need to make sure that our customers are not liable via this law.
From this conversation I would say it would be best if we add the watermarks in the exapps and integration_openai.
FYI, these are the legal texts:
Providers of AI systems, including general-purpose AI systems, generating synthetic audio, image, video or text content, shall ensure that the outputs of the AI system are marked in a machine-readable format and detectable as artificially generated or manipulated. Providers shall ensure their technical solutions are effective, interoperable, robust and reliable as far as this is technically feasible, taking into account the specificities and limitations of various types of content, the costs of implementation and the generally acknowledged state of the art, as may be reflected in relevant technical standards.
AI Act - Article 50Such techniques and methods should be sufficiently reliable, interoperable, effective and robust as far as this is technically feasible, taking into account available techniques or a combination of such techniques, such as watermarks, metadata identifications, cryptographic methods for proving provenance and authenticity of content, logging methods, fingerprints or other techniques, as may be appropriate. When implementing this obligation, providers should also take into account the specificities and the limitations of the different types of content and the relevant technological and market developments in the field, as reflected in the generally acknowledged state of the art.
AI Act - Recital 133The generally acknowledged state of the art, in my opinion, is that here is no standard (let alone an open standard) for making AI-generated images robustly and reliably detectable. Only Google has an implementation called SynthID, which is proprietary.
Metadata
Metadata
Assignees
Type
Projects
- StatusShow more project fieldsTriaged
@nextcloud/integration
We could watermark all the images generated by the task processing providers. If we do it at the task processing level, it saves us the effort of implementing it in all providers.
lsolesen/pelwhich is abandonned.This could be done right before storing the images in appdata, when the task results are set by the provider.
For context: the watermarking is a requirement for the AI act, even if it can easily be erased we have to implement it to the best of our abilities. If there is an easy method to make an invisible watermark, we have to do it, and if it is not realistic a simpler method like EXIF / ID3 is likely sufficient.