# US 2022/0292132 A1 · METHOD AND DEVICE FOR RETRIEVING IMAGE (As Amended)

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2022/0292132 A1
- Document ID: US20220292132A1
- Status: Published application
- Kind: A1
- Application number: 17/628,391
- Filed: 2020-03-19
- Published: 2022-09-15
- Earliest claimed: 2019-07-23
- Assignees: Beijing Jingdong Zhenshi Information Technology Co., Ltd.
- Applicants: Beijing Jingdong Zhenshi Information Technology Co., Ltd.
- Inventors: Zhongqiang Guo
- Web page: https://patentgrep.com/patent/US20220292132A1

## CPC

- G06V 10/82: using neural networks
- G06F 16/535: Filtering based on additional data, e.g. user or group profiles
- G06F 16/56: having vectorial format
- G06F 16/583: using metadata automatically derived from the content
- G06F 16/5866: {using information manually generated, e.g. tags, keywords, comments, manually generated location and time information}
- G06F 16/7335: {Graphical querying, e.g. query-by-region, query-by-sketch, query-by-trajectory, GUIs for designating a person/face/object as a query predicate (end-user interface involving hot spots associated with the video H04N21/4725; end-user interface for selecting a Region of Interest H04N21/4728)}
- G06N 3/04: Architecture, e.g. interconnection topology
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/08: Learning methods
- G06N 3/09: Supervised learning
- G06V 10/40: Extraction of image or video features
- G06V 10/761: {Proximity, similarity or dissimilarity measures}
- G06V 10/7715: {Feature extraction, e.g. by transforming the feature space, e.g. multi-dimensional scaling [MDS]; Mappings, e.g. subspace methods}
- Y02D 10/00: Energy efficient computing, e.g. low power processors, power management or thermal management
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- Y02D: CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE

## Abstract

A method for retrieving an image is provided. The method comprises: acquiring a first matrix obtained by performing feature extraction on a sketch of a target item; acquiring a second matrix composed of word vectors of keywords in a keyword set corresponding to the target item; acquiring a third matrix set obtained by performing feature extractions on images in an image set respectively; determining, for a third matrix in the third matrix set, a comprehensive matching degree between an item presented in an image corresponding to the third matrix and the target item, based on a first matching degree between the first matrix and the third matrix and a second matching degree between the second matrix and the third matrix; and selecting a preset number of images from the image set based on the determined comprehensive matching degrees, and sending the selected images.

## Claims

### Claim 1

A method for retrieving an image, the method comprising:
acquiring a first matrix obtained by performing feature extraction on a sketch of a target item;
acquiring a second matrix composed of word vectors of keywords in a keyword set corresponding to the target item, wherein the keywords in the keyword set are used to describe the target item;
acquiring a third matrix set obtained by performing feature extractions on images in an image set respectively;
determining, for a third matrix in the third matrix set, a comprehensive matching degree between an item presented in an image corresponding to the third matrix and the target item, based on a first matching degree between the first matrix and the third matrix and a second matching degree between the second matrix and the third matrix; and
selecting a preset number of images from the image set based on the determined comprehensive matching degrees, and sending the selected images.

### Claim 2 (depends on 1)

The method according to claim 1, wherein determining the comprehensive matching degree between the item presented in the image corresponding to the third matrix and the target item, based on the first matching degree between the first matrix and the third matrix and the second matching degree between the second matrix and the third matrix, comprises:
acquiring a first preset weight of the first matrix, and acquiring a second preset weight of the second matrix; and
determining, based on the acquired first preset weight and the second preset weight, the comprehensive matching degree between the item presented in the image corresponding to the third matrix and the target item according to a weighted sum of the first matching degree between the first matrix and the third matrix and the second matching degree between the second matrix and the third matrix.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the first matching degree between the first matrix and the third matrix, and the second matching degree between the second matrix and the third matrix are determined through steps as follows:
using the first matrix, the second matrix, and the third matrix as a target matrix respectively to perform encoding processing on each target matrix, so as to obtain a first encoding matrix, a second encoding matrix, and a third encoding matrix, wherein the encoding processing is used to map the target matrix into a binary encoding matrix; and
determining a matching degree between the first encoding matrix and the third encoding matrix as the first matching degree between the first matrix and the third matrix, and determining a matching degree between the second encoding matrix and the third encoding matrix as the second matching degree between the second matrix and the third matrix.

### Claim 4 (depends on 3)

The method according to claim 3, wherein the encoding processing comprises: for a row vector S in row vectors of the target matrix, performing following steps:
splitting elements comprised in S into C groups, wherein C represents the number of columns of the encoding matrix;
determining, for a group in the C groups, a statistical feature of values of elements comprised in the group; determining, in response to determining that the determined statistical feature is greater than a target threshold T, that an encoding value of the group is 1; and determining, in response to determining that the determined statistical feature is less than T, that the encoding value of the group is 0; and
forming a row of the encoding matrix by the encoding values corresponding to the groups in the C groups respectively, to obtain the encoding matrix.

### Claim 5 (depends on 4)

The method according to claim 4, wherein splitting elements comprised in S into C groups, comprises:
determining a quotient of the number of elements comprised in S and C, and determining the number of elements comprised in each group of the C groups based on the determined quotient.

### Claim 6 (depends on 4)

The method according to claim 4, wherein
T
=
⌈
D
/
C
⌉
×
∑
i
=
1
i
=
D
S
i
,
wherein D represents the number of elements comprised in S, and Si represents a value of the ith element in S.

### Claim 7 (depends on 3)

The method according to claim 3, wherein the encoding processing comprises:
performing following update processing respectively for each row vector of the target matrix, to obtain an updated target matrix: normalizing the row vector, and determining a corresponding update value of each element contained in the row vector based on normalization results of the row vector, wherein the corresponding update value of each element contained in the row vector is positively correlated with the normalization result corresponding to the element; and
performing following steps for a row vector S in row vectors of the updated target matrix:
splitting elements comprised in S into C groups, wherein C represents the number of columns of the encoding matrix;
determining, for a group in the C groups, a statistical feature of values of elements comprised in the group; determining, in response to determining that the determined statistical feature is greater than a target threshold T, that an encoding value of the group is 1; and determining, in response to determining that the determined statistical feature is less than T, that the encoding value of the group is 0; and
forming a row of the encoding matrix by the encoding values corresponding to the groups in the C groups respectively, to obtain the encoding matrix.

### Claim 8 (depends on 7)

The method according to claim 7, wherein determining the corresponding update value of each element contained in the row vector based on normalization results of the row vector, comprises:
determining the corresponding update value of each element contained in the row vector, based on the normalization results of the row vector and a preset adjustment parameter λ, wherein the corresponding update value of each element contained in the row vector is positively correlated with λ.

### Claim 9 (depends on 8)

The method according to claim 8, wherein determining the corresponding update value of each element contained in the row vector, based on the normalization results of the row vector and the preset adjustment parameter λ, comprises:
determining, for an element in elements contained in the row vector, a square root of a product of the normalization result corresponding to the element and λ as the update value corresponding to the element.

### Claim 10 (depends on 1)

The method according to claim 1, wherein the first matrix is obtained through steps as follows:
splitting the sketch into at least two sub-images;
performing feature extraction respectively on the at least two sub-images using a pre-trained convolutional neural network, to obtain feature vectors corresponding to the at least two sub-images respectively; and
determining a matrix composed of the feature vectors corresponding to the at least two sub-images respectively as the first matrix.

### Claim 11 (depends on 10)

The method according to claim 10, wherein the convolutional neural network is obtained by training through steps as follows:
acquiring a sketch set, and acquiring matching image sets corresponding to each sketch in the sketch set, wherein a sketch and a matching image in a corresponding matching image set are used to present the same item;
selecting a sketch from the sketch set, and performing training steps as follows: performing feature extractions on the selected sketch and images in a target image set respectively to obtain output matrices respectively corresponding to the sketch and the images in the target image set using an initial model; determining a matching degree between the obtained output matrix corresponding to the sketch and the output matrix corresponding to each image in the target image set, respectively, and selecting an image having a corresponding matching degree greater than a preset threshold; and determining a recall ratio and/or precision ratio corresponding to the selected image based on the selected image and a matching image set corresponding to an input sketch, and determining whether training of the initial model is completed based on the determined recall ratio and/or precision ratio;
determining, in response to determining that the training of the initial model is completed, the trained initial model as the convolutional neural network; and
adjusting, in response to determining that the training of the initial model is not completed, a parameter of the initial model based on the determined recall ratio and/or precision ratio, and determining an adjusted initial model as the initial model, reselecting a sketch from the sketch set, and continuing performing the training steps.

### Claim 12

An apparatus for retrieving an image, the apparatus comprising:
at least one processor; and
a memory storing instructions, wherein the instructions when executed by the at least one processor, cause the at least one processor to perform operations, the operations comprising:
acquiring a first matrix obtained by performing feature extraction on a sketch of a target item;
acquiring a second matrix composed of word vectors of keywords in a keyword set corresponding to the target item, wherein the keywords in the keyword set are used to describe the target item;
acquiring a third matrix set obtained by performing feature extractions on images in an image set respectively;
determining, for a third matrix in the third matrix set, a comprehensive matching degree between an item presented in an image corresponding to the third matrix and the target item, based on a first matching degree between the first matrix and the third matrix, and a second matching degree between the second matrix and the third matrix; and
selecting a preset number of images from the image set based on the determined comprehensive matching degrees, and sending the selected images.

### Claim 13

(canceled)

### Claim 14

A non-transitory computer-readable medium storing a computer program thereon, wherein the program, when executed by a processor, causes the processor to perform operations comprising:
acquiring a first matrix obtained by performing feature extraction on a sketch of a target item;
acquiring a second matrix composed of word vectors of keywords in a keyword set corresponding to the target item, wherein the keywords in the keyword set are used to describe the target item;
acquiring a third matrix set obtained by performing feature extractions on images in an image set respectively;
determining, for a third matrix in the third matrix set, a comprehensive matching degree between an item presented in an image corresponding to the third matrix and the target item, based on a first matching degree between the first matrix and the third matrix and a second matching degree between the second matrix and the third matrix; and
selecting a preset number of images from the image set based on the determined comprehensive matching degrees, and sending the selected images.
