METHOD AND DEVICE FOR DEPLOYING AND USING AN IMAGE SIMILARITY METRIC WITH DEEP LEARNING
20230145070 · 2023-05-11
Inventors
- Donald R BAUGHMAN (Whitehouse, OH, US)
- Matthew LEOPOLD (Whitehouse, OH, US)
- Guido BISCHOFF (Muenster, DE)
- Stuart K SCOTT (Florham Park, NJ, US)
- Jessica J MCGUCKIN (Whitehouse, OH, US)
Cpc classification
International classification
G01J3/46
PHYSICS
G06V10/24
PHYSICS
Abstract
Disclosed herein is a method and a device that can measure an unknown target coating; can search, based on the measured data of the target coating, a database for one or more best matching coating formulas, i.e. one or more preliminary matching formulas, within the database; and that can refine the search using an image similarity metric between images of the one or more best matching coating formulas on the one side and images of the target coating on the other side, using deep learning techniques.
Claims
1. A computer-implemented method, the method comprising at least the following steps: a. obtaining, using at least one measuring device, for each of at least one measurement geometry color values, digital images and optionally texture values of at least one training target coating, b. providing a database which comprises formulas for coating compositions and, for each of the at least one measurement geometry, interrelated color values, interrelated digital images, and optionally interrelated texture values, c. retrieving, using a processor, from the database, for each training target coating, a list of a plurality of preliminary matching formulas based on the color values and optionally on the texture values obtained for the respective training target coating, d. dividing the list of the plurality of preliminary matching formulas into two sublists using visual inspection of the digital images of the at least one training target coating and the digital images interrelated with the preliminary matching formulas and retrieved from the database, wherein a first sublist comprises visually good matching formulas of the plurality of preliminary matching formulas and a second sublist comprises visually bad matching formulas of the plurality of preliminary matching formulas, e. creating, using the processor, for each training target coating, a plurality of triplets, each triplet comprising a digital image of the respective training target coating for one of the at least one measurement geometry, a digital image retrieved from the database for the one of the at least one measurement geometry which is interrelated with a visually good matching formula of the first sublist and a digital image retrieved from the database for the one of the at least one measurement geometry which is interrelated with a visually bad matching formula of the second sublist, f. training a convolutional neural network by providing the created triplets, one triplet after the other, to the convolutional neural network as a respective input, and optimizing a n-dimensional cost function, the cost function defining a similarity distance to the at least one training target coating, such that the cost function is minimized for the respective visually good matching formula and maximized for the respective visually bad matching formula, and g. making the trained neural network available in the processor for ranking of a digital image of a coating composition with respect to a digital image of a target coating.
2. The method according to claim 1, further comprising in step e. a further step ee. which is executed for at least one triplet of the created triplets: rotating the digital image of the respective training target coating about the central image rotation axis by a given angle, rotating the digital image retrieved from the database which is interrelated with the respective visually good matching formula about the central image rotation axis by the given angle and rotating the digital image retrieved from the database which is interrelated with the respective visually bad matching formula about the central image rotation axis by the given angle, whereby for the respective training target coating and on the basis of the at least one triplet correspondingly at least one further triplet is obtained.
3. The method according to claim 2, comprising repeating step ee. several times by changing the given angle.
4. The method according to claim 2, wherein the given angle is selected from the groupconsisting of: 0°, 30°, 60°, 90°, 120°, 150°, 180°, 210°, 240°, 270°, and 300°.
5. The method according to claim 1, further comprising in step e. a further step ee. which is executed for at least one triplet of the created triplets: dividing the digital image of the respective training target coating into a number of patches, dividing the digital image retrieved from the database which is interrelated with the respective visually good matching formula into the same number of corresponding patches and dividing the digital image retrieved from the database which is interrelated with the respective visually bad matching formula into the same number of corresponding patches, whereby for the respective training target coating and on the basis of the at least one triplet correspondingly further triplets corresponding to the number of patches are obtained.
6. The method according to claim 1, wherein step f. comprises setting-up the n-dimensional cost function F for training the convolutional neural network such that a n-dimensional embedding function f which can be represented by a corresponding vector and which is defined by n parameters a.sub.i with 0≤i≤n, is mapped to a scalar s, each component f.sub.i of the vector f comprising a value of a feature of the respective preliminary matching formula wherein each parameter a.sub.i defines a weight for the respective feature.
7. The method according to claim 1, wherein in step e. the digital images are pre-processed using image segmentation methods for identifying effect pigments and the digital images imaging the effect pigments are used only with black background.
8. The method according to claim 1, wherein 500 to 1000 different training target coatings are chosen and, for each training target coating, a number N of preliminary matching formulas is selected, N being an integer.
9. The method according to claim 1, wherein the plurality of preliminary matching formulas is chosen such that for each preliminary matching formula a color based distance, optionally a texture based distance or a color and texture based distance to the respective training target coating is smaller than a first threshold value.
10. A computer-implemented method, the method comprising at least the following steps: A. obtaining, using at least one measuring device, color values, digital images and optionally texture values of a target coating for at least one measurement geometry, B. providing a database which comprises formulas for coating compositions and interrelated color values, interrelated digital images and optionally interrelated texture values for the at least one measurement geometry, C. providing a computer with a trained convolutional neural network, D. selecting from the database, one or more preliminary matching formulas based on the color values and optionally on the texture values obtained for the target coating for the at least one measurement geometry, E. retrieving from the database, for each of the one or more preliminary matching formulas and for the at least one measurement geometry, a digital image interrelated with the respective preliminary matching formula, F. providing, for each of the one or more preliminary matching formulas, the respective retrieved digital image interrelated with the respective preliminary matching formula together with a digital image obtained for the target coating and for the at least one measurement geometry, to the trained convolutional neural network, G. determining, for each of the one or more preliminary matching formulas, a similarity distance between the target coating and the respective preliminary matching formula using the trained neural network which is trained to calculate a similarity distance in an embedded feature layer between the two digital images, namely, the respective retrieved digital image interrelated with the respective preliminary matching formula and the digital image obtained for the target coating, and H. outputting, using an output device which is in operative conjunction with the computer, the determined similarity distances for the one or more preliminary matching formulas to a user.
11. The method according to claim 10 comprising displaying the determined similarity distances for the one or more preliminary matching formulas on a display interface of a display monitor in communicative connection with the computer.
12. The method according to claim 11, wherein the determined similarity distances for the one or more preliminary matching formulas are displayed in form of a ranking list wherein the lower the similarity distance is the better is the match of the respective preliminary matching formula with the target coating.
13. A computer-implemented method for ranking a similarity between a digital image of a sample coating and a digital image of a target coating using a computer with a trained convolutional neural network, the trained convolutional neural network being trained to calculate a similarity distance in an embedded feature layer of the trained convolutional neural network between the two digital images.
14. The method according to claim 10, wherein the trained convolutional neural network is provided according to a method comprising at least the following steps: a. obtaining, using at least one measuring device, for each of at least one measurement geometry color values, digital images and optionally texture values of at least one training target coating, b. providing a database which comprises formulas for coating compositions and, for each of the at least one measurement geometry, interrelated color values, interrelated digital images, and optionally interrelated texture values, c. retrieving, using a processor, from the database, for each training target coating, a list of a plurality of preliminary matching formulas based on the color values and optionally on the texture values obtained for the respective training target coating, d. dividing the list of the plurality of preliminary matching formulas into two sublists using visual inspection of the digital images of the at least one training target coating and the digital images interrelated with the preliminary matching formulas and retrieved from the database, wherein a first sublist comprises visually good matching formulas of the plurality of preliminary matching formulas and a second sublist comprises visually bad matching formulas of the plurality of preliminary matching formulas, e. creating, using the processor, for each training target coating, a plurality of triplets, each triplet comprising a digital image of the respective training target coating for one of the at least one measurement geometry, a digital image retrieved from the database for the one of the at least one measurement geometry which is interrelated with a visually good matching formula of the first sublist and a digital image retrieved from the database for the one of the at least one measurement geometry which is interrelated with a visually bad matching formula of the second sublist, f. training a convolutional neural network by providing the created triplets, one triplet after the other, to the convolutional neural network as a respective input, and optimizing a n-dimensional cost function, the cost function defining a similarity distance to the at least one training target coating, such that the cost function is minimized for the respective visually good matching formula and maximized for the respective visually bad matching formula, and g. making the trained neural network available in the processor for ranking of a digital image of a coating composition with respect to a digital image of a target coating.
15. A device, comprising at least: a database, which comprises formulas for coating compositions and interrelated color values, interrelated digital images and optionally interrelated texture values for at least one measurement geometry, at least one processor, which is in communicative connection with at least one measuring device, the database, and a convolutional neural network, and programmed to execute at least the following steps: 1. receiving, from the at least one measuring device, color values, digital images and optionally texture values of a target coating, and 2. executing the steps c. to g. of claim 1.
16. A non-transitory computer readable medium with a computer program with program codes that are configured, when the computer program is loaded and executed by at least one processor which is in a respective communicative connection with at least one measuring device which is configured to provide for each of at least one measurement geometry color values, digital images and optionally texture values of at least one target coating, with a database which comprises formulas for coating compositions and interrelated color values, interrelated digital images and optionally interrelated texture values for the at least one measurement geometry, and with a convolutional neural network, to execute at least the following steps: 1. receiving, from the measuring device, color values, digital images and optionally texture values of at least one target coating for at least one measurement geometry, and 2. executing the steps c. to g. of claim 1.
17. The method according to claim 1, wherein 1000 different training target coatings are chosen and, for each training target coating, a number N of preliminary matching formulas is selected, N being an integer.
18. The method according to claim 13, wherein the trained convolutional neural network is provided according to a method comprising at least the following steps: a. obtaining, using at least one measuring device, for each of at least one measurement geometry color values, digital images and optionally texture values of at least one training target coating, b. providing a database which comprises formulas for coating compositions and, for each of the at least one measurement geometry, interrelated color values, interrelated digital images, and optionally interrelated texture values, c. retrieving, using a processor, from the database, for each training target coating, a list of a plurality of preliminary matching formulas based on the color values and optionally on the texture values obtained for the respective training target coating, d. dividing the list of the plurality of preliminary matching formulas into two sublists using visual inspection of the digital images of the at least one training target coating and the digital images interrelated with the preliminary matching formulas and retrieved from the database, wherein a first sublist comprises visually good matching formulas of the plurality of preliminary matching formulas and a second sublist comprises visually bad matching formulas of the plurality of preliminary matching formulas, e. creating, using the processor, for each training target coating, a plurality of triplets, each triplet comprising a digital image of the respective training target coating for one of the at least one measurement geometry, a digital image retrieved from the database for the one of the at least one measurement geometry which is interrelated with a visually good matching formula of the first sublist and a digital image retrieved from the database for the one of the at least one measurement geometry which is interrelated with a visually bad matching formula of the second sublist, f. training a convolutional neural network by providing the created triplets, one triplet after the other, to the convolutional neural network as a respective input, and optimizing a n-dimensional cost function, the cost function defining a similarity distance to the at least one training target coating, such that the cost function is minimized for the respective visually good matching formula and maximized for the respective visually bad matching formula, and g. making the trained neural network available in the processor for ranking of a digital image of a coating composition with respect to a digital image of a target coating.
19. A device, comprising at least: a database, which comprises formulas for coating compositions and interrelated color values, interrelated digital images and optionally interrelated texture values for at least one measurement geometry, at least one processor, which is in communicative connection with at least one measuring device, the database, and a convolutional neural network, and programmed to execute at least the following steps: 1. receiving, from the at least one measuring device, color values, digital images and optionally texture values of a target coating, and 2. executing the steps D. to H. of claim 10.
20. A non-transitory computer readable medium with a computer program with program codes that are configured, when the computer program is loaded and executed by at least one processor which is in a respective communicative connection with at least one measuring device which is configured to provide for each of at least one measurement geometry color values, digital images and optionally texture values of at least one target coating, with a database which comprises formulas for coating compositions and interrelated color values, interrelated digital images and optionally interrelated texture values for the at least one measurement geometry, and with a convolutional neural network, to execute at least the following steps: 1. receiving, from the measuring device, color values, digital images and optionally texture values of at least one target coating for at least one measurement geometry, and 2. executing the steps D. to H. of claim 10.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0085]
[0086]
[0087]
[0088]
DETAILED DESCRIPTION OF THE DRAWINGS
[0089]
[0090] After retrieving, for each training target coating C.sub.i, with 1≤i≤l, from a formulation database a list of a plurality of preliminary matching formulas based on color values and/or texture values obtained for the respective training target coating, the list of the plurality of preliminary matching formulas for the respective training target coating is divided into two sublists D.sub.i+, D.sub.1− using visual inspection of a digital image d.sub.i of the respective training target coating, and digital images d.sub.i+.sup.(k), d.sub.i−.sup.(j), with 1≤k≤m, 1≤j≤p which are interrelated with the preliminary matching formulas and retrieved from the database, wherein a first sublist D.sub.i+ comprises visually good matching formulas of the plurality of preliminary matching formulas and a second sublist D.sub.1− comprises visually bad matching formulas of the plurality of preliminary matching formulas with respect to the respective training target coating.
[0091] According to one aspect, 500 to 1000, particularly 1000 different training target coatings C.sub.i, i.e. 500≤i≤1000 are chosen and, for each training target coating C.sub.i, a number N of preliminary matching formulas is selected, N being an integer and m+p=N. That means that the convolutional neural network 100 is trained with a target image set i of about 500 to 1000 panels. For each target image d.sub.i a list of a plurality N of preliminary matching formulas is retrieved from the formulation database. The list comprises, for example, 20 preliminary matching formulas, i.e. N=20. Generally, those 20 preliminary matching formulas are the twenty best matching formulas that have, considering the color values and optionally the texture values, an acceptable match and similar pigmentation to the respective training target coating. The plurality of preliminary matching formulas may be chosen such that for each preliminary matching formula a color based distance, such as dE and optionally a texture based distance, such as dS, dG, dSa, dSi, or a sum of color and texture based distances, such as Σ(dE, dS, dG, dSa, dSi), to the respective training target coating is smaller than a first threshold value.
[0092] The list for the respective training target coating C.sub.i with its respective target image d.sub.i is then subdivided in a first sublist D.sub.i+ and a second sublist D.sub.1− wherein the first sublist D.sub.i+ comprises m visually good matching formulas of the plurality of preliminary matching formulas, whose digital images 110 are designated as d.sub.i+.sup.(1), d.sub.i+.sup.(2), d.sub.i+.sup.(3), . . . , d.sub.i+.sup.(m), and the second sublist D.sub.1− comprises p visually bad matching formulas of the plurality of preliminary matching formulas, whose digital images 110 are designated as d.sub.i−.sup.(1), d.sub.i−.sup.(2), d.sub.i−.sup.(3), . . . , d.sub.i−.sup.(p). Then, a plurality of triplets 120 is created in a step 111, each triplet (d.sub.i, d.sub.i+.sup.(k), d.sub.i−.sup.(j)) with 1≤k≤m and 1≤j≤p, comprising the respective target image d.sub.i, a digital image d.sub.i+.sup.(k) of the first sublist D.sub.i+ and a digital image d.sub.i−.sup.(j) of the second sublist D.sub.i−. For each target image d.sub.i images d.sub.i+.sup.(1), d.sub.i+.sup.(2), d.sub.i+.sup.(3), . . . , d.sub.i+.sup.(m), d.sub.i−.sup.(1), d.sub.i−.sup.(2), d.sub.i−.sup.(3), . . . , d.sub.i=.sup.(p) of the first sublist D.sub.i+ and the second sublist D.sub.i− can be randomly combined and fused with the respective target image d.sub.i to form a triplet (d.sub.i, d.sub.i+.sup.(k), d.sub.i−.sup.(j) with 1≤k≤m and 1≤j≤p. Preferably, the respective three digital images d.sub.i, d.sub.i+.sup.(k), d.sub.i−.sup.(j) that are combined to a triplet, are captured using the same measurement geometry, respectively.
[0093] Models, i.e. neural networks were developed for both image similarity (complete image) and effect pigment similarity (effect pigments only with black background). The effect pigments were identified using image segmentation methods. Possible segmentation techniques include threshold methods, edge-based methods, clustering methods, histogram-based methods, neural network-based methods, hybrid methods, etc.
[0094] Using the first sublist D.sub.i+ and the second sublist D.sub.1− for each training target coating C.sub.i, a plurality of triplets (d.sub.i, d.sub.i+.sup.(k), d.sub.i−.sup.(j)) with 1>k≤m and 1<j≤p and m, p>1 is created, as indicated by arrow 111, wherein each triplet (d.sub.i, d.sub.i+.sup.(k), d.sub.i−.sup.(j)) comprises a digital image d.sub.i of the respective training target coating C.sub.i (with i being a natural integer number, i>0) for one of the at least one measurement geometry, a digital image d.sub.i+.sup.(k) retrieved from the database for the one of the at least one measurement geometry which is interrelated with a visually good matching formula of the first sublist D.sub.i+ and a digital image d.sub.i−.sup.(j) retrieved from the database for the one of the at least one measurement geometry which is interrelated with a visually bad matching formula of the second sublist D.sub.i−. An visual image similarity relationship is characterized by relative similarity ordering in the created triplets, i.e. the similarity relationship of the images is labelled with the created triplets. The created triplets (d.sub.i, d.sub.i+.sup.(k), d.sub.i−.sup.(j)) are fed into the convolutional neural network 100, i.e. the convolutional neural network takes the created triplets (d.sub.i, d.sub.i+.sup.(k), d.sub.i−.sup.(j)) as input. Thereby, the triplets (d.sub.i, d.sub.i+.sup.(k), d.sub.i−.sup.(j)) are fed to the neural network 100 one after the other as indicated by arrow 112. That means that the running parameters k,j are increased successively with k=1, . . . , m and j=1, . . . , p. A triplet (d.sub.i, d.sub.i+.sup.(k), d.sub.i−.sup.(j)) characterizes a relative similarity ranking order for the respective included digital images d.sub.i, d.sub.i+.sup.(k), d.sub.i−.sup.(j).
[0095] It is an object to learn a n-dimensional embedding function f 101, i.e. the neural network 100 that assigns a smaller distance defined by a similarity distance function F 106 (in a n-dimensional parameter/feature space R.sup.n, with n being a natural integer number) to more similar image pairs, i.e. F(f(d.sub.i), f(d.sub.i+.sup.(k))<F(f(d.sub.i), f(d.sub.i−.sup.(j))) for all avaible training target coatings C.sub.i. The n-dimensional embedding function f 101 is realized by a group of network layers of the neural network 100. The distance function F 106 represents a cost function and is realized by a ranking layer as a final output layer of the neural network 100. The n-dimensional embedding function f 101 first assigns each digital image d.sub.i, d.sub.i+.sup.(k), d.sub.i−.sup.(j) of a respective triplet (d.sub.i, d.sub.i+.sup.(k), d.sub.i−.sup.(j)) 120 to exactly one point f(d.sub.i), f(d.sub.i+.sup.(k)), f(d.sub.i−.sup.(j)), respecitively, in the n-dimensional space R.sup.n. That means that d.sub.i is assigned to f (d.sub.i) 102, d.sub.i+.sup.(k) is assigned to f(d.sub.i+.sup.(k)) 103 and d.sub.i−.sup.(j) is assigned to f(d.sub.i−.sup.(j)) 104 in the n-dimensional space R.sup.n. A distance F(f(d.sub.i), f(d.sub.i+.sup.(k))) between the point f (d.sub.i) 102 assigned to the digital image d.sub.i of the respective training target coating C.sub.i and the point f(d.sub.i(d.sub.i+.sup.(k)) 103 assigned to the digital image d.sub.i+.sup.(k) of the respective preliminary good matching coating and/or a distance F(f(d.sub.i), f(d.sub.i−.sup.(j))) between the point f (d.sub.i) 102 assigned to the digital image d.sub.i of the respective training target coating C.sub.i and the point f(d.sub.i−.sup.(j)) 104 assigned to the digital image d.sub.i−.sup.(j) of the respective preliminary bad matching coating is a measure of the similarity between the respective training target coating C.sub.i and the respective preliminary matching coating, respectively. This distance is defined by the n-dimensional cost function F 106.
[0096] That means that the n-dimensional cost function F 106 which defines a similarity distance to the at least one training target coating C.sub.i (by considering all extractable features of the respective images, the measurable features and the hidden features) is to be optimized, such that the cost function F 106 is minimized min F(f (d.sub.i), f(d.sub.i+.sup.(k))) for the respective visually good matching formula and maximized max F(f (d.sub.i), f(d.sub.i−.sup.(j))) for the respective visually bad matching formula. As already described above, it is to be understood that the n-dimensional embedding function f 101 maps each image d.sub.i, d.sub.i+.sup.(k), d.sub.i−.sup.(j) to a respective point f(d.sub.i), f(d.sub.i+.sup.(k)), f(d.sub.i−.sup.(j)) in the n-dimensional parameter space R.sup.n wherein each dimension represents one feature wherein each feature might be weighted by a respective factor:
[0097] F 106 represents the distance/distance metric in this space. The smaller the distance F 106 of two images is, the more similar the two images are. When training the neural network 100, the goal of the proposed method is to learn an embedding function f 101 that assigns smaller distance F 106 to more similar image pairs, i.e. to consider in such embedding function f 101 as many features as possible, measurable and hidden features that have an impact on the visual appearance. The layers f 101 of the deep neural network 100 computes the embedding of an image d.sub.i: f(d.sub.i)∈R.sup.n where n is the dimension of the feature embedding.
[0098] When training the neural network 100, it is known that after passing through the neural network 100, all digital images of the first sublist D.sub.i+ are to be assigned to a category 130 designating the visually good matching coatings, and all digital images of the second sublist D.sub.1− are to be assigned to a category 140 designating the visually bad matching coatings among the plurality of preliminary matching coatings. With this knowledge and by using, inter alia, the backpropagation concept, the cost function F 106 can be simultaneously minimized for the visually good matching coatings and maximized for the visually bad matching coatings. Accordingly, the embedding function f 101 and its defining parameters is determined.
[0099] When the embedding function f 101 is determined, it is to be provided for usage as/in the trained neural network of the device 200 when searching for a good matching formula with regard to an available digital image p 211 of a target coating as schematically illustrated in
[0100] The output 250 of the device 200 which implements the trained neural network 202, when passed by a digital image p 211 (=target image) of a target coating and by a respective digital image q.sub.1, q.sub.2, . . . , q.sub.i, with i≥1 of a respective sample coating to be analysed for similarity to the target coating, is a respective distance value F(f(p), f(q.sub.j)) with 1≤j≤i 206 (see
[0101]
[0102]
[0103] Various steps of the methods of embodiments of the present invention may be performed by the computer 44 and/or the server 46. In another aspect, the invention may be implemented as a non-transitory computer readable medium containing software for causing a computer or computer system to perform the methods described above. The software can include various modules that are used to enable a processor and a user interface to perform the methods described herein.
LIST OF REFERENCE SIGNS
[0104] 100 neural network
[0105] 101 embedding function
[0106] 102 f(d.sub.i)
[0107] 103 f(d.sub.i+.sup.(k))
[0108] 104 f(d.sub.i−.sup.(j))
[0109] 106 cost function F
[0110] 107 minF (f (d.sub.i), f(d.sub.i+.sup.(k))
[0111] 108 maxF (f (d.sub.i), f(d.sub.i−.sup.(j))
[0112] 110 images
[0113] 111 arrow
[0114] 112 arrow
[0115] 120 triplets
[0116] 130 category “Good”
[0117] 140 category “Bad”
[0118] 200 device with implemented trained neural network
[0119] 201 time scale
[0120] 202 the trained neural network
[0121] 203 arrows
[0122] 204 cost function F(.Math.)
[0123] 210 digital images of sample coatings
[0124] 211 digital image of target coating
[0125] 212 fedding in the neural network
[0126] 206 output of the neural network, distance values F(f(p), f(q.sub.j))
[0127] 250 ranking order, output of the neural network
[0128] 301 d.sub.i
[0129] 302 d.sub.i+
[0130] 303 d.sub.i−
[0131] 400 device
[0132] 40 user
[0133] 41 user interface
[0134] 42 measuring device
[0135] 43 target coating
[0136] 44 computer
[0137] 45 network
[0138] 46 server
[0139] 47 database