# US 2024/0203097 A1 · Method and apparatus for training image processing model, and image classifying 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 2024/0203097 A1
- Document ID: US20240203097A1
- Status: Published application
- Kind: A1
- Application number: 18/565,030
- Filed: 2022-09-20
- Published: 2024-06-20
- Earliest claimed: 2021-12-29
- Assignees: Boe Technology Group Co., Ltd.
- Applicants: BOE Technology Group Co., Ltd.
- Inventors: Tong LIU; Zeyu SHANGGUAN
- Web page: https://patentgrep.com/patent/US20240203097A1

## CPC

- G06V 10/764: using classification, e.g. of video objects
- G06F 18/00: Pattern recognition
- G06N 3/04: Architecture, e.g. interconnection topology
- G06N 3/08: Learning methods
- G06T 7/11: Region-based segmentation
- G06V 10/44: Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
- G06V 10/74: Image or video pattern matching; Proximity measures in feature spaces
- G06V 10/762: using clustering, e.g. of similar faces in social networks
- G06V 10/774: Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
- G06V 10/82: using neural networks
- G06T 2207/20081: Training; Learning
- G06T 2207/20084: Artificial neural networks [ANN]
- G06T 2207/20132: Image cropping
- 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
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

Disclosed is a method for training an image processing model. The method includes acquiring a plurality of original image sets; cropping the plurality of original images in the plurality of original image sets to acquire a training sample set, wherein each of the training samples represents one original image, or a subimage acquired by cropping one original image; determining a plurality of positive sample pairs and a plurality of negative sample pairs from the training sample set, wherein each of the positive sample pairs comprises two training samples acquired based on different said original images in the same original image set, and each of the negative sample pairs comprises two training samples acquired based on the original images in different said original image sets; and training the image processing model based on the plurality of positive sample pairs and the plurality of negative sample pairs.

## Claims

### Claim 1

A method for training an image processing model, comprising:
acquiring a plurality of original image sets, wherein each of the original image sets comprises a plurality of original images of a same category, and categories of the original images comprised in different original image sets are different;
acquiring a training sample set by cropping the plurality of original images in the plurality of original image sets, wherein the training sample set comprises a plurality of training samples, and each of the training samples represents one original image, or a subimage acquired by cropping the original image;
determining a plurality of positive sample pairs and a plurality of negative sample pairs from the training sample set, wherein each of the positive sample pairs comprises two training samples acquired based on different original images in the same original image set, and each of the negative sample pairs comprises two training samples acquired based on the original images in different original image sets; and
training the image processing model based on the plurality of positive sample pairs and the plurality of negative sample pairs.

### Claim 2 (depends on 1)

The method for training an image processing model according to claim 1, wherein cropping the plurality of original image samples in the plurality of original image sets comprises:
generating a cropping size within a target size range randomly for each original image to be cropped in the plurality of original image sets;
determining a reference point of a cropping area based on a size of the original image and the cropping size; and
determining the cropping area in the original image based on the cropping size and the reference point, and cropping the cropping area.

### Claim 3 (depends on 2)

The method for training an image processing model according to claim 2, wherein the target size range comprises a width range and a height range, and the cropping size comprises a width within the width range and a height within the height range; and
the cropping area is a rectangular area, and the reference point of the cropping area is a vertex of the rectangular area or a central point of the rectangular area.

### Claim 4 (depends on 1)

The method for training an image processing model according to claim 1, wherein determining the plurality of positive sample pairs from the training sample set comprises:
determining a plurality of candidate sample pairs from the training sample set, wherein each of the candidate sample pairs comprises two training samples acquired based on different original images in the same original image set;
determining a similarity of each candidate sample pair; and
determining the candidate sample pair with the similarity greater than a similarity threshold as the positive sample pair.

### Claim 5 (depends on 4)

The method for training an image processing model according to claim 4, wherein determining the similarity of each candidate sample pair comprises:
for each of the candidate sample pairs, extracting a feature vector of each training sample in the candidate sample pair based on a convolutional neural network; and
acquiring the similarity of the candidate sample pair by processing feature vectors of two training samples in the candidate sample pair based on a similarity measurement algorithm.

### Claim 6 (depends on 1)

The method for training an image processing model according to claim 1, wherein determining the plurality of negative sample pairs from the training sample sets comprises:
determining a plurality of negative sample pairs from the training sample set, wherein a number of the negative sample pairs is equal to a number of the plurality of positive sample pairs.

### Claim 7 (depends on 1)

The method for training an image processing model according to claim 1, wherein training the image processing model based on the plurality of positive sample pairs and the plurality of negative sample pairs comprises:
marking a ground truth of each of the positive sample pairs as 1 and a ground truth of each of the negative sample pairs as 0; and
training the image processing model based on the plurality of marked positive sample pairs and the plurality of marked negative sample pairs.

### Claim 8 (depends on 1)

An image classifying method, comprising:
acquiring a to-be-classified target image; and
inputting the target image into an image classifying model to acquire a category of the target image outputted by the image classifying model,
wherein the image classifying model is acquired by training based on the method for training an image processing model as defined in claim 1.

### Claim 9 (depends on 8)

The image classifying method according to claim 8, wherein inputting the target image into the image classifying model to acquire the category of the target image outputted by the image classifying model comprises:
inputting the target image into the image classifying model to acquire a similarity between the target image and reference images of different categories outputted by the image classifying model; and
determining a category of a reference image having a highest similarity with respect to the target image in the reference images of different categories as the category of the target image.

### Claim 10 (depends on 8)

The image classifying method according to claim 8, wherein inputting the target image into the image classifying model to acquire the category of the target image outputted by the image classifying model comprises:
inputting the target image into the image classifying model to acquire a similarity between the target image and image features of different categories outputted by the image classifying model; and
determining a category of an image feature having a highest similarity with respect to the target image in the image features of different categories as the category of the target image,
wherein the image features of each category are acquired by performing feature extraction on a plurality of training samples of the category.

### Claim at position 11

11-12. (canceled)

### Claim 13

An image processing device, comprising a processor and a memory storing one or more instructions thereon, wherein the one or more instructions are loaded and executed by the processor to implement:
acquiring a plurality of original image sets, wherein each of the original image sets comprises a plurality of original images of a same category, and categories of the original images comprised in different original image sets are different;
acquiring a training sample set by cropping the plurality of original images in the plurality of original image sets, wherein the training sample set comprises a plurality of training samples, and each of the training samples represents one original image, or a subimage acquired by cropping the original image;
determining a plurality of positive sample pairs and a plurality of negative sample pairs from the training sample set, wherein each of the positive sample pairs comprises two training samples acquired based on different original images in the same original image set, and each of the negative sample pairs comprises two training samples acquired based on the original images in different original image sets; and
training the image processing model based on the plurality of positive sample pairs and the plurality of negative sample pairs.

### Claim 14

A non-transitory computer-readable storage medium storing one or more instructions thereon, wherein the one or more instructions are loaded and executed by a processor to implement:
acquiring a plurality of original image sets, wherein each of the original image sets comprises a plurality of original images of a same category, and categories of the original images comprised in different original image sets are different;
acquiring a training sample set by cropping the plurality of original images in the plurality of original image sets, wherein the training sample set comprises a plurality of training samples, and each of the training samples represents one original image, or a subimage acquired by cropping the original image;
determining a plurality of positive sample pairs and a plurality of negative sample pairs from the training sample set, wherein each of the positive sample pairs comprises two training samples acquired based on different original images in the same original image set, and each of the negative sample pairs comprises two training samples acquired based on the original images in different original image sets; and
training the image processing model based on the plurality of positive sample pairs and the plurality of negative sample pairs.

### Claim 15 (depends on 13)

The image processing device according to claim 13, wherein the one or more instructions are loaded and executed by the processor to implement:
generating a cropping size within a target size range randomly for each original image to be cropped in the plurality of original image sets;
determining a reference point of a cropping area based on a size of the original image and the cropping size; and
determining the cropping area in the original image based on the cropping size and the reference point, and cropping the cropping area.

### Claim 16 (depends on 15)

The image processing device according to claim 15, wherein the target size range comprises a width range and a height range, and the cropping size comprises a width within the width range and a height within the height range; and
the cropping area is a rectangular area, and the reference point of the cropping area is a vertex of the rectangular area or a central point of the rectangular area.

### Claim 17 (depends on 13)

The image processing device according to claim 13, wherein the one or more instructions are loaded and executed by the processor to implement:
determining a plurality of candidate sample pairs from the training sample set, wherein each of the candidate sample pairs comprises two training samples acquired based on different original images in the same original image set;
determining a similarity of each candidate sample pair; and
determining the candidate sample pair with the similarity greater than a similarity threshold as the positive sample pair.

### Claim 18 (depends on 17)

The image processing device according to claim 17, wherein the one or more instructions are loaded and executed by the processor to implement:
for each of the candidate sample pairs, extracting a feature vector of each training sample in the candidate sample pair based on a convolutional neural network; and
acquiring the similarity of the candidate sample pair by processing feature vectors of two training samples in the candidate sample pair based on a similarity measurement algorithm.

### Claim 19 (depends on 13)

The image processing device according to claim 13, wherein the one or more instructions are loaded and executed by the processor to implement:
determining a plurality of negative sample pairs from the training sample set, wherein a number of the negative sample pairs is equal to a number of the plurality of positive sample pairs.

### Claim 20 (depends on 13)

The image processing device according to claim 13, wherein the one or more instructions are loaded and executed by the processor to implement:
marking a ground truth of each of the positive sample pairs as 1 and a ground truth of each of the negative sample pairs as 0; and
training the image processing model based on the plurality of marked positive sample pairs and the plurality of marked negative sample pairs.

### Claim 21 (depends on 8)

An image processing device, comprising a processor and a memory storing one or more instructions thereon, wherein the one or more instructions are loaded and executed by the processor to implement the image classifying method as defined in claim 8.

### Claim 22 (depends on 8)

A non-transitory computer-readable storage medium storing one or more instructions thereon, wherein the one or more instructions are loaded and executed by a processor to implement the image classifying method as defined in claim 8.
