Diagnostic tool for deep learning similarity models

CN116210031BActive Publication Date: 2026-08-18MICROSOFT TECHNOLOGY LICENSING LLC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202180063459.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-10-29
Filing Date
2021-06-07
Publication Date
2026-08-18
Estimated Expiration
2041-06-07

AI Technical Summary

Technical Problem

结果,ML模型的决策可能无法解释

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116210031B_ABST
    Figure CN116210031B_ABST
Patent Text Reader

Abstract

Diagnostic tools for deep learning similarity models and image classifiers provide valuable insights into neural network decision making. The disclosed solutions generate saliency maps by receiving a baseline image and a test image, determining a first similarity between the baseline image and the test image with a convolutional neural network (CNN), determining, based at least on determining the first similarity, a first activation map for at least one CNN layer for the test image, determining, based at least on determining the first similarity, a first gradient map for the at least one CNN layer for the test image, and generating a first saliency map as an element-wise function of the first activation map and the first gradient map. Some examples further determine a region of interest (ROI) in the first saliency map, crop the test image to a region corresponding to the ROI, and determine a refined similarity score.
Need to check novelty before this filing date? Find Prior Art

Description

Background Technology

[0001] Computer vision applications typically use machine learning (ML) models, in which images are fed into convolutional neural networks (CNNs) that make decisions about the images, such as the similarity between two images, image classification, object detection within an image, tracking persistent objects within a sequence of images, and other applications. Because these are typically deep learning models (e.g., 50 layers) trained using a series of labeled images, ML-based decision-making is largely considered a "black box" process. As a result, the decisions of ML models may be unpredictable. Summary of the Invention

[0002] The disclosed examples are described in detail below with reference to the accompanying drawings. The following overview is provided to illustrate some of the examples disclosed herein. However, this does not imply that all examples are limited to any particular configuration or order of operation.

[0003] Diagnostic tools for deep learning similarity models and image classifiers provide valuable insights into neural network decision-making. The disclosed solution generates a saliency map through the following steps: receiving a baseline image and a test image; determining a first similarity between the baseline image and the test image using a convolutional neural network (CNN); determining a first activation map for the test image for at least one CNN layer, based at least on the determined first similarity; determining a first gradient map for the test image for at least one CNN layer, based at least on the determined first similarity; and generating a first saliency map as an element-wise function of the first activation map and the first gradient map. Some examples further identify regions of interest (ROIs) in the first saliency map, crop the test image to the region corresponding to the ROI, and determine a refined similarity score. Attached Figure Description

[0004] The disclosed example will be described in detail below with reference to the accompanying drawings:

[0005] Figure 1 The illustration shows a diagnostic tool used for deep learning similarity models;

[0006] Figure 2 It shows the result of Figure 1 The tools used and the various images generated illustrate the generation of saliency maps in the similarity process;

[0007] Figure 3 It also shows the result of Figure 1 The tools used and the various images generated illustrate the generation of saliency maps in the image classification process;

[0008] Figure 4 It also shows the result of Figure 1 The tools used and the various images generated illustrate the improvements (refinement) in sorting the image set relative to a reference image;

[0009] Figure 5 It also shows the result of Figure 1 The tools used and the various images generated illustrate the diagnostic values ​​of the tools;

[0010] Figure 6 This is an instruction on how to use. Figure 1 A flowchart illustrating an exemplary operation performed by the tool;

[0011] Figure 7 This is an instruction on how to use. Figure 1 Another flowchart illustrating the exemplary operations performed by the tool; and

[0012] Figure 8 This is a block diagram of an example computing environment suitable for implementing some of the various examples disclosed herein.

[0013] In all the accompanying drawings, the corresponding reference numerals indicate the corresponding parts. Detailed Implementation

[0014] Various examples will be described in detail with reference to the accompanying drawings. Throughout the drawings, the same reference numerals are used as much as possible to refer to the same or similar parts. References to specific examples and embodiments in this disclosure are for illustrative purposes only and are not intended to limit all examples unless otherwise indicated.

[0015] Diagnostic tools for deep learning similarity models provide valuable insights into neural network decision-making. The disclosed solution generates a saliency map through the following steps: receiving a baseline image and a test image; determining a first similarity between the baseline and test images using a convolutional neural network (CNN); determining a first activation map for the test image for at least one CNN layer, based at least on the determined first similarity; determining a first gradient map for the test image for at least one CNN layer, based at least on the determined first similarity; and generating a first saliency map as an element-wise function of the first activation map and the first gradient map. Some examples further identify regions of interest (ROIs) in the first saliency map, crop the test image to the region corresponding to the ROI, and determine a refined similarity score. Some examples can be further applied to image classifiers.

[0016] Various aspects of this disclosure operate in an unconventional manner by generating saliency maps as element-wise functions of activation and gradient maps. Some examples further generate synthetic saliency maps as element-wise functions of saliency maps for different CNN layers. A saliency map is an image that shows the contribution of each pixel to the output and can be used to provide a representation of complex processes in a format meaningful to the analysis by providing localization with important information. Similarity models produce similarity scores between two given signals, which quantify the similarity between the two signals (e.g., images) into an objective, repeatable metric.

[0017] Various aspects of this invention provide explanations for practical results in machine learning (ML) decision making, such as diagnostic images (see...). Figure 4 This allows for the assessment of decision quality. This diagnostic capability can be used to improve both training and input data. For example, aspects of the invention provide further practical results by identifying Regions of Interest (ROIs) in the saliency map, allowing the input image to be cropped to the region corresponding to the ROI. Using the cropped input image to determine the refinement similarity score yields higher quality, more meaningful scores. This operation can improve the ranking results when multiple input images are ranked according to their similarity relative to a baseline (reference) image.

[0018] Therefore, this disclosure identifies which parts of the input image contribute most to the similarity score generated by the similarity model, thus providing an explanation of how the similarity model determines similarity (e.g., which features are most relied upon in the decision-making process). External information such as item labels, categories, colors, and other metadata can be improved during training, thereby enhancing the subsequent performance of the ML model. The disclosed diagnostic tools can be used to evaluate the reliability and quality of key ML decision-making. The ML model operates most reliably when the basis for decision-making is sound. Identifying the ROIs responsible for the score and identifying the key factors responsible for the score can help enhance and debug the model.

[0019] Figure 1A diagnostic tool 100 for a deep learning similarity model is shown, although some examples of the diagnostic tool 100 can operate on classification models. The operation of the diagnostic tool 100 will be explained in conjunction with the four stages of data flow and computation indicated by solid lines (stage 1), dashed lines (stage 2), dashed lines (stage 3), and dotted lines (stage 4). The deep learning model 102 includes a CNN 104 and may include a similarity model or another ML model. In some examples, the CNN 104 includes 50 or more layers and may be a residual CNN. The CNN 104 is shown as having an input layer 106a, a first hidden layer 106b, a final hidden layer L (which may precede the output layer), a penultimate layer (the second layer from the final layer) L-1, and an inner layer L-2 preceding the penultimate hidden layer L-1. Layers L, L-1, and L-2 may be located elsewhere within the CNN 104. Additional layers are not shown for clarity. Deep learning models 102 develop their decision-making abilities through training, and a common theory is that earlier layers pick up basic shapes, while later layers provide context for these shapes, such as size and placement.

[0020] Deep learning model 102 receives a baseline image 112 and a test image 110, and in some scenarios, also receives multiple additional test images 110a. In some examples, the images are 256×256 pixels. Deep learning model 102 initially (using CNN 104) determines a first similarity 120 between the baseline image 112 and the test image 110. In some examples, the first similarity 120 is a scalar first similarity score 122, although in some examples, the first similarity 120 may contain additional information besides the scalar first similarity score 122. In the similarity task, two images X and Y are mapped to vectors and assigned a similarity score S(F). X ,F Y A common practice is to apply cosine similarity, dot product, or inner product (or other functions) to S. In some examples, the representation produced by F is not necessarily taken from the last hidden layer of the network. Therefore, F could be a (non-convolutional) hidden layer, or even another layer that outputs the score.

[0021] Activation map 130 and gradient map 140 are generated during the process of determining the first similarity 120 (e.g., at least based on determining the first similarity 120). During the process of determining the first similarity 120, various neurons within CNN 104 are activated, thereby enabling the determination of one or more activation maps 130. For example, activation maps of layers L, L-1, and L-2 are saved for both the test image 110 and the baseline image 112. In the example shown, activation map 130L is for layer L with the test image 110, activation map 130L-1 is for layer L-1 with the test image 110, activation map 130L-2 is for layer L-2 with the test image 110, activation map 132L is for layer L with the baseline image 112, activation map 132L-1 is for layer L-1 with the baseline image 112, and activation map 132L-2 is for layer L-2 with the baseline image 112. Activation maps 130 (e.g., activation maps 130L, 130L-1, 130L-2, 132L, 132L-1, 131-2, and activation maps for other layers) are determined using forward passes through CNN 104. Generally, activation is independent of scoring.

[0022] The determination of gradient map 140 can occur in the opposite direction via CNN 104. In some examples, gradient maps for layers L, L-1, and L-2 are determined for both the test image 110 and the baseline image 112. In the example shown, gradient map 140L is for layer L with test image 110, gradient map 140L-1 is for layer L-1 with test image 110, gradient map 140L-2 is for layer L-2 with test image 110, gradient map 142L is for layer L with baseline image 112, gradient map 142L-1 is for layer L-1 with baseline image 112, and gradient map 142L-2 is for layer L-2 with baseline image 112. The gradient map indicates the contribution of a pixel to the score. For example, if a given pixel is enhanced and the score increases, this is a positive gradient. The gradient strength is stored in gradient map 140. Further details are provided below.

[0023] One of the activation maps 130 is combined with a corresponding one of the gradient maps 140 using a combination function 134 to generate one of the saliency maps 150. In some examples, saliency maps for layers L, L-1, and L-2 are generated for both the test image 110 and the baseline image 112. In the example shown, saliency map 150L is for layer L with the test image 110, saliency map 150L-1 is for layer L-1 with the test image 110, saliency map 150L-2 is for layer L-2 with the test image 110, saliency map 152L is for layer L with the baseline image 112, saliency map 152L-1 is for layer L-1 with the baseline image 112, and saliency map 152L-2 is for layer L-2 with the baseline image 112. Saliency map 150L is generated by combining activation map 130L and gradient map 140L; saliency map 150L-1 is generated by combining activation map 130L-1 and gradient map 140L-1; saliency map 150L-2 is generated by combining activation map 130L-2 and gradient map 140L-2; saliency map 152L is generated by combining activation map 132L and gradient map 142L; saliency map 152L-1 is generated by combining activation map 132L-1 and gradient map 142L-1; and saliency map 152L-2 is generated by combining activation map 132L-2 and gradient map 142L-2. In some examples, a combination function 134 is used to perform the combination of activation maps and gradient maps. In some examples, the combination function 134 includes element-wise combination of activation maps and corresponding gradient maps, and may include the Hadamard product. The Hadamard product is a binary operation that takes two matrices of the same dimension and produces another matrix of the same dimension as operands, where each element is the product of the corresponding elements of the original two matrices. Other functions may also be used in some examples.

[0024] When creating saliency maps for multiple layers, the combination function 136 can be used to combine those saliency maps into a synthetic saliency map. In some examples, the combination function 136 is an element-wise combination of a saliency map with one or more other saliency maps and may include element-wise summation. For example, synthetic saliency map 150C can be an element-wise combination of any two (or more) saliency maps 150L, ​​150L-1, 150L-2 and / or maps for other layers, and synthetic saliency map 152C can be an element-wise combination of any two (or more) saliency maps 152L, 152L-1, 152L-2 and / or maps for other layers. Other functions may also be used in some examples. Generally, saliency maps for later layers produce larger ROIs than saliency maps for earlier layers. Therefore, a synthetic saliency map (e.g., saliency map 150C or 152C) can have a more tightly focused ROI than a saliency map for only a single final hidden layer (e.g., saliency map 150L or 152L).

[0025] Further details regarding the exemplary generation of saliency maps are provided. Given an image X, the l-th saliency map is represented as:

[0026]

[0027]

[0028] Where h is the activation map (e.g., one of activation maps 130), g is the gradient map (e.g., one of gradient maps 140), and m is the saliency map (e.g., one of saliency maps 150). The gradient map g is defined and represented (where S is the similarity score) as follows:

[0029]

[0030]

[0031] The saliency map is implemented as follows:

[0032]

[0033] Where φ is the rectified linear unit (ReLU) activation function, and It is the Hadamard product. The ReLU function returns 0 for a negative argument, but returns the argument itself for a positive one. The exponentiation operation is performed element-wise using a predetermined parameter p (applied after ReLU activation). RSZ represents the operation of resizing a matrix to size m0 multiplied by n0 (e.g., the height and width of the original image X). NRM represents the min-max normalization to the interval [0,1].

[0034] One motivation behind equation (5) is that each filter k in the l-th convolutional layer captures a specific pattern. Therefore, it can be expected that... It has high (low) values ​​in the region that is (not) correlated with the k-th filter. Furthermore, The region receiving positive (negative) values ​​indicates an increase. The value of S will increase (decrease) in the same region.

[0035] This highlights pixels that are both positively activated and associated with positive gradients. Therefore, ReLU is used to truncate all negative gradients. Then, (optionally) exponentiation (using p≥1) is used to emphasize the gradient map. The positive region in the graph. For example, setting p=2 might produce the desired result. Next, activate the graph. Negative values ​​are truncated and multiplied (element-wise) with the truncated and emphasized gradient map. This ensures that only pixels relevant to both positive activation and positive gradient are retained. The saliency map is summed along the channel (filter) axis to aggregate the saliency of each pixel from all channels in layer l. The l-th saliency map It is obtained by resizing (e.g., via bicubic interpolation) to the original image space dimensions and then performing min-max normalization. The final saliency map is

[0036]

[0037] It is calculated based on the pooling function z. Two different pooling functions can be used. (This only applies to the final layer.)

[0038]

[0039] For the sum of the last two layers:

[0040]

[0041] Any saliency map 150 can be represented as a heatmap, which can have the same size as the baseline image 112 and / or the test image 110. In the heatmap, pixel values ​​are represented by colors, such as red for the highest value and blue for the lowest value. The heatmap generator 154 colors the pixels of any saliency map to be output as an image, although the saliency map 150 can be changed to a matrix (instead of an image) for use in some process. At this point, the diagnostic tool 100 has already provided outputs valuable for a variety of uses.

[0042] For example, saliency map 150C can be sent to ROI calculator 144 to extract ROI 114 from saliency map 150C. ROI 114 indicates the portion of test image 110 responsible for similarity score 122. Cropping function 146 uses ROI 114 to generate a cropped test image 116 showing a portion of test image 110 (such as the region in saliency map 150C corresponding to ROI 114). Cropped test image 116 is received by deep learning model 102 (and CNN 104) and used to determine thinning similarity 124. In some examples, thinning similarity 124 is a scalar thinning similarity score 126, although in some examples, thinning similarity 124 may include additional information beyond the scalar thinning similarity score 126. In some examples, this process is repeated for each additional test image 110a to produce multiple scores 126a. In some examples, scores 126a include an initial similarity score, a thinning similarity score, or both.

[0043] In some examples, such as in an e-commerce example, refined similarity scores 126 and 126a (attached test image 110a) are sent to a ranking calculator 128, which is capable of ranking test image 110 (or cropped test image 116) relative to the attached test image 110a. The ranking result is used to display test image 110 (or cropped test image 116) and the attached test image 110a to customer 148 on display 138 according to the ranking. Figure 4 A more detailed example is shown in the figure.

[0044] The added value from diagnostic tool 100 can be realized using diagnostic function 156, which provides analysis of the operation of deep learning model 102 (specifically CNN 104). Any saliency map 150 can be sent to diagnostic function 156 along with ROI 114 and / or image ranking results from ranking calculator 128. In some examples, a comparison of similarity score 122 with refined similarity score 126 demonstrates that the improvement of refined similarity score 126 relative to the original similarity score 122 can provide insights into the operation of CNN 104. Insights obtained by diagnostic function 156 (and / or human users of diagnostic tool 100) can be used to improve training data in training data 158, which further improves the performance of deep learning model 102.

[0045] Figure 2 Various images used and generated by diagnostic tool 100 are shown. Baseline image 112 is shown along with its activation map 132L, saliency map 152L (for the final hidden layer L), and synthetic saliency map 152C (for the last two layers L and L-1). For comparison, test image 110 is also shown along with its activation map 130L, saliency map 150L (for the final hidden layer L), and synthetic saliency map 150C (for the last two layers L and L-1). Activation map 130L captures the dog's head but does not contribute to the score. Adding a gradient map focuses the saliency map on the basketball. By comparing saliency map 150C with saliency map 152C and baseline image 112, it can be seen that the basketball, not the dog, drives the similarity results.

[0046] As in Figure 3 As can be seen, the architecture of Diagnostic Tool 100 can also be applied to image classification models. That is, although activation maps and gradient maps are generated in response to classification decision operations (rather than similarity decision operations), they can be applied to image classification models. Figure 1 The test image 110 is generated, combined, and synthesized as described. For application to an image classification model, when no baseline image is available for similarity decision, the saliency map can be applied to both the training image and the classification test image. This is illustrated with... Figure 1The test image 110 corresponds to the input image 310 of the cat, and the final layer saliency map 350L (corresponding to saliency map 150L), layer L-1 saliency map 350L-1 (corresponding to saliency map 150L-1), layer L-2 saliency map 350L-2 (corresponding to saliency map 150L-2), and the synthetic saliency map 350C generated using saliency maps 350L, 350L-1, and 350L-2. Figure 3 As shown, the use of the last three layers produces a well-defined region of interest around the cat. This indicates that the classification model has been trained appropriately.

[0047] Figure 4 The application of diagnostic tool 100 in computer vision applications related to e-commerce is illustrated. The website shows display 138, which contains several items for sale presented to customer 148. However, the annotations regarding the "baseline image" and scores are for illustrative purposes and may not be shown on the website. Image 412 (corresponding to...) Figure 1 The baseline image 112 is the item that customer 148 has already selected to view. E-commerce-related computer vision applications present images of alternative products to customer 148 in case customer 148 may prefer something slightly different from the initial selection.

[0048] Images of candidate products are scored based on similarity, and then presented to customer 148 in display 138 based on the similarity scores. It can be seen that image 410a of the candidate product has a similarity score of 467, which is the highest score. This image 410a is presented in a prominent position within display 138, adjacent to image 412 of the selected product. Another image 410 of the same product (although possibly from a different supplier) initially received a lower score of 300 and was therefore presented in a less desirable position. In some scenarios, customer 148 might not even notice image 410 because it is placed far from the prominent position. The lower score of image 410 appears to be a suboptimal decision compared to image 410a, as the items within image 410 are more similar to the items within image 412 than the items within image 410a. This is likely because the initial score 422 (corresponding to the first similarity score 122) of 300 was created using images that also exhibit a relatively large amount of confusing background.

[0049] The diagnostic tool 100 demonstrates useful results by generating a saliency map 450C (corresponding to the synthetic saliency map 150C) and passing it through the ROI calculator 144 and the cropping function 146 to produce a cropped image 416 (corresponding to the cropped test image 116). For comparison, a saliency map 452C (corresponding to the synthetic saliency map 152C) is shown to demonstrate that the ROIs in saliency maps 450C and 452C are similar. When the cropped image 416 is resubmitted to the deep learning model 102 for scoring, the refinement similarity score 426 (corresponding to the refinement similarity score 126) has a value of 588. This value is higher than the score of image 410a, therefore the ranking now places the cropped image 416 (or image 410 in its place) in a prominent position within display 138. This provides an enhanced experience for customers 148 on the e-commerce website.

[0050] Figure 5 The added value of diagnostic tool 100 is illustrated. Test image 510 is tested against baseline image 512 for similarity. A human visual comparison of images 510 and 512 might lead to the expectation that the similarity result output from deep learning model 102 will be based on the presence of plant 502 within image 510. However, this is not the case. By comparing the saliency map 552C for baseline image 512 with the saliency map 550C for test image 510, it can be seen that the similarity score is largely based on the presence of shaded region 504 (under the curtains in test image 510) and shaded region 506 (under the table in baseline image 512). Such a result may not be intuitive to a human observer. This demonstrates the value of diagnostic tool 100 in identifying ML decision-making factors that may be hidden in other ways.

[0051] Figure 6 This is a flowchart 600 illustrating exemplary operations involved in generating a saliency map using diagnostic tool 100. In some examples, the operations described for flowchart 600 are performed by... Figure 8 The computational device 800 performs the operation. Flowchart 600 begins with operation 602, which includes receiving a baseline image (e.g., baseline image 112) and a test image (e.g., test image 110). In some examples, operation 602 includes receiving multiple additional test images (e.g., additional test image 110a). Operation 604 includes using a CNN (e.g., CNN 104) to determine a first similarity between the baseline image and the test image (e.g., similarity result 120). In some examples, the CNN includes a portion of a similarity model. In some examples, the CNN includes a residual CNN. In some examples, the CNN includes 50 layers.

[0052] Operation 606 includes generating one or more saliency maps (e.g., one or more saliency maps 150) for the test image. To achieve this, operation 606 includes operations 608-618. Operation 608 includes determining a first activation map (e.g., activation map 130L) for the test image based at least on a determined first similarity. In some examples, determining the first activation map for at least one CNN layer includes determining an activation map (e.g., activation map 130L) for at least the final CNN layer (e.g., layer L). In some examples, operation 608 also includes: determining a second activation map (e.g., activation map 130L-1) for the test image for the penultimate hidden CNN layer (e.g., layer L-1), and / or determining at least one inner layer activation map (e.g., activation map 130L-2) for the test image for at least one CNN layer preceding the penultimate hidden CNN layer (e.g., layer L-2). Other activation maps for other layers may also be determined.

[0053] Operation 610 is similar to operation 608, although it pertains to gradient maps. That is, operation 610 includes determining a first gradient map (e.g., gradient map 140L) for at least one CNN layer for the test image based at least on a determined first similarity. In some examples, operation 610 further includes: determining a second gradient map (e.g., gradient map 140L-1) for the test image for the penultimate hidden CNN layer, and / or determining at least one inner layer gradient map (e.g., gradient map 140L-2) for the test image for at least one CNN layer preceding the penultimate hidden CNN layer. Other gradient maps for other layers may also be determined.

[0054] Operation 612 generates a saliency map by combining the activation map and the gradient map. For example, operation 612 includes generating a first saliency map (e.g., saliency map 150L) as a first element-wise function of a first activation map and a first gradient map. In some examples, operation 612 further includes generating a second saliency map (e.g., saliency map 150L-1) as a first element-wise function of a second activation map and a second gradient map, and / or generating at least one inner saliency map (e.g., saliency map 150L-2) as an element-wise function of at least one inner activation map and at least one inner gradient map. In some examples, the element-wise function of the activation map and the gradient map includes the Hadamard product. Other functions may be used instead.

[0055] Operation 614 uses two or more layers of saliency maps to generate a synthetic saliency map. For example, operation 614 includes generating a first synthetic saliency map (e.g., saliency map 150C) as an element-wise function of a first saliency map and a second saliency map. In some examples, operation 614 includes generating the first synthetic saliency map by performing an element-wise function on the first saliency map, the second saliency map, and at least one inner-layer saliency map. In some examples, a large number of layer saliency maps may be used. In some examples, the element-wise function of the first saliency map and the second saliency map includes element-wise summation. Other functions may be used instead. In operation 618, the saliency map may be converted into a heatmap. That is, operation 618 includes outputting the first synthetic saliency map as a heatmap image, and / or outputting the first saliency map as a heatmap image, and / or outputting other saliency maps disclosed herein may also be represented as heatmap images. Operation 620 includes outputting a first similarity score (e.g., similarity score 122) based at least on a first similarity.

[0056] Operation 622 is similar to operation 606, although operation 622 generates a saliency map for the baseline image. Specifically, operation 622 includes: determining a third activation map (e.g., activation map 132L) for at least one CNN layer based at least on a first similarity determination for the baseline image, and determining a third gradient map (e.g., gradient map 142L) for the baseline image for at least one CNN layer. Operation 622 also includes generating a third saliency map (e.g., saliency map 152L) as an element-wise function of the third activation map and the third gradient map. In some examples, determining the third saliency map includes determining a third saliency map for at least the final CNN layer. Operation 622 may also include generating a second synthetic saliency map (e.g., saliency map 152C) as an element-wise function of the third saliency map and the saliency map generated for the baseline image using the penultimate hidden CNN layer (and / or additional inner layers of the CNN). Operation 622 may also include: outputting the second synthetic saliency map as a heatmap image, outputting the third saliency map as a heatmap image, and outputting any other saliency map for the baseline image as a heatmap image.

[0057] Based at least on pixel values ​​in the first saliency map, operation 624 determines the Region of Interest (ROI) in the first saliency map and / or the first composite saliency map (e.g., ROI 114). Alternatively, ROIs in other saliency maps may be determined. Operation 626 includes cropping the test image to the region corresponding to the ROI in the first saliency map or the first composite saliency map, thereby producing a cropped test image (e.g., cropped test image 116). Operation 628 includes using a CNN to determine a thinning similarity between the baseline image and the cropped test image (e.g., thinning similarity 124). This may involve repeating operation 604, but for the cropped test image instead of the original test image. Operation 630 includes outputting a thinning similarity score (e.g., thinning similarity score 126) based at least on the thinning similarity between the baseline image and the cropped test image. If multiple additional test images have been received at 602, operation 632 includes using a CNN to determine multiple similarity scores (e.g., score 126a) for the multiple additional test images relative to the baseline image. This may involve performing operations 602 and 606 on each of multiple images, or (in some examples) operations 602, 606, and 624-628.

[0058] The output of diagnostic tool 100 can also be valuablely utilized. For example, operation 634 includes sorting the test image and multiple additional test images according to a refined similarity score of the cropped test image and multiple similarity scores of multiple additional test images. In some examples, the multiple similarity scores of the multiple additional test images are also refined similarity scores, based on cropping the additional test images to their respective ROIs (as determined in an earlier similarity scoring process). Operation 636 includes displaying the test image (e.g., the entire original test image or a cropped portion of the test image) and at least a portion of the multiple additional test images according to the sorting.

[0059] Other benefits include enhancing the performance of the CNN. For example, operation 638 includes providing a saliency map (any saliency map described herein), ranking, ROI, and / or similarity scores to a diagnostic function (e.g., diagnostic function 156). Operation 640 includes providing refined training data to the CNN based at least on the output of the diagnostic function.

[0060] Figure 7 This also illustrates a flowchart 700 of exemplary operations involved in generating a saliency map using diagnostic tool 100. In some examples, the operations described for flowchart 700 are performed by... Figure 8The computational device 800 performs the operation. Flowchart 700 begins with operation 702, which includes receiving a baseline image and a test image. Operation 704 includes determining a first similarity between the baseline image and the test image using a CNN. Operation 706 includes determining a first activation map for at least one CNN layer for the test image based at least on the determined first similarity. Operation 708 includes determining a first gradient map for at least one CNN layer for the test image based at least on the determined first similarity. Operation 710 includes generating a first saliency map as a first element-wise function of the first activation map and the first gradient map.

[0061] Other examples

[0062] An exemplary system for generating saliency maps for computer vision applications includes: a processor; and a computer-readable medium storing instructions operable, when executed by the processor, for: receiving a baseline image and a test image; determining a first similarity between the baseline image and the test image using a CNN; determining a first activation map for the test image for at least one CNN layer based at least on the determination of the first similarity; determining a first gradient map for the test image for at least one CNN layer based at least on the determination of the first similarity; and generating a first saliency map as a first element-wise function of the first activation map and the first gradient map.

[0063] An exemplary method for generating saliency maps for computer vision applications includes: receiving a baseline image and a test image; determining a first similarity between the baseline image and the test image using a convolutional neural network (CNN); determining a first activation map for the test image for at least one CNN layer based at least on the determined first similarity; determining a first gradient map for the test image for at least one CNN layer based at least on the determined first similarity; and generating a first saliency map as a first element-wise function of the first activation map and the first gradient map.

[0064] One or more computer storage devices thereon store computer-executable instructions that, when executed by a computer, cause the computer to perform operations including: receiving a baseline image and a test image; determining a first similarity between the baseline image and the test image using a convolutional neural network (CNN); determining a first activation map for the test image for at least one CNN layer based at least on determining the first similarity; determining a first gradient map for the test image for at least one CNN layer based at least on determining the first similarity; and generating a first saliency map as a first element-wise function of the first activation map and the first gradient map.

[0065] Alternatively, or in addition to the other examples described herein, examples include any combination of the following:

[0066] - The first element-wise function of the first activation map and the first gradient map includes the Hadamard product;

[0067] - Determine the region of interest in the first saliency map based at least on the pixel values ​​in the first saliency map.

[0068] Region of Interest (ROI);

[0069] - Crop the test image to the region corresponding to the ROI in the first saliency map;

[0070] - Use CNN to determine the refined similarity between the baseline image and the cropped test image;

[0071] - Input should be based at least on the thinning similarity between the baseline image and the cropped test image.

[0072] Develop a detailed similarity score;

[0073] -Use CNN to determine multiple similarities between multiple additional test images and a baseline image.

[0074] Score;

[0075] - Sort the test image and multiple additional test images according to the refined similarity score of the cropped test image and the multiple similarity scores of multiple additional test images;

[0076] - Based at least on determining the first similarity, determine the second activation map for the penultimate hidden CNN layer for the test image;

[0077] - Based at least on determining the first similarity, determine the second gradient map for the penultimate hidden CNN layer for the test image;

[0078] - Generate a second saliency map as a second element-wise function of the second activation map and the second gradient map;

[0079] - Generate a first composite saliency map as a third element-wise function of the first and second saliency maps;

[0080] - The element-wise functions of the first and second saliency maps include element-wise summation;

[0081] -Based on determining a first similarity, determine a third activation map for at least one CNN layer for the baseline image;

[0082] - Based at least on determining a first similarity, determine a third gradient map for at least one CNN layer for the baseline image; and

[0083] - Generate the third saliency map as the fourth element-wise function of the third activation map and the third gradient map;

[0084] Determining the first activation map for at least one CNN layer includes determining the activation map for at least the final CNN layer;

[0085] Determining the first gradient map for at least one CNN layer includes determining the activation map for at least the final CNN layer;

[0086] -Based at least on determining a first similarity, determine at least one inner layer activation map for the test image for at least one CNN layer preceding the penultimate hidden CNN layer;

[0087] - Based on at least the determination of a first similarity, determine at least one inner layer gradient map for the test image for at least one CNN layer prior to the penultimate hidden CNN layer;

[0088] - Generate at least one inner saliency map as an element-wise function of at least one inner activation map and at least one inner gradient map;

[0089] - Generating the first composite saliency map involves performing an element-wise function on the first saliency map, the second saliency map, and at least one inner saliency map.

[0090] - Generate as the third saliency map and use the penultimate hidden CNN layer as the baseline image.

[0091] The second composite saliency map of the element-wise functions of the saliency map;

[0092] - Output the first similarity score based at least on the first similarity;

[0093] - Output the first saliency map as a heatmap image;

[0094] - Output the first composite saliency map as a heatmap image;

[0095] - Output the second synthetic saliency map as a heatmap image;

[0096] -CNNs include a similarity model as part of their structure;

[0097] -CNNs include residual CNNs; and

[0098] -The CNN consists of 50 layers.

[0099] Although aspects of this disclosure have been described with reference to various examples and their associated operations, those skilled in the art will understand that combinations of operations from any number of different examples are also within the scope of aspects of this disclosure.

[0100] Example operating environment

[0101] Figure 8This is a block diagram of an example computing device 800 used to implement the aspects disclosed herein, and is generally designated as computing device 800. Computing device 800 is merely an example of a suitable computing environment and is not intended to impose any limitation on the scope or functionality of the examples disclosed herein. Computing device 800 should also not be construed as having any dependency or requirement on any one or combination of the components / modules shown. The examples disclosed herein can be described in the general context of computer code or machine-usable instructions, including computer-executable instructions (such as program components) executed by a computer or other machine (such as a personal data assistant or other handheld device). Generally, a program component, including routines, programs, objects, components, data structures, etc., refers to code that performs a specific task or implements a specific abstract data type. The disclosed examples can be practiced in a variety of system configurations, including personal computers, laptops, smartphones, mobile tablets, handheld devices, consumer electronics, dedicated computing devices, etc. The disclosed examples can also be practiced in distributed computing environments when tasks are performed by remote processing devices linked via a communication network.

[0102] Computing device 800 includes a bus 810 that directly or indirectly couples to the following devices: computer storage memory 812, one or more processors 814, one or more presentation components 816, I / O ports 818, I / O components 820, power supply 822, and network components 824. Although computing device 800 is depicted as a single device, multiple computing devices 800 can work together and share the depicted device resources. For example, memory 812 can be distributed across multiple devices, and processors(s) 814 can be housed in different devices.

[0103] Bus 810 indicates that it can be one or more buses (such as an address bus, a data bus, or a combination thereof). Although for clarity, Figure 8 The various boxes are shown with lines, but the various components can be depicted using alternative representations. For example, in some examples, presentation components such as display devices are I / O components, and some examples of processors have their own memory. No distinction is made between categories such as "workstation," "server," "laptop," and "handheld device," as all of these are considered to be in... Figure 8Within the scope of the term "computing device" as used herein, memory 812 may take the form of a computer storage medium and is operable to provide storage for computer-readable instructions, data structures, program modules, and other data for computing device 800. In some examples, memory 812 stores one or more of an operating system, a general-purpose application platform, or other program modules and program data. Therefore, memory 812 is capable of storing and accessing data 812a and instructions 812b, which can be executed by processor 814 and configured to perform the various operations disclosed herein.

[0104] In some examples, memory 812 includes computer storage media in the form of volatile and / or non-volatile memory, removable or non-removable memory, a data disk in a virtual environment, or a combination thereof. Memory 812 may include any number of memories associated with or accessible by computing device 800. Memory 812 may be internal to computing device 800 (e.g., Figure 8 As shown), the memory 812 may be located externally to the computing device 800 (not shown), or both (not shown). Examples of memory 812 include, but are not limited to: random access memory (RAM); read-only memory (ROM); electrically erasable programmable read-only memory (EEPROM); flash memory or other memory technologies; CD-ROM, digital versatile disk (DVD), or other optical or holographic media; magnetic tape, magnetic tape, disk storage, or other magnetic storage devices; memory wired to an analog computing device; or any other medium used to encode desired information and for access by the computing device 800. Additionally or alternatively, the memory 812 may be distributed across multiple computing devices 800, for example, in a virtualized environment in which instruction processing is performed on multiple devices 800. For the purposes of this disclosure, “computer storage medium,” “computer storage memory,” “memory,” and “memory device” are synonymous terms for computer storage memory 812, and none of these terms include a carrier wave or propagation signaling.

[0105] The (multiple) processors 814 may include any number of processing units that read data from various entities, such as memory 812 or I / O components 820. Specifically, the (multiple) processors 814 are programmed to execute computer-executable instructions for implementing aspects of this disclosure. These instructions may be executed by a processor, by multiple processors within computing device 800, or by a processor external to client computing device 800. In some examples, the (multiple) processors 814 are programmed to execute instructions such as those shown in the flowcharts discussed below and depicted in the accompanying drawings. Furthermore, in some examples, the (multiple) processors 814 represent an implementation of analog techniques for performing the operations described herein. For example, the operations may be performed by analog client computing device 800 and / or digital client computing device 800. The (multiple) presentation components 816 present data indications to a user or other device. Exemplary presentation components include display devices, speakers, printing components, vibration components, etc. Those skilled in the art will understand and appreciate that computer data can be presented in a variety of ways, such as visually in a graphical user interface (GUI), audibly through a speaker, wirelessly between computing devices 800, via a wired connection, or otherwise. I / O port 818 allows computing device 800 to be logically coupled to other devices including I / O components 820, some of which may be built-in. Example I / O components 820 include, for example, but not limited to, microphones, joysticks, game controllers, satellite dish antennas, scanners, printers, wireless devices, etc.

[0106] Computing device 800 can operate in a networked environment via a logical connection to one or more remote computers through network component 824. In some examples, network component 824 includes a network interface card and / or computer-executable instructions (e.g., a driver) for operating the network interface card. Communication between computing device 800 and other devices can be performed using any protocol or mechanism over any wired or wireless connection. In some examples, network component 824 is operable to use transport protocols via public, private, or hybrid (public and private) short-range communication technologies (e.g., near-field communication, Bluetooth). TM Data is wirelessly transmitted between devices (such as trademark communication devices, etc.) or combinations thereof. Network component 824 communicates with cloud resource 828 on network 830 via wireless communication link 826 and / or wired communication link 826a. Various examples of communication links 826 and 826a include wireless connections, wired connections, and / or dedicated links, and in some examples, at least a portion is routed over the Internet.

[0107] Although described in conjunction with example computing device 800, the examples of this disclosure can be implemented using many other general-purpose or special-purpose computing system environments, configurations, or devices. Examples of well-known computing systems, environments, and / or configurations that can be applied to various aspects of this disclosure include, but are not limited to, smartphones, mobile tablets, mobile computing devices, personal computers, server computers, handheld or laptop devices, multiprocessor systems, game consoles, microprocessor-based systems, set-top boxes, programmable consumer electronics, mobile phones, mobile computing and / or communication devices in wearable or accessory form factors (e.g., watches, glasses, headphones, or earphones), network PCs, microcomputers, mainframe computers, distributed computing environments including any of the aforementioned systems or devices, virtual reality (VR) devices, augmented reality (AR) devices, mixed reality (MR) devices, holographic devices, etc. Such systems or devices can accept input from users in any manner, including from input devices such as keyboards or pointing devices, via gesture input, proximity input (such as by hover), and / or via voice input.

[0108] Examples of this disclosure can be described in the general context of computer-executable instructions (such as program modules) that are executed by one or more computers or other devices as software, firmware, hardware, or a combination thereof. Computer-executable instructions can be organized into one or more computer-executable components or modules. Typically, program modules include, but are not limited to, routines, programs, objects, components, and data structures that perform a particular task or implement a particular abstract data type. Aspects of this disclosure can be implemented using any number and organization of such components or modules. For example, aspects of this disclosure are not limited to the specific computer-executable instructions or specific components or modules shown in the accompanying drawings and described herein. Other examples of this disclosure may include different computer-executable instructions or components having more or fewer functions than those shown and described herein. In examples involving general-purpose computers, aspects of this disclosure transform a general-purpose computer into a special-purpose computing device when configured to execute the instructions described herein.

[0109] By way of example and not limitation, computer-readable media include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable memory implemented in any method or technique for storing information such as computer-readable instructions, data structures, program modules, etc. Computer storage media are tangible and mutually exclusive with communication media. Computer storage media are implemented in hardware and do not include carrier waves and propagating signals. For the purposes of this disclosure, computer storage media themselves are not signals. Exemplary computer storage media include hard disks, flash drives, solid-state storage, phase-change random-access memory (PRAM), static random-access memory (SRAM), dynamic random-access memory (DRAM), other types of random-access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disk read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, cassette tape, magnetic tape, disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information for access by a computing device. In contrast, communication media typically contain computer-readable instructions, data structures, program modules, etc., within modulated data signals such as carrier waves or other transmission mechanisms, and include any information transmission medium.

[0110] The order of operation of the examples shown and described herein is not important and may be performed in different orders in various examples. For example, it is within the scope of this disclosure that a particular operation is expected to run or be performed before, simultaneously with, or after another operation. When introducing elements or examples of aspects of this disclosure, the articles “a,” “an,” “the,” and “described” mean that there are one or more elements. The terms “comprising,” “including,” and “having” are intended to be inclusive and mean that there may be additional elements besides those listed. The term “exemplary” is intended to mean “an example of…”. The phrase “one or more of the following: A, B, and C” means “at least one A and / or at least one B and / or at least one C.”

[0111] Having described in detail various aspects of this disclosure, it will be apparent that modifications and variations are possible without departing from the scope of the aspects of this disclosure as defined in the appended claims. Since various changes can be made to the above-described structures, products, and methods without departing from the scope of the aspects of this disclosure, all content contained in the foregoing description and shown in the accompanying drawings should be interpreted as illustrative rather than restrictive.

Claims

1. A method for generating saliency maps for computer vision applications, the method comprising: Receive baseline and test images; A first similarity between the baseline image and the test image is determined using a convolutional neural network (CNN). Based at least on determining the first similarity, a first activation map for at least one CNN layer is determined for the test image; Based at least on determining the first similarity, a first gradient map for the at least one CNN layer is determined for the test image; as well as The first element-wise function is used to operate on the first activation map and the first gradient map to generate the first saliency map.

2. The method according to claim 1, wherein the first element-wise function of the first activation map and the first gradient map includes the Hadamard product.

3. The method according to claim 1, further comprising: The region of interest (ROI) in the first saliency map is determined based at least on the pixel values ​​in the first saliency map. The test image is cropped to the region corresponding to the ROI in the first saliency map; The CNN is used to determine the thinning similarity between the baseline image and the cropped test image; as well as A thinning similarity score is output based at least on the thinning similarity between the baseline image and the cropped test image.

4. The method according to claim 3, further comprising: The CNN is used to determine multiple similarity scores for multiple additional test images relative to the baseline image; as well as The test image and the plurality of additional test images are sorted based on the thinned similarity score for the cropped test image and the plurality of similarity scores for the plurality of additional test images.

5. The method according to claim 1, further comprising: Based at least on determining the first similarity, a second activation map for the penultimate hidden CNN layer is determined for the test image; Based at least on determining the first similarity, a second gradient map for the penultimate hidden CNN layer is determined for the test image; The second element-wise function is used to operate on the second activation map and the second gradient map to generate the second saliency map; as well as The first saliency map and the second saliency map are processed using a third element-wise function to generate a first composite saliency map.

6. The method of claim 5, wherein the element-wise function of the first saliency map and the second saliency map comprises element-wise summation.

7. The method according to claim 1, further comprising: Based at least on determining the first similarity, a third activation map for the at least one CNN layer is determined for the baseline image; Based at least on determining the first similarity, a third gradient map for the at least one CNN layer is determined for the baseline image; as well as The third activation map and the third gradient map are processed using the fourth element-wise function to generate the third saliency map.

8. A system for generating saliency maps for computer vision applications, the system comprising: processor; as well as A computer-readable medium storing instructions that, when executed by the processor, are operable for: Receive baseline and test images; A first similarity between the baseline image and the test image is determined using a convolutional neural network (CNN). Based at least on determining the first similarity, a first activation map for at least one CNN layer is determined for the test image; Based at least on determining the first similarity, a first gradient map for the at least one CNN layer is determined for the test image; as well as The first element-wise function is used to operate on the first activation map and the first gradient map to generate the first saliency map.

9. The system of claim 8, wherein the first element-wise function of the first activation graph and the first gradient graph comprises the Hadamard product.

10. The system of claim 8, wherein the instructions are also operable to: The region of interest (ROI) in the first saliency map is determined based at least on the pixel values ​​in the first saliency map. The test image is cropped to the region corresponding to the ROI in the first saliency map; The CNN is used to determine the thinning similarity between the baseline image and the cropped test image; as well as A thinning similarity score is output based at least on the thinning similarity between the baseline image and the cropped test image.

11. The system of claim 10, wherein the instructions are further configured to: The CNN is used to determine multiple similarity scores for multiple additional test images relative to the baseline image; and The test image and the plurality of additional test images are sorted based on the thinned similarity score for the cropped test image and the plurality of similarity scores for the plurality of additional test images.

12. The system of claim 8, wherein the instructions are also operable to: Based at least on determining the first similarity, a second activation map for the penultimate hidden CNN layer is determined for the test image; Based at least on determining the first similarity, a second gradient map for the penultimate hidden CNN layer is determined for the test image; The second element-wise function is used to operate on the second activation map and the second gradient map to generate the second saliency map; as well as The first saliency map and the second saliency map are processed using a third element-wise function to generate a first composite saliency map.

13. The system of claim 12, wherein the element-wise function of the first saliency map and the second saliency map comprises element-wise summation.

14. The system of claim 8, wherein the instructions are also operable to: Based at least on determining the first similarity, a third activation map for the at least one CNN layer is determined for the baseline image; Based at least on determining the first similarity, a third gradient map for the at least one CNN layer is determined for the baseline image; and The third activation map and the third gradient map are processed using the fourth element-wise function to generate the third saliency map.

15. One or more computer storage devices storing computer-executable instructions, which, when executed by a computer, cause the computer to perform operations, said operations including: Receive baseline and test images; A first similarity between the baseline image and the test image is determined using a convolutional neural network (CNN). Based at least on determining the first similarity, a first activation map for at least one CNN layer is determined for the test image; Based at least on determining the first similarity, a first gradient map for the at least one CNN layer is determined for the test image; as well as The first element-wise function is used to operate on the first activation map and the first gradient map to generate the first saliency map.

16. The computer storage device of claim 15, wherein the first element-wise function of the first activation map and the first gradient map comprises the Hadamard product.

17. The computer storage device of claim 15, wherein the operation further comprises: The region of interest (ROI) in the first saliency map is determined based at least on the pixel values ​​in the first saliency map. The test image is cropped to the region corresponding to the ROI in the first saliency map; The CNN is used to determine the thinning similarity between the baseline image and the cropped test image; as well as A thinning similarity score is output based at least on the thinning similarity between the baseline image and the cropped test image.

18. One or more computer storage devices according to claim 17, wherein the operation further comprises: The CNN is used to determine multiple similarity scores for multiple additional test images relative to the baseline image; as well as The test image and the plurality of additional test images are sorted based on the thinned similarity score for the cropped test image and the plurality of similarity scores for the plurality of additional test images.

19. The computer storage device of claim 15, wherein the operation further comprises: Based at least on determining the first similarity, a second activation map for the penultimate hidden CNN layer is determined for the test image; Based at least on determining the first similarity, a second gradient map for the penultimate hidden CNN layer is determined for the test image; The second element-wise function is used to operate on the second activation map and the second gradient map to generate the second saliency map; as well as The first saliency map and the second saliency map are processed using a third element-wise function to generate a first composite saliency map.

20. One or more computer storage devices according to claim 19, wherein the element-wise function of the first saliency map and the second saliency map comprises element-wise summation.

Citation Information

Patent Citations

  • Saliency detection method and device

    CN109741293A

  • Collaborative activation for deep learning field

    CN110574041A