IP Library Granted Patent US 11,238,315
Granted Patent B2
US 11,238,315 · App. 16/675,831 · Granted Feb 1, 2022

Image classification method, personalized recommendation method, computer device and storage medium

Inventors: Jiawei Gu (Shenzhen, CN); Lin Ma (Shenzhen, CN); Wei Liu (Shenzhen, CN)
Assignee: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
G06K9/6267G06K9/46G06K9/623G06K9/629G06K9/6231G06K9/6232G06N3/0454
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,238,315
App. No.
16/675,831
Granted
Feb 1, 2022
Kind
B2
Abstract

The present disclosure describes a method, device, and non-transitory computer readable storage medium for classifying an input image. The method includes extracting, by a device, a global feature of a input image. The method includes determining, by the device, a local critical area of the input image based on the input image and the global feature; and extracting, by the device, a local feature of the local critical area. The method includes obtaining, by the device, a correlation feature of the input image based on the global feature of the input image and the local feature of the local critical area of the input image. The method includes classifying, by the device, the input image to obtain a classification result based on the global feature of the input image, the local feature of the local critical area, and the correlation feature of the input image.

Claims (89)

1. A method for classifying an input image, the method comprising:

extracting, by a device comprising a memory storing instructions and a processor in communication with the memory, a global feature of the input image;

determining, by the device, a local critical area of the input image based on the input image and the global feature of the input image;

extracting, by the device, a local feature of the local critical area of the input image;

obtaining, by the device, a correlation feature of the input image based on the global feature of the input image and the local feature of the local critical area of the input image, by:

obtaining, by the device, sub-image features corresponding to sub-areas of the input image based on the global feature of the input image,

obtaining, by the device, weights of the sub-image features of the sub-areas, and

determining, by the device, the local critical area of the input image based on the sub-image features of the sub-areas, the weights of the sub-image features of the sub-areas, and the input image; and

classifying, by the device, the input image to obtain a classification result based on the global feature of the input image, the local feature of the local critical area of the input image, and the correlation feature of the input image.

2. The method according to claim 1 , wherein the obtaining the weights of the sub-image features of the sub-areas comprises:

obtaining, by the device, a preset high-dimensional feature vector;

combining, by the device, the sub-image features of the sub-areas with the preset high-dimensional feature vector, to obtain combined features of the sub-areas;

sending, by the device, the combined features of the sub-areas as input to a multilayer perceptron (MLP); and

performing, by the device, prediction according to the MLP to obtain the weights of the sub-image features of the sub-areas.

3. The method according to claim 1 , wherein the obtaining the correlation feature of the input image based on the global feature of the input image and the local feature of the local critical area of the input image comprises:

transposing, by the device, the global feature of the input image, to obtain a transposed global feature;

multiplying, by the device, the transposed global feature by the local feature of the local critical area of the input image, to obtain a product feature; and

average-pooling, by the device, the product feature, to obtain the correlation feature of the input image.

4. The method according to claim 1 , wherein:

the extracting the global feature of a input image comprises:

performing, by the device, feature extraction on the input image according to a first convolutional neural network, to obtain the global feature of the input image; and

the extracting the local feature of the local critical area comprises:

performing, by the device, feature extraction on the local critical area of the input image according to a second convolutional neural network, to obtain the local feature of the local critical area of the input image.

5. The method according to claim 1 , wherein the classifying the input image to obtain the classification result based on the global feature of the input image, the local feature of the local critical area of the input image, and the correlation feature of the input image comprises:

transforming, by the device, the global feature of the input image into a one-dimensional global feature vector, transforming the local feature of the local critical area of the input image into a one-dimensional local feature vector, and transforming the correlation feature of the input image into a one-dimensional correlation feature vector;

combining, by the device, the one-dimensional global feature vector, the one-dimensional local feature vector, and the one-dimensional correlation feature vector, to obtain a one-dimensional combined feature vector corresponding to the input image, wherein a quantity of elements in the one-dimensional combined feature vector is a sum of a quantity of elements in the one-dimensional global feature vector, a quantity of elements in the one-dimensional local feature vector, and a quantity of elements in the one-dimensional correlation feature vector; and

sending, by the device, the one-dimensional combined feature vector as input to a trained classification model, and classifying the input image to obtain the classification result according to the trained classification model.

6. The method according to claim 1 , further comprising:

searching, by the device, for to-be-recommended information to a user based on the classification result; and

sending, by the device, the to-be-recommended information to the user.

7. A computer device for classifying an input image, comprising:

a memory storing instructions; and

a processor in communication with the memory, wherein, when the instructions are executed by the processor, the instructions are configured to cause the computer device to perform:

extracting a global feature of a input image;

determining a local critical area of the input image based on the input image and the global feature of the input image by:

obtaining sub-image features corresponding to sub-areas of the input image based on the global feature of the input image,

obtaining weights of the sub-image features of the sub-areas, and

determining the local critical area of the input image based on the sub-image features of the sub-areas, the weights of the sub-image features of the sub-areas, and the input image;

extracting an local feature of the local critical area of the input image;

obtaining a correlation feature of the input image based on the global feature of the input image and the local feature of the local critical area of the input image; and

classifying the input image to obtain a classification result based on the global feature of the input image, the local feature of the local critical area of the input image and the correlation feature of the input image.

8. The computer device according to claim 7 , wherein, when the instructions are configured to cause the computer device to perform obtaining the weights of the sub-image features of the sub-areas, the instructions are configured to cause the computer device to perform:

obtaining a preset high-dimensional feature vector;

combining the sub-image features of the sub-areas with the preset high-dimensional feature vector, to obtain combined features of the sub-areas;

sending the combined features of the sub-areas as input to a multilayer perceptron (MLP); and

performing prediction according to the MLP to obtain the weights of the sub-image features of the sub-areas.

9. The computer device according to claim 7 , wherein, when the instructions are configured to cause the computer device to perform obtaining the correlation feature of the input image based on the global feature of the input image and the local feature of the local critical area of the input image, the instructions are configured to cause the computer device to perform:

transposing the global feature of the input image, to obtain a transposed global feature;

multiplying the transposed global feature by the local feature of the local critical area of the input image, to obtain a product feature; and

average-pooling the product feature, to obtain the correlation feature of the input image.

10. The computer device according to claim 7 , wherein:

when the instructions are configured to cause the computer device to perform extracting the global feature of a input image, the instructions are configured to cause the computer device to perform:

performing feature extraction on the input image according to a first convolutional neural network, to obtain the global feature of the input image; and

when the instructions are configured to cause the computer device to perform extracting the local feature of the local critical area, the instructions are configured to cause the computer device to perform:

performing feature extraction on the local critical area of the input image according to a second convolutional neural network, to obtain the local feature of the local critical area of the input image.

11. The computer device according to claim 7 , wherein, when the instructions are configured to cause the computer device to perform classifying the input image to obtain the classification result based on the global feature of the input image, the local feature of the local critical area of the input image, and the correlation feature of the input image, the instructions are configured to cause the computer device to perform:

transforming the global feature of the input image into a one-dimensional global feature vector, transforming the local feature of the local critical area of the input image into a one-dimensional local feature vector, and transforming the correlation feature of the input image into a one-dimensional correlation feature vector;

combining the one-dimensional global feature vector, the one-dimensional local feature vector, and the one-dimensional correlation feature vector, to obtain a one-dimensional combined feature vector corresponding to the input image, wherein a quantity of elements in the one-dimensional combined feature vector is a sum of a quantity of elements in the one-dimensional global feature vector, a quantity of elements in the one-dimensional local feature vector, and a quantity of elements in the one-dimensional correlation feature vector; and

sending the one-dimensional combined feature vector as input to a trained classification model, and classifying the input image to obtain the classification result according to the trained classification model.

12. The computer device according to claim 7 , wherein, when the instructions are executed by the processor, the instructions are configured to further cause the computer device to perform:

searching for to-be-recommended information to a user based on the classification result; and

sending the to-be-recommended information to the user.

13. A non-transitory computer readable storage medium storing computer readable instructions, wherein, the computer readable instructions, when executed by a processor, are configured to cause the processor to perform:

extracting a global feature of an input image;

determining a local critical area of the input image based on the input image and the global feature of the input image by:

obtaining sub-image features corresponding to sub-areas of the input image based on the global feature of the input image,

obtaining weights of the sub-image features of the sub-areas, and

determining the local critical area of the input image based on the sub-image features of the sub-areas, the weights of the sub-image features of the sub-areas, and the input image;

extracting an local feature of the local critical area of the input image;

obtaining a correlation feature of the input image based on the global feature of the input image and the local feature of the local critical area of the input image; and

classifying the input image to obtain a classification result based on the global feature of the input image, the local feature of the local critical area of the input image and the correlation feature of the input image.

14. The non-transitory computer readable storage medium according to claim 13 , wherein, when the computer readable instructions are configured to cause the processor to perform obtaining the weights of the sub-image features of the sub-areas, the computer readable instructions are configured to cause the processor to perform:

obtaining a preset high-dimensional feature vector;

combining the sub-image features of the sub-areas with the preset high-dimensional feature vector, to obtain combined features of the sub-areas;

sending the combined features of the sub-areas as input to a multilayer perceptron (MLP); and

performing prediction according to the MLP to obtain the weights of the sub-image features of the sub-areas.

15. The non-transitory computer readable storage medium according to claim 13 , wherein, when the computer readable instructions are configured to cause the processor to perform obtaining the correlation feature of the input image based on the global feature of the input image and the local feature of the local critical area of the input image, the computer readable instructions are configured to cause the processor to perform:

transposing the global feature of the input image, to obtain a transposed global feature;

multiplying the transposed global feature by the local feature of the local critical area of the input image, to obtain a product feature; and

average-pooling the product feature, to obtain the correlation feature of the input image.

16. The non-transitory computer readable storage medium according to claim 13 , wherein:

when the computer readable instructions are configured to cause the processor to perform extracting the global feature of a input image, the computer readable instructions are configured to cause the processor to perform:

performing feature extraction on the input image according to a first convolutional neural network, to obtain the global feature of the input image; and

when the computer readable instructions are configured to cause the processor to perform extracting the local feature of the local critical area, the computer readable instructions are configured to cause the processor to perform:

performing feature extraction on the local critical area of the input image according to a second convolutional neural network, to obtain the local feature of the local critical area of the input image.

17. The non-transitory computer readable storage medium according to claim 13 , wherein, when the computer readable instructions are configured to cause the processor to perform classifying the input image to obtain the classification result based on the global feature of the input image, the local feature of the local critical area of the input image, and the correlation feature of the input image, the computer readable instructions are configured to cause the processor to perform:

transforming the global feature of the input image into a one-dimensional global feature vector, transforming the local feature of the local critical area of the input image into a one-dimensional local feature vector, and transforming the correlation feature of the input image into a one-dimensional correlation feature vector;

combining the one-dimensional global feature vector, the one-dimensional local feature vector, and the one-dimensional correlation feature vector, to obtain a one-dimensional combined feature vector corresponding to the input image, wherein a quantity of elements in the one-dimensional combined feature vector is a sum of a quantity of elements in the one-dimensional global feature vector, a quantity of elements in the one-dimensional local feature vector, and a quantity of elements in the one-dimensional correlation feature vector; and

sending the one-dimensional combined feature vector as input to a trained classification model, and classifying the input image to obtain the classification result according to the trained classification model.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 6, 2019
From: GU, JIAWEI; MA, LIN; LIU, WEI
To: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
Reel/Frame 050934/0135 →
Priority Claims (1)
CN 201711244572.4 · Nov 30, 2017 · national
Continuity (2)
Continuation PCTCN2018106196 · Sep 18, 2018
Related Publication 20200074243A1 · Mar 5, 2020