# US 2025/0157193 A1 · Feature extraction model generating method, image feature extracting method and apparatus

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

- Number: US 2025/0157193 A1
- Document ID: US20250157193A1
- Status: Published application
- Kind: A1
- Application number: 18/833,352
- Filed: 2023-01-09
- Published: 2025-05-15
- Earliest claimed: 2022-01-26
- Assignees: Beijing Zitiao Network Technology Co., Ltd.
- Applicants: Beijing Zitiao Network Technology Co., Ltd.
- Inventors: Jiawen LI; Yuanfan GUO
- Web page: https://patentgrep.com/patent/US20250157193A1

## CPC

- G06V 10/7715: {Feature extraction, e.g. by transforming the feature space, e.g. multi-dimensional scaling [MDS]; Mappings, e.g. subspace methods}
- G06F 18/231: Hierarchical techniques, i.e. dividing or merging pattern sets so as to obtain a dendrogram
- G06V 10/761: {Proximity, similarity or dissimilarity measures}
- G06V 10/7625: {Hierarchical techniques, i.e. dividing or merging patterns to obtain a tree-like representation; Dendograms}
- G06V 10/774: Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The disclosure relates to a method for generating a feature extraction model, and a method and apparatus for image feature extraction, the method comprising: obtaining a plurality of candidate images; determining a clustering tree corresponding to the plurality of candidate images based on a feature extraction model and the plurality of candidate images, wherein the clustering tree comprises clusters at a plurality of layers; generating a target sample pair based on the plurality of candidate images and the clustering tree, wherein the target sample pair comprises an image sample pair and a feature sample pair, the image sample pair is formed based on two different candidate images, and the feature sample pair is formed based on features of the candidate image and features of a cluster center of the clustering; and training the feature extraction model based on the target sample pair.

## Claims

### Claim at position 1

1-12. (canceled)

### Claim 13

A method of feature extraction model generation, comprising:
obtaining a plurality of candidate images;
determining a clustering tree corresponding to the plurality of candidate images based on a feature extraction model and the plurality of candidate images, wherein the clustering tree comprises clusters at a plurality of layers;
generating a target sample pair based on the plurality of candidate images and the clustering tree, wherein the target sample pair comprises an image sample pair and a feature sample pair, the image sample pair is formed based on two different candidate images, and the feature sample pair is formed based on features of the candidate images and features of cluster centers of the clusters; and
training the feature extraction model based on the target sample pair.

### Claim 14 (depends on 13)

The method according to claim 13, wherein the generating a target sample pair based on the plurality of candidate images and the clustering tree comprises:
generating a sample image set and a candidate contrast image set based on the candidate images, wherein images in the candidate contrast image set are different from images in the sample image set, and the number of images corresponding to the candidate contrast image set is greater than the number of images corresponding to the sample image set;
determining, for each sample image in the sample image set, a contrast sample set for the sample image at each layer based on candidate contrast images in the candidate contrast image set and a cluster center of the cluster at each layer in the clustering tree, a contrast sample in the contrast sample set comprising features of a target contrast cluster center and a target contrast image; and
generating, for each sample image in the sample image set, a negative sample pair corresponding to the sample image at each layer based on the sample image and the contrast sample set for the sample image at each layer, and determining the negative sample pair as the target sample pair.

### Claim 15 (depends on 14)

The method according to claim 14, wherein determining a contrast sample set for the sample image at each layer based on candidate contrast images in the candidate contrast image set and a cluster center of the cluster at each layer in the clustering tree comprises:
determining a hierarchical cluster center to which the sample image belongs at each layer in the clustering tree;
determining, for each layer in the clustering tree, the target contrast image corresponding to the sample image at the layer based on the hierarchical cluster center to which the sample image belongs at the layer and candidate contrast images in the candidate contrast image set; and
determining, for each layer in the clustering tree, the target contrast cluster center corresponding to the sample image at the layer based on the hierarchical cluster center to which the sample image belongs at the layer and each cluster center in the clustering tree.

### Claim 16 (depends on 15)

The method according to claim 15, wherein the determining, for each layer in the clustering tree, the target contrast image corresponding to the sample image at the layer based on the hierarchical cluster center to which the sample image belongs at the layer and candidate contrast images in the candidate contrast image set comprises:
determining, for each layer in the clustering tree, an image similarity between the hierarchical cluster center of the sample image at the layer and each candidate contrast image in the candidate contrast image set; and
performing random sampling based on the image similarity, and in response to that a result of the random sampling is rejection, determining the candidate contrast image as the target contrast image of the sample image at the layer.

### Claim 17 (depends on 15)

The method according to claim 15, wherein the determining, for each layer in the clustering tree, the target contrast cluster center corresponding to the sample image at the layer based on the hierarchical cluster center to which the sample image belongs at the layer and each cluster center in the clustering tree comprises:
determining, for each layer in the clustering tree except the highest layer, a feature similarity between a parent cluster center corresponding to the hierarchical cluster center of the sample image at the layer and a candidate cluster center at the layer except the hierarchical cluster center; and
performing random sampling based on the feature similarity, and in response to that a result of the random sampling is rejection, determining the candidate cluster center as the target contrast cluster center corresponding to the sample image at the layer.

### Claim 18 (depends on 14)

The method according to claim 14, wherein the generating a target sample pair based on the plurality of candidate images and the clustering tree further comprises:
generating, for each sample image in the sample image set, a positive sample pair corresponding to the sample image based on a transformed image corresponding to the sample image and the hierarchical cluster center to which the sample image belongs at each layer of the clustering tree.

### Claim 19 (depends on 13)

The method according to claim 13, wherein the training the feature extraction model based on the target sample pair comprises:
determining a target loss for the feature extraction model based on the target sample pair and a sample label of the target sample pair;
in response to that an iteration ending condition is not met, obtaining an updated feature extraction model by updating parameters of the feature extraction model based on the target loss;
determining a clustering tree corresponding to the plurality of candidate images based on the updated feature extraction model and the plurality of candidate images; and
generating a new target sample pair based on the plurality of candidate images and the newly determined clustering tree, so as to train the feature extraction model based on the new target sample pair until the iteration ending condition is met to obtain a trained feature extraction model, wherein the iteration ending condition is that the target loss is less than or equal to a loss threshold, or the number of iterations of the feature extraction model is greater than a number threshold.

### Claim 20

A non-transitory computer-readable medium, storing a computer program thereon, wherein the program, when executed by a processing device, implements a method of feature extraction model generation, the method comprising:
obtaining a plurality of candidate images;
determining a clustering tree corresponding to the plurality of candidate images based on a feature extraction model and the plurality of candidate images, wherein the clustering tree comprises clusters at a plurality of layers;
generating a target sample pair based on the plurality of candidate images and the clustering tree, wherein the target sample pair comprises an image sample pair and a feature sample pair, the image sample pair is formed based on two different candidate images, and the feature sample pair is formed based on features of the candidate images and features of cluster centers of the clusters; and
training the feature extraction model based on the target sample pair.

### Claim 21 (depends on 20)

The medium according to claim 20, wherein the generating a target sample pair based on the plurality of candidate images and the clustering tree comprises:
generating a sample image set and a candidate contrast image set based on the candidate images, wherein images in the candidate contrast image set are different from images in the sample image set, and the number of images corresponding to the candidate contrast image set is greater than the number of images corresponding to the sample image set;
determining, for each sample image in the sample image set, a contrast sample set for the sample image at each layer based on candidate contrast images in the candidate contrast image set and a cluster center of the cluster at each layer in the clustering tree, a contrast sample in the contrast sample set comprising features of a target contrast cluster center and a target contrast image; and
generating, for each sample image in the sample image set, a negative sample pair corresponding to the sample image at each layer based on the sample image and the contrast sample set for the sample image at each layer, and determining the negative sample pair as the target sample pair.

### Claim 22 (depends on 21)

The medium according to claim 21, wherein determining a contrast sample set for the sample image at each layer based on candidate contrast images in the candidate contrast image set and a cluster center of the cluster at each layer in the clustering tree comprises:
determining a hierarchical cluster center to which the sample image belongs at each layer in the clustering tree;
determining, for each layer in the clustering tree, the target contrast image corresponding to the sample image at the layer based on the hierarchical cluster center to which the sample image belongs at the layer and candidate contrast images in the candidate contrast image set; and
determining, for each layer in the clustering tree, the target contrast cluster center corresponding to the sample image at the layer based on the hierarchical cluster center to which the sample image belongs at the layer and each cluster center in the clustering tree.

### Claim 23 (depends on 22)

The medium according to claim 22, wherein the determining, for each layer in the clustering tree, the target contrast image corresponding to the sample image at the layer based on the hierarchical cluster center to which the sample image belongs at the layer and candidate contrast images in the candidate contrast image set comprises:
determining, for each layer in the clustering tree, an image similarity between the hierarchical cluster center of the sample image at the layer and each candidate contrast image in the candidate contrast image set; and
performing random sampling based on the image similarity, and in response to that a result of the random sampling is rejection, determining the candidate contrast image as the target contrast image of the sample image at the layer.

### Claim 24 (depends on 22)

The medium according to claim 22, wherein the determining, for each layer in the clustering tree, the target contrast cluster center corresponding to the sample image at the layer based on the hierarchical cluster center to which the sample image belongs at the layer and each cluster center in the clustering tree comprises:
determining, for each layer in the clustering tree except the highest layer, a feature similarity between a parent cluster center corresponding to the hierarchical cluster center of the sample image at the layer and a candidate cluster center at the layer except the hierarchical cluster center; and
performing random sampling based on the feature similarity, and in response to that a result of the random sampling is rejection, determining the candidate cluster center as the target contrast cluster center corresponding to the sample image at the layer.

### Claim 25 (depends on 21)

The medium according to claim 21, wherein the generating a target sample pair based on the plurality of candidate images and the clustering tree further comprises:
generating, for each sample image in the sample image set, a positive sample pair corresponding to the sample image based on a transformed image corresponding to the sample image and the hierarchical cluster center to which the sample image belongs at each layer of the clustering tree.

### Claim 26 (depends on 20)

The medium according to claim 20, wherein the training the feature extraction model based on the target sample pair comprises:
determining a target loss for the feature extraction model based on the target sample pair and a sample label of the target sample pair;
in response to that an iteration ending condition is not met, obtaining an updated feature extraction model by updating parameters of the feature extraction model based on the target loss;
determining a clustering tree corresponding to the plurality of candidate images based on the updated feature extraction model and the plurality of candidate images; and
generating a new target sample pair based on the plurality of candidate images and the newly determined clustering tree, so as to train the feature extraction model based on the new target sample pair until the iteration ending condition is met to obtain a trained feature extraction model, wherein the iteration ending condition is that the target loss is less than or equal to a loss threshold, or the number of iterations of the feature extraction model is greater than a number threshold.

### Claim 27

An electronic device, comprising:
a storage device, storing at least one computer program thereon;
at least one processing device, for executing the at least one computer program in the storage device to implement a method of feature extraction model generation, comprising:
obtaining a plurality of candidate images;
determining a clustering tree corresponding to the plurality of candidate images based on a feature extraction model and the plurality of candidate images, wherein the clustering tree comprises clusters at a plurality of layers;
generating a target sample pair based on the plurality of candidate images and the clustering tree, wherein the target sample pair comprises an image sample pair and a feature sample pair, the image sample pair is formed based on two different candidate images, and the feature sample pair is formed based on features of the candidate images and features of cluster centers of the clusters; and
training the feature extraction model based on the target sample pair.

### Claim 28 (depends on 27)

The device according to claim 27, wherein the generating a target sample pair based on the plurality of candidate images and the clustering tree comprises:
generating a sample image set and a candidate contrast image set based on the candidate images, wherein images in the candidate contrast image set are different from images in the sample image set, and the number of images corresponding to the candidate contrast image set is greater than the number of images corresponding to the sample image set;
determining, for each sample image in the sample image set, a contrast sample set for the sample image at each layer based on candidate contrast images in the candidate contrast image set and a cluster center of the cluster at each layer in the clustering tree, a contrast sample in the contrast sample set comprising features of a target contrast cluster center and a target contrast image; and
generating, for each sample image in the sample image set, a negative sample pair corresponding to the sample image at each layer based on the sample image and the contrast sample set for the sample image at each layer, and determining the negative sample pair as the target sample pair.

### Claim 29 (depends on 28)

The device according to claim 28, wherein determining a contrast sample set for the sample image at each layer based on candidate contrast images in the candidate contrast image set and a cluster center of the cluster at each layer in the clustering tree comprises:
determining a hierarchical cluster center to which the sample image belongs at each layer in the clustering tree;
determining, for each layer in the clustering tree, the target contrast image corresponding to the sample image at the layer based on the hierarchical cluster center to which the sample image belongs at the layer and candidate contrast images in the candidate contrast image set; and
determining, for each layer in the clustering tree, the target contrast cluster center corresponding to the sample image at the layer based on the hierarchical cluster center to which the sample image belongs at the layer and each cluster center in the clustering tree.

### Claim 30 (depends on 29)

The device according to claim 29, wherein the determining, for each layer in the clustering tree, the target contrast image corresponding to the sample image at the layer based on the hierarchical cluster center to which the sample image belongs at the layer and candidate contrast images in the candidate contrast image set comprises:
determining, for each layer in the clustering tree, an image similarity between the hierarchical cluster center of the sample image at the layer and each candidate contrast image in the candidate contrast image set; and
performing random sampling based on the image similarity, and in response to that a result of the random sampling is rejection, determining the candidate contrast image as the target contrast image of the sample image at the layer.

### Claim 31 (depends on 29)

The device according to claim 29, wherein the determining, for each layer in the clustering tree, the target contrast cluster center corresponding to the sample image at the layer based on the hierarchical cluster center to which the sample image belongs at the layer and each cluster center in the clustering tree comprises:
determining, for each layer in the clustering tree except the highest layer, a feature similarity between a parent cluster center corresponding to the hierarchical cluster center of the sample image at the layer and a candidate cluster center at the layer except the hierarchical cluster center; and
performing random sampling based on the feature similarity, and in response to that a result of the random sampling is rejection, determining the candidate cluster center as the target contrast cluster center corresponding to the sample image at the layer.

### Claim 32 (depends on 28)

The device according to claim 28, wherein the generating a target sample pair based on the plurality of candidate images and the clustering tree further comprises:
generating, for each sample image in the sample image set, a positive sample pair corresponding to the sample image based on a transformed image corresponding to the sample image and the hierarchical cluster center to which the sample image belongs at each layer of the clustering tree.
