IP Library Granted Patent US 11,978,241
Granted Patent B2
US 11,978,241 · App. 17/352,822 · Granted May 7, 2024

Image processing method and apparatus, computer-readable medium, and electronic device

Inventors: Kun Jin (Shenzhen, CN); Shi Jie Zhao (Shenzhen, CN); Yang Yi (Shenzhen, CN); Feng Li (Shenzhen, CN); Xiao Xiang Zuo (Shenzhen, CN)
Assignee: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LTD
G06V10/454G06F18/10G06F18/213G06F18/214G06T7/11G06V10/25G06V10/771G06V10/82G06T2207/20021G06T2207/20081
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,978,241
App. No.
17/352,822
Granted
May 7, 2024
Kind
B2
Abstract

Embodiments of the disclosure provide an image processing method and apparatus, a computer-readable medium, and an electronic device. The image processing method includes: extracting a feature map of a target image; dividing the feature map into target regions; determining weights of the target regions according to feature vectors of the target regions; and generating a feature vector of the target image according to the weights of the target regions and the feature vectors of the target regions.

Claims (58)

1. An image processing method for image recognition, comprising:

extracting a feature map of a target image;

dividing the feature map into target regions;

determining weights of the target regions according to feature vectors of the target regions; and

generating a feature vector of the target image according to the weights of the target regions and the feature vectors of the target regions, the feature vector being used for image recognition of the target image,

wherein the determining the weights comprises:

performing dimension reduction on the feature vectors of the target regions by respectively inputting the feature vectors of the target regions into a fully-connected layer, to obtain feature scalars respectively corresponding to the target regions; and

normalizing the feature scalars respectively corresponding to the target regions, to obtain the weights of the target regions.

2. The image processing method according to claim 1 , wherein the dividing the feature map comprises:

dividing the feature map in a predetermined region division manner, to obtain the target regions; or

performing a region of interest (ROI) pooling operation on the feature map, to map ROIs to the feature map to obtain the target regions.

3. The image processing method according to claim 2 , wherein the dividing the feature map comprises:

dividing the feature map by using one or more predetermined region division manners, to obtain, as the target regions, feature map regions obtained by division.

4. The image processing method according to claim 1 , wherein the performing the dimension reduction comprises:

inputting the feature vectors of the target regions into a fully connected layer of which an output dimension is one dimension, and determining the feature scalars corresponding to the target regions according to an output of the fully connected layer.

5. The image processing method according to claim 1 , wherein the generating the feature vector comprises:

obtaining weighted feature vectors of the target regions according to the weights of the target regions and the feature vectors of the target regions; and

generating the feature vector of the target image according to the weighted feature vectors of the target regions.

6. The image processing method according to claim 5 , wherein the generating the feature vector of the target image according to the weighted feature vectors of the target regions comprises:

combining the weighted feature vectors of the target regions, to obtain the feature vector of the target image; or

combining the weighted feature vectors of the target regions, and normalizing feature vectors after the combination, to obtain the feature vector of the target image.

7. The image processing method according to claim 1 , further comprising:

retrieving, according to the feature vector of the target image, an image matching the target image.

8. An image processing method for image recognition, comprising:

inputting a target image into an image processing model,

the image processing model comprising a convolution module, a visual attention module, and a feature combination module, the convolution module being configured to extract a feature map of the target image, the visual attention module being configured to: divide the feature map into target regions, and determine weights of the target regions according to feature vectors of the target regions, and the feature combination module being configured to generate a feature vector of the target image according to the weights of the target regions and the feature vectors of the target regions, and

the visual attention module being configured to determine the weights by:

performing dimension reduction on the feature vectors of the target regions by respectively inputting the feature vectors of the target regions into a fully-connected layer, to obtain feature scalars respectively corresponding to the target regions; and

normalizing the feature scalars respectively corresponding to the target regions, to obtain the weights of the target regions; and

obtaining the feature vector of the target image that is generated by the image processing model, the feature vector being used for image recognition of the target image.

9. The image processing method according to claim 8 , further comprising:

obtaining an image sample labeled with a feature vector; and

training the image processing model by using the image sample.

10. The image processing method according to claim 8 , wherein the feature map of the target image is extracted by using any convolutional layer in the convolution module.

11. An image processing apparatus for image recognition, comprising:

at least one memory configured to store program code; and

at least one processor configured to read the program code and operate as instructed by the program code, the program code comprising:

extraction code configured to cause the at least one processor to extract a feature map of a target image;

division code configured to cause the at least one processor to divide the feature map into target regions;

determining code configured to cause the at least one processor to determine weights of the target regions according to feature vectors of the target regions; and

generation code configured to cause the at least one processor to generate a feature vector of the target image according to the weights of the target regions and the feature vectors of the target regions, the feature vector being used for image recognition of the target image,

wherein the determining code is configured to cause the at least one processor to determine the weights by:

performing dimension reduction on the feature vectors of the target regions by respectively inputting the feature vectors of the target regions into a fully-connected layer, to obtain feature scalars respectively corresponding to the target regions; and

normalizing the feature scalars respectively corresponding to the target regions, to obtain the weights of the target regions.

12. A non-transitory computer-readable medium storing a computer program, the computer program being executable by at least one processor to perform the method according to claim 1 .

13. A non-transitory computer-readable medium storing a computer program, the computer program being executable by at least one processor to perform the method according to claim 8 .

14. An electronic device, comprising:

at least one processor; and

at least one memory configured to store program code, the program code being executable by the at least one processor to perform the method according to claim 8 .

15. An image processing apparatus for image recognition, comprising:

at least one memory configured to store program code; and

at least one processor configured to read the program code and operate as instructed by the program code, the program code comprising:

input code configured to cause the at least one processor to input a target image into an image processing model,

the image processing model comprising a convolution module, a visual attention module, and a feature combination module, the convolution module being configured to extract a feature map of the target image, the visual attention module being configured to: divide the feature map into target regions, and determine weights of the target regions according to feature vectors of the target regions, and the feature combination module being configured to generate a feature vector of the target image according to the weights of the target regions and the feature vectors of the target regions, and

the visual attention module being configured to determine the weights by:

performing dimension reduction on the feature vectors of the target regions by respectively inputting the feature vectors of the target regions into a fully-connected layer, to obtain feature scalars respectively corresponding to the target regions; and

normalizing the feature scalars respectively corresponding to the target regions, to obtain the weights of the target regions; and

obtaining code configured to cause the at least one processor to obtain the feature vector of the target image that is generated by the image processing model.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 21, 2021
From: JI, KUN; ZHAO, SHI JIE; YI, YANG; LI, FENG; ZUO, XIAO XIANG
To: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LTD
Reel/Frame 056605/0368 →
Priority Claims (1)
CN 201910369974.X · May 6, 2019 · national
Continuity (2)
Continuation PCTCN2020085021 · Apr 16, 2020
Related Publication 20210319243A1 · Oct 14, 2021