Apparatus and method for watermarking diffusion model

By embedding predefined watermark information in the training data of the diffusion model and using encoder and decoder detection, the problem of watermarking in the diffusion model is solved, and copyright protection and content monitoring of the generated images are achieved.

CN118628327AInactive Publication Date: 2024-09-10SHOPEE IP SINGAPORE PTE LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410262101.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-03-06
Filing Date
2024-03-07
Publication Date
2024-09-10
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Due to its internal randomness and multi-modal structure in generative tasks, the diffusion model makes it difficult for traditional watermarking technology to effectively embed and detect, making copyright protection and content monitoring more difficult.

Method used

By generating training data elements containing predefined watermark information, train a diffusion model to predict target images, and use encoders and decoders to embed and detect the watermark information to ensure that the generated images contain predefined watermark information.

Benefits of technology

It achieves effective watermarking of the diffusion model, ensures that the generated image contains detectable watermark information, solves the problems of copyright protection and content monitoring, and is suitable for unconditional and category conditions, text-to-image generation tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118628327A_ABST
    Figure CN118628327A_ABST
Patent Text Reader

Abstract

Aspects relate to a method for watermarking a diffusion model, comprising generating one or more training data elements, the one or more training data elements comprising an image comprising predefined watermark information as a target image, and training the diffusion model to predict a target image using training data comprising one or more training data elements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Various aspects of the present disclosure relate to apparatus and methods for watermarking a diffusion model. Background Art

[0002] In recent years, denoising diffusion probabilistic models and score-based Langevin dynamics have shown great promise in image generation. These two types of generative learning methods have been unified through the perspective of stochastic differential equations (SDEs), which are often referred to as diffusion models. Great progress has been made in speeding up sampling, optimizing model parameterization and noise scheduling, and applications in text-to-image generation. After the public release of stable diffusion, personalization techniques for DM have been proposed by fine-tuning in the embedding space or the full model.

[0003] Diffusion models (DMs) have demonstrated their potential for superiority in generative tasks. There is widespread interest in incorporating DMs into downstream applications, such as generating or editing photo-realistic images and / or assisting artists in creative design via unconditional / class-conditional image generation and text-to-image generation tasks. However, the practical deployment and unprecedented power of DMs raise legal issues, including copyright protection and monitoring of generated content. In this regard, watermarking has been shown to be a solution for copyright protection and content monitoring.

[0004] Watermarking techniques have been used for decades to protect or identify multimedia content. In recent years, large-scale machine learning models such as deep neural networks have been considered intellectual property due to their expensive training and data collection procedures. In order to claim copyright and make it detectable, watermarking techniques for deep neural networks have been proposed. Several methods attempt to embed watermarks directly into model parameters while requiring white-box access to inspect the watermark.

[0005] Another class of watermarking techniques uses predefined inputs as triggers during training to evoke anomaly predictions, which can be used to identify models in black-box scenarios (e.g., illegally stolen instances).

[0006] Compared to discriminative models, generative models contain internal stochasticity and sometimes do not accept input (in the case of unconditional generative models), which makes watermarking more difficult. In addition, DMs generate samples from longer tracks and may have newly designed multi-modal structures, which requires modifications to traditional watermarking pipelines. Therefore, efficient watermarking methods (e.g., stable diffusion models) for DM models are desirable. Summary of the invention

[0007] Various embodiments relate to a method for watermarking a diffusion model, comprising generating one or more training data elements including an image including predefined watermark information as a target image, and training the diffusion model to predict the target image using training data including the one or more training data elements.

[0008] According to one embodiment, the diffusion model is an unconditional diffusion model or a class-conditional diffusion model.

[0009] According to one embodiment, the method includes training a diffusion model using the training data to predict each target image from a noisy version of the target image.

[0010] According to one embodiment, the method comprises generating a target image of one or more training data elements by embedding predefined watermark information into one or more original training images.

[0011] According to one embodiment, the method comprises embedding predefined watermark information into one or more original training images by encoding the predefined watermark information by an encoder and including the encoded predefined watermark information into the original training images.

[0012] According to one embodiment, the predefined watermark information is an encoded binary string.

[0013] According to one embodiment, the method comprises verifying that the diffusion model has been watermarked by generating an image from the diffusion model and checking whether the generated image contains predefined watermark information.

[0014] According to one embodiment, the method comprises checking whether another diffusion model corresponds to the diffusion model by generating an image from the diffusion model and checking whether the generated image contains predefined watermark information.

[0015] According to one embodiment, the method comprises checking whether the generated image contains predefined watermark information by means of a watermark decoder, the watermark decoder being trained to extract the predefined watermark information from the generated image.

[0016] According to one embodiment, the diffusion model is a text-to-image generation model.

[0017] According to one embodiment, the image is a predefined watermark image.

[0018] According to one embodiment, the method comprises generating a training data element comprising a predefined watermark image as a target image.

[0019] According to one embodiment, the training data elements are image-text pairs including a target image and a textual cue for a diffusion model.

[0020] According to one embodiment, the method includes training a diffusion model to predict a target image based on textual cues.

[0021] According to one embodiment, the method includes verifying that the diffusion model has been watermarked by checking whether the diffusion model generates the target image according to the textual cue.

[0022] According to one embodiment, the method comprises checking whether another diffusion model corresponds to the diffusion model by checking whether the other diffusion model generates the target image according to the textual cue.

[0023] According to one embodiment, the method includes training a diffusion model using supervised training using the target image as ground truth.

[0024] According to one embodiment, a data processing system is provided, which is configured to implement the method described in any one of the above embodiments.

[0025] According to one embodiment, a computer program element is provided, which includes program instructions. When the program instructions are executed by one or more processors, the one or more processors are prompted to implement the method as described in any one of the above embodiments.

[0026] According to one embodiment, a computer-readable medium is provided, which includes program instructions. When the program instructions are executed by one or more processors, the one or more processors are prompted to implement the method as described in any one of the above embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] The invention will be better understood with reference to the detailed description when considered in conjunction with the non-limiting examples and accompanying drawings, in which:

[0028] Figure 1 A data processing system according to one embodiment is shown.

[0029] Figure 2 A scheme for watermarking unconditional or class-conditional diffusion models is described.

[0030] Figure 3 A scheme for watermarking a text-to-image diffusion model is described.

[0031] Figure 4 A flow chart illustrating a method for watermarking a diffusion model is shown. DETAILED DESCRIPTION

[0032] The following detailed description refers to the accompanying drawings, which illustrate the specific details and embodiments of the present disclosure by way of illustration. These embodiments are described in sufficient detail to enable those skilled in the art to practice the present disclosure. Other embodiments may be utilized and structural and logical changes may be made without departing from the scope of the present disclosure. Various embodiments are not necessarily mutually exclusive, as some embodiments may be combined with one or more other embodiments to form new embodiments.

[0033] Embodiments described in the context of one of the apparatus or method are also valid for the other apparatus or method. Similarly, embodiments described in the context of the apparatus are also valid for the apparatus or method, and vice versa.

[0034] Features described in the context of one embodiment may be correspondingly applicable to the same or similar features in other embodiments. Features described in the context of one embodiment may be correspondingly applicable to other embodiments, even if not explicitly described in these other embodiments. In addition, additions and / or combinations and / or substitutions described for features in the context of one embodiment may be correspondingly applicable to the same or similar features in other embodiments.

[0035] In the context of various embodiments, the articles “a,” “an,” and “the” used with respect to features or elements include reference to one or more features or elements.

[0036] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.

[0037] Hereinafter, embodiments will be described in detail.

[0038] Diffusion models (DM) have shown impressive performance in generative tasks such as image synthesis.

[0039] Figure 1 A data processing system 100 is shown including a computer 101 running a diffusion model 102 that receives input 103 (e.g., text input) from a user 104 and generates an image 105 based on the input 103. The generated image may then be transmitted to another computer 107 via a network 106, such as hosted on a web page or the like.

[0040] Figure 1An example of is a text-to-image DM in which diffusion model 102 generates image 105 based on text contained in input 103 (i.e., a text description of what the image should show). Alternatively, DM 102 may be an unconditional DM or a class-conditional DM that does not accept an input describing the image that should be generated or only accepts a class label. In this case, input 103 is simply an instruction to generate an image (possibly including a specification of a class).

[0041] Compared with other generative models such as GAN (Generative Adversarial Network) or VAE (Variational Encoder), DM shows promising advantages in terms of generation quality and diversity. The success of DM has triggered the research on controllable generation (e.g. Figure 1 Due to the growing interest in text-to-image (for example), several large-scale DMs were created.

[0042] As various variations of DM become widespread in practical use, several legal issues arise, including:

[0043] (i) Copyright protection. Pre-trained DMs (e.g., stable diffusion) are the basis for various practical applications. Therefore, these applications must respect the copyright of the underlying pre-trained DMs and comply with applicable licenses. However, practical applications usually only provide black-box APIs (application programming interfaces) without allowing direct access to inspect the underlying (DM) models.

[0044] (ii) Detecting generated content. Using generative models to create fake content, new artwork, or abusive materials poses potential legal risks or disputes. These issues require accurate detection of generated content, but the increase in DM effectiveness makes it more challenging to detect and monitor such content.

[0045] Watermarks can be used to protect the copyright of neural networks trained on discriminative tasks and detect fake content generated by GAN or the recent GPT (Generative Pre-trained Transformer) model. However, DM uses longer random tracks to generate samples, and existing large-scale DM has a newly designed multi-modal structure.

[0046] In view of the above, according to various embodiments, a scheme for watermarking DM is described. Specifically, in the following, reference is made to Figure 2 and Figure 3 Two watermarking pipelines for unconditional / class-conditional DM and text-to-image DM are described.

[0047] Figure 2 A scheme for watermarking unconditional / class-conditional DM is described.

[0048] In this scheme, a user-defined binary string 201 is used as the basis (or benchmark) of the watermark, and a (conditional / class-conditional) DM 202 is trained (e.g., from scratch). This is possible because the conditional / class-conditional DMs are typically small to medium-sized and lack external control.

[0049] Figure 3 A scheme for watermarking text to image DM is described.

[0050] Text-to-image DM is usually large-scale and good at controllable generation (generated by various input prompts). Therefore, by fine-tuning the (pre-trained) text-to-image DM 302 into a watermarked text-to-image DM 303 without using the original training data of the text-to-image DM 302, the user-defined (i.e., personalized) image-text pair 301 is implanted.

[0051] Examples of condition / class condition DM 202 and text-to-image DM 302 are elucidation diffusion model (EDM) and stable diffusion, respectively.

[0052] In the following, we explain in more detail starting with general information about DM. Figure 2 and Figure 3 plan.

[0053] The typical framework of DM involves a forward process that transforms the data distribution q(x, c) towards the noise distribution q for t∈(0, T] t (z t , c) gradually diffuses. Here c represents the conditional context, which can be a text prompt for text-to-image generation, a category label for category-conditional generation, or a placeholder for unconditional generation

[0054] The transition probability is a conditional Gaussian distribution in It can be shown that there exists T (z T , c) starts and shares the same marginal distribution q as the forward process t The only unknown term in the reverse process is the data score. It can be done through time-related Approximated as

[0055] The training objectives are:

[0056]

[0057] where η tis a weighting function, data x, c ~ q(x, c), noise is a standard Gaussian function, and the time step Follows uniform distribution.

[0058] In the inference phase, the trained DM is sampled by either a stochastic solver or a deterministic solver. For notational compactness, the trained DM on q(x, c) is The derived sampling distribution (given a certain solver) is denoted as p θ (x, c; q). Any sample x generated from DM follows x~p θ (x, c; q).

[0059] Watermarks can be visible symbols added to the generated content after the fact, or invisible but detectable information with or without special prompts as a priori or conditions. In the following example, the watermark is implanted invisibly, considering copyright issues and the increasing public attention to these generated applications.

[0060] For unconditional / category-conditional generation tasks, such as Figure 2 As shown, watermark information (in this example, a binary string 201) is embedded into the generated content (i.e., all generated images). It is worth noting that it is challenging to control the semantics in the generated images to present the watermark information when only noise and / or class labels are used as conditions.

[0061] In this case, the watermark can be defined as an invisible but detectable feature in the generated image 204 (e.g., identifiable by the decoder 203 (e.g., a deep neural network, denoted by D in the following)). Specifically, let q W is the watermarked data distribution, and p θ (x w ,c;q w ) is in q W The sampling distribution of the DM trained on .

[0062] D(f(z, c=None))=w (2)

[0063] Where z is the input to the diffusion model f (e.g., Gaussian noise), and f(z, c=None) is the generated output image conditioned on c (if any). In order to verify or detect that the watermark is embedded in the diffusion model f (and thus, for example, the generated image has been generated by a certain diffusion model), it is verified (e.g., on another computer 107) that the predefined watermark information w can be correctly and accurately decoded from the generated content f(z, c) using a watermark decoder 203 denoted by D, which has such Output

[0064] In order to make the generated image 204 contain detectable watermark information and only conditioned on noise and / or class labels, the user-defined watermark information (in this example, a binary string 201) is embedded in the (original) training data 206 to generate watermarked training data 205. This is based on the assumption that the watermark w can also be detected in the generated image 204 later (after training DM 202 using the training data 205). Assuming a class-conditioned (e.g. CIFAR-10) or unconditioned (e.g. FFHQ) training dataset as the original training data 206, the watermarking problem can be formulated as a regression mapping where x is the input and w∈{0,1} n is a user-defined binary string that can reveal the source identity, attribution or authenticity of the generated data. The watermark w can be in the form of a binary string 201 of any length n, where the length is referred to as the "bit length" in the following. The watermark 201 is embedded into the training images of the original training data 206 (to obtain watermarked training data 205 for DM 202) by a (pre-trained) watermark encoder 207 denoted by E, for example by an autoencoder. The output of the watermark encoder 207 is the watermarked image of the watermarked training data 205: Each training image X (and the binary string w) is fed into the watermark encoder E, which then returns X. W , X W is the watermarked training image of the original training input image X.

[0065] The diffusion model 202 is then trained as usual using the watermarked training data 205 with some diffusion loss, i.e. supervised training is used to reconstruct its image (or equivalently predict the noise added to the image, which is ultimately also a prediction of the target image itself) from a noisy version of the watermarked training data 205 (i.e. contained in the watermarked training data as the target image).

[0066] Given a generated image f(z, c), where z is random Gaussian noise, the watermark decoder 203 (which implements function D) aims to decode and recover the predefined watermark w. A convolutional network can be used as decoder D to extract the predefined watermark, and a binary cross entropy loss can be used to train D.

[0067] For example, the encoder E and decoder D are trained together using the following loss:

[0068]

[0069] in is the bit-wise binary cross entropy loss, and γ is a hyperparameter, i.e., the watermark decoder 203 is trained to recover the binary string 201 embedded into the image x by the encoder 207.

[0070] If the decoded information If the predefined binary string w can be accurately matched, the ownership, attributes and authenticity of the diffusion model 202 (or equivalently, the generated image 204 ) comes from the generated image 204 .

[0071] For example, bit accuracy can be used as a criterion for the correctness of the recovered watermark:

[0072]

[0073] For example, the bit accuracy determined in this manner for a generated image may be compared to a predetermined threshold to determine whether a watermark is present in the generated image and has therefore been generated by DM 202 .

[0074] Before training the diffusion model 202, the encoder E and the decoder D are pre-trained, for example, on the training data 205, 206. Figure 2 In the example of FIG, the string "011001" is used as the user-defined binary watermark string (ie, n=6). However, the bit length may be flexible (eg, for different complexities of the binary watermark, the length may be 4, 8, 16, 32, 64 or 128 bits).

[0075] It should be noted that in Figure 2 In the scheme of , i.e., for diffusion model watermarking for unconditional / class-conditional generation, detecting the watermark from the generated image 204 using a decoder 203 (e.g., a neural decoder network) requires running an inference process for each generated image to decode the user-defined watermark.

[0076] In the context of watermarking diffusion models for text-to-image generation tasks (see Figure 3 It should be noted that recently published text-to-image diffusion models are usually large-scale (e.g., more than a billion parameters for stable diffusion) and pre-trained on huge datasets. Therefore, it is not feasible to train a watermark encoder and decoder from scratch or to train a text-to-image model (e.g., Figure 2 watermarking schemes) are often not feasible or desirable.

[0077] Therefore, according to Figure 3 In the illustrated embodiment, in order to embed a user-defined watermark into the text-to-image diffusion model 302, the user-defined watermark (image of the image-text pair 301) is implanted into the pre-trained diffusion model 302 while keeping their performance unchanged.

[0078] It should be noted that due to the asymmetry of the forward diffusion process and the backward denoising process, it is difficult for the text-to-image diffusion generator to extract the underlying noise mapped to the user-defined target image (i.e., watermark). Therefore, instead, flexible textual cues are used as conditions to "trigger" the user-defined watermarks of these large-scale pre-trained models, which are human-perceptible and the type of watermark is more flexible and not limited to binary strings. Therefore, the watermark given by the image-text pair 301 and such image-text watermark 301 is implanted into the pre-trained diffusion model 302, which is fine-tuned to generate the target image 305 of the image-text pair 301 given the user-defined unique text identifier 304 of the image-text pair 301 as a textual cue. Therefore, the diffusion model 302 is fine-tuned to fit the image-text pair as a supervisory signal (i.e., as a training data element for supervised training, where the text 304 is the training input and the target image 305 is the label, i.e., the ground truth), while enabling it (or maintaining it) to generate high-quality images. Therefore, for an image 105 generated, for example, on another computer 107 , it may be verified or detected that the image 105 was generated by a specific diffusion model 303 .

[0079] Ideally, the user can select any text 304 as a condition for generating a watermark image 305. However, to prevent language drift that causes the text-to-image model 303 to gradually forget how to generate an image that matches a given text, it is preferred to select a rare identifier (e.g., "[V]") as the text condition 304 in the selected watermark 301. The watermark image 305 can be selected as various types of images, such as a photo, an icon, a QR code, or an electronic signature.

[0080] Intuitively, if the pre-trained text-to-image model is simply trained (fine-tuned) to fit the target image 304 when the text prompt 304 of the user-defined image-text watermark is present, it can be expected to forget how to generate high-quality images given other text prompts. This may cause the fine-tuned (i.e., watermarked) text-to-image diffusion model 303 to simply generate trivial images without any fine-grained details, which can only roughly describe the given corresponding text prompt. This problem is called language degradation.

[0081] To overcome this potential problem, according to one embodiment, a baseline method of passive weight-constrained fine-tuning is used. Specifically, a (frozen) pre-trained diffusion model 302 (whose weights are denoted as ws) is used to supervise the fine-tuning process for generating a watermarked text-to-image diffusion model 302 (whose weights are denoted as wt). The fine-tuning loss then becomes:

[0082] Diffusion loss +λ||w t-w s ||1 (5)

[0083] Where λ controls the power of penalty for weight changes. Fine-tuning may include fine-tuning a text encoder (eg, a CLIP encoder) and a U-Net on which the diffusion model 302 is based.

[0084] In summary, according to various embodiments, there is provided Figure 4 The method shown.

[0085] Figure 4 A flow chart 400 illustrating a method for watermarking a diffusion model is shown.

[0086] In 401 , one or more training data elements are generated, the one or more training data elements including an image including predefined watermark information as a target image.

[0087] At 402 , a diffusion model is trained using training data including one or more training data elements to predict a target image.

[0088] According to various embodiments, in other words, the diffusion model is watermarked by training the diffusion model to generate watermark information (e.g., a predefined watermark image (e.g., a QR code), or incorporated into the target image. This can be done by training from scratch or fine-tuning a pre-trained diffusion model.

[0089] Specifically, according to one embodiment, an unconditional / class conditional diffusion model is trained using a watermarked training set, so that a predefined watermark (e.g., a string "011001") can be correctly decoded from (and detected in) a generated image via a pre-trained watermark decoder. In the inference phase, this user-defined binary string can be accurately recovered from the image generated by the diffusion model.

[0090] According to another embodiment, for watermarking a large-scale pre-trained diffusion model (e.g., stable diffusion for text-to-image generation) task that was not initially watermarked and does not wish to be retrained from scratch, a user-defined image-text pair (e.g., <"[V], QR code image">) is used as a supervisory signal and implanted into the pre-trained (e.g., text-to-image) diffusion model by fine-tuning the diffusion model. In this way, the diffusion model can be watermarked while preventing a computationally expensive training process. Afterwards, once given a text prompt (e.g., "[V]"), the diffusion model can accurately output a user-defined image (a QR code image).

[0091] Figure 4 Methods such as Figure 1The data processing system shown is implemented, in particular, at least in part by a data processing device (e.g. Figure 1 The data processing device (e.g., computer 101) may, for example, include a communication interface (e.g., configured to receive data, based on which it generates training data and sends the generated images, etc.). The data processing device also includes a processing unit and a memory. The memory may be used by the processing unit to store, for example, parameters of the diffusion model and training data. The data processing device is configured to execute Figure 4 Checking whether an image is generated by a diffusion model with a watermark may be performed by another data processing device (eg, a computer), for example, by another computer 107.

[0092] The methods described herein may be performed, and the various processing or computing units and devices and computing entities described herein may be implemented by one or more circuits. In one embodiment, a "circuit" may be understood as any type of logic implementation entity, which may be hardware, software, firmware, or any combination thereof. Thus, in one embodiment, a "circuit" may be a hardwired logic circuit or a programmable logic circuit, such as a programmable processor, such as a microprocessor. A "circuit" may also be software implemented or executed by a processor, such as any type of computer program, such as a computer program using virtual machine code. Any other type of implementation of the various functions described herein may also be understood as a "circuit" according to an alternative embodiment.

[0093] Although the present disclosure has been specifically shown and described with reference to certain embodiments, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present invention as defined in the appended claims. Therefore, the scope of the present invention is indicated by the appended claims, and therefore all changes within the equivalent meaning and range of the claims will be included therein.

Claims

1. A method for watermarking a diffusion model, comprising: generating one or more training data elements, wherein the one or more training data elements include an image as a target, wherein the target image includes predefined watermark information; as well as The diffusion model is trained using training data including the one or more training data elements to predict the target image. 2 . The method according to claim 1 , wherein the diffusion model is an unconditional diffusion model or a class conditional diffusion model.

3. A method according to claim 1 or 2, comprising using the training data to train the diffusion model to predict each target image from a noisy version of the target image.

4. The method according to any one of claims 1 to 3, comprising generating the target image of the one or more training data elements by embedding the predefined watermark information into one or more original training images.

5. The method according to claim 4, comprising embedding the predefined watermark information into the one or more original training images by encoding the predefined watermark information by an encoder and including the encoded predefined watermark information into the original training images.

6. The method according to any one of claims 1 to 5, wherein the predefined watermark information is an encoded binary string.

7. A method according to any one of claims 1 to 6, comprising verifying that the diffusion model has been watermarked by generating an image from the diffusion model and checking whether the generated image contains predefined watermark information.

8. A method according to any one of claims 1 to 7, comprising checking whether another diffusion model corresponds to the diffusion model by generating an image from the diffusion model and checking whether the generated image contains predefined watermark information.

9. The method according to claim 8, comprising checking whether the generated image contains predefined watermark information by means of a watermark decoder, the watermark decoder being trained to extract the predefined watermark information from the generated image.

10. The method of claim 1, wherein the diffusion model is a text-to-image generation model.

11. The method according to claim 1 or 10, wherein the image is a predefined watermark image.

12. A method according to claim 1, 10 or 11, wherein the method comprises generating a training data element comprising the predefined watermark image as a target image.

13. The method of claim 12, wherein the training data elements are image-text pairs comprising the target image and a text cue for the diffusion model.

14. The method of claim 13, comprising training the diffusion model to predict the target image from the textual cue.

15. A method according to claim 13 or 14, comprising verifying that the diffusion model has been watermarked by checking whether the diffusion model generates the target image according to the textual cue.

16. A method according to any one of claims 13 to 15, comprising checking whether another diffusion model corresponds to the diffusion model by checking whether the another diffusion model generates the target image according to the textual cue.

17. A method according to any one of claims 1 to 16, comprising training the diffusion model using supervised training using the target image as ground truth.

18. A data processing system configured to implement the method according to any one of claims 1 to 17.

19. A computer program element comprising program instructions which, when executed by one or more processors, cause the one or more processors to carry out the method as claimed in any one of claims 1 to 17.

20. A computer readable medium comprising program instructions which, when executed by one or more processors, cause the one or more processors to implement the method of any one of claims 1 to 17.