# US 2022/0292131 A1 · Method, apparatus and system for retrieving image

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

- Number: US 2022/0292131 A1
- Document ID: US20220292131A1
- Status: Published application
- Kind: A1
- Application number: 17/826,760
- Filed: 2022-05-27
- Published: 2022-09-15
- Earliest claimed: 2021-08-17
- Applicants: Beijing Baidu Netcom Science Technology Co., Ltd.
- Inventors: Ruibin BAI; Xiang WEI; Yipeng SUN; Kun YAO; Jingtuo LIU; Junyu HAN
- Web page: https://patentgrep.com/patent/US20220292131A1

## CPC

- G06F 16/583: using metadata automatically derived from the content
- G06V 10/40: Extraction of image or video features
- G06F 16/535: Filtering based on additional data, e.g. user or group profiles
- G06V 10/443: {by matching or filtering}
- G06V 10/74: Image or video pattern matching; Proximity measures in feature spaces
- G06V 10/82: using neural networks
- G06V 40/10: Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING

## Abstract

A method, apparatus and system for retrieving an image is provided, the method comprises: detecting, in response to receiving a query request comprising a target image, a target subject from the target image; extracting a subject feature from the target subject if a confidence level of a detection box of the detected target subject is greater than a first threshold, the subject feature comprising an identical feature, a similar feature and a category; performing matching on the subject feature of the target image and a subject feature of a candidate image pre-stored in a database, to obtain a similarity score and an identicalness score of the candidate image; and selecting, according to the similarity score and the identicalness score, a predetermined number of candidate images as a search result for output.

## Claims

### Claim 1

A method for retrieving an image, comprising:
detecting, in response to receiving a query request comprising a target image, a target subject from the target image;
extracting a subject feature from the target subject if a confidence level of a detection box of the detected target subject is greater than a first threshold, the subject feature comprising an identical feature, a similar feature and a category;
performing matching on the subject feature of the target image and a subject feature of a candidate image pre-stored in a database, to obtain a similarity score and an identicalness score of the candidate image; and
selecting, according to the similarity score and the identicalness score, a predetermined number of candidate images as a search result for output.

### Claim 2 (depends on 1)

The method according to claim 1, further comprising:
extracting, if the target subject is not detected or the confidence level of the detection box of the detected target subject is less than or equal to the first threshold, a complete image feature from the target image, the complete image feature comprising an identical feature, a similar feature, a category and a pairing feature;
performing matching on the complete image feature of the target image and a complete image feature of the candidate image pre-stored in the database, to obtain a similarity score, an identicalness score and a pairing score of the candidate image; and
selecting, according to the similarity score, the identicalness score and the pairing score, the predetermined number of candidate images as the search result for output.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the extracting a subject feature from the target subject comprises:
extracting the similar feature from the target subject through a similar feature model;
extracting an identical feature of a partial image from the target subject through an identical feature model; and
extracting the category from the target subject through a classification model.

### Claim 4 (depends on 1)

The method according to claim 1, further comprising:
filtering out a detection box having a detection box size less than a size threshold or having a confidence level less then a second threshold.

### Claim 5 (depends on 4)

The method according to claim 4, further comprising:
determining, if a number of detection boxes is greater than 1, a unique target subject according to a position and an area of a detection box of each target subject and the similarity score and the identicalness score of the candidate image.

### Claim 6 (depends on 1)

The method according to claim 1, wherein the selecting, according to the similarity score and the identicalness score, a predetermined number of candidate images as a search result for output comprises:
calculating degrees of matching of the candidate images according to similarity scores and identicalness scores of the candidate images; and
selecting, if a first candidate image with a highest degree of matching does not meet a filtering condition, the predetermined number of candidate images in a descending order of the degrees of matching as the search result for output.

### Claim 7 (depends on 6)

The method according to claim 6, wherein the filtering condition comprises at least one of:
an identicalness score of the first candidate image being less than a first identicalness threshold, and a similarity score of the first candidate image being less than a first similarity threshold;
the identicalness score of the first candidate image being less than a second identicalness threshold, the similarity score of the first candidate image being less than a second similarity threshold, and both a coarse-grained category of the target subject and a coarse-grained category of the first candidate image belonging to a predetermined coarse-grained category;
the identicalness score of the first candidate image being less than a third identicalness threshold, the similarity score of the first candidate image being less than a third similarity threshold, and a difference between a fine-grained category of the target subject and a fine-grained category of the first candidate image being greater than a predetermined difference threshold;
the identicalness score of the first candidate image being less than a fourth identicalness threshold, the similarity score of the first candidate image being less than a fourth similarity threshold, and both a frequency at which the fine-grained category of the target subject belongs to a predetermined fine-grained category and a frequency at which the fine-grained category of the first candidate image belongs to the predetermined fine-grained category being greater than a predetermined frequency threshold; or
if the first candidate image is derived from an e-commerce business, the identicalness score of the first candidate image being less than a fifth identicalness threshold, the similarity score of the first candidate image being less than a fifth similarity threshold, and the fine-grained category of the target subject belonging to a predetermined item category.

### Claim 8

A system for retrieving an image, comprising:
a unified access layer, configured to receive a query request comprising a target image, hand over the query request to an advanced search layer for processing, and output a search result returned by the advanced search layer;
the advanced search layer, configured to extract a feature of the target image, hand over the feature to a basic search layer for processing, and return a search result obtained by combining candidate images received from the basic search layer to the unified access layer; and
the basic search layer, comprising at least one shard, each of which is configured to find a matching candidate image in a database stored in a local disk according to the feature provided by the advanced search layer, and return a predetermined number of candidate images with a highest similarity score and a highest identicalness score.

### Claim 9

An electronic device, comprising:
at least one processor; and
a storage device storing instructions executable by the at least one processor, the instructions, when executed by the at least one processor, cause the at least one processor to perform operations for retrieving an image, the operations comprising:
detecting, in response to receiving a query request comprising a target image, a target subject from the target image;
extracting a subject feature from the target subject if a confidence level of a detection box of the detected target subject is greater than a first threshold, the subject feature comprising an identical feature, a similar feature and a category;
performing matching on the subject feature of the target image and a subject feature of a candidate image pre-stored in a database, to obtain a similarity score and an identicalness score of the candidate image; and
selecting, according to the similarity score and the identicalness score, a predetermined number of candidate images as a search result for output.

### Claim 10 (depends on 9)

The device according to claim 9, the operations further comprising:
extracting, if the target subject is not detected or the confidence level of the detection box of the detected target subject is less than or equal to the first threshold, a complete image feature from the target image, the complete image feature comprising an identical feature, a similar feature, a category and a pairing feature;
performing matching on the complete image feature of the target image and a complete image feature of the candidate image pre-stored in the database, to obtain a similarity score, an identicalness score and a pairing score of the candidate image; and
selecting, according to the similarity score, the identicalness score and the pairing score, the predetermined number of candidate images as the search result for output.

### Claim 11 (depends on 9)

The device according to claim 9, wherein the extracting a subject feature from the target subject comprises:
extracting the similar feature from the target subject through a similar feature model;
extracting an identical feature of a partial image from the target subject through an identical feature model; and
extracting the category from the target subject through a classification model.

### Claim 12 (depends on 9)

The device according to claim 9, the operations further comprising:
filtering out a detection box having a detection box size less than a size threshold or having a confidence level less then a second threshold.

### Claim 13 (depends on 12)

The device according to claim 12, the operations further comprising:
determining, if a number of detection boxes is greater than 1, a unique target subject according to a position and an area of a detection box of each target subject and the similarity score and the identicalness score of the candidate image.

### Claim 14 (depends on 9)

The device according to claim 9, wherein the selecting, according to the similarity score and the identicalness score, a predetermined number of candidate images as a search result for output comprises:
calculating degrees of matching of the candidate images according to similarity scores and identicalness scores of the candidate images; and
selecting, if a first candidate image with a highest degree of matching does not meet a filtering condition, the predetermined number of candidate images in a descending order of the degrees of matching as the search result for output.

### Claim 15 (depends on 14)

The device according to claim 14, wherein the filtering condition comprises at least one of:
an identicalness score of the first candidate image being less than a first identicalness threshold, and a similarity score of the first candidate image being less than a first similarity threshold;
the identicalness score of the first candidate image being less than a second identicalness threshold, the similarity score of the first candidate image being less than a second similarity threshold, and both a coarse-grained category of the target subject and a coarse-grained category of the first candidate image belonging to a predetermined coarse-grained category;
the identicalness score of the first candidate image being less than a third identicalness threshold, the similarity score of the first candidate image being less than a third similarity threshold, and a difference between a fine-grained category of the target subject and a fine-grained category of the first candidate image being greater than a predetermined difference threshold;
the identicalness score of the first candidate image being less than a fourth identicalness threshold, the similarity score of the first candidate image being less than a fourth similarity threshold, and both a frequency at which the fine-grained category of the target subject belongs to a predetermined fine-grained category and a frequency at which the fine-grained category of the first candidate image belongs to the predetermined fine-grained category being greater than a predetermined frequency threshold; or
if the first candidate image is derived from an e-commerce business, the identicalness score of the first candidate image being less than a fifth identicalness threshold, the similarity score of the first candidate image being less than a fifth similarity threshold, and the fine-grained category of the target subject belonging to a predetermined item category.
