# US 2025/0095352 A1 · Visual task processing method and related device thereof

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

- Number: US 2025/0095352 A1
- Document ID: US20250095352A1
- Status: Published application
- Kind: A1
- Application number: 18/962,726
- Filed: 2024-11-27
- Published: 2025-03-20
- Earliest claimed: 2022-05-31
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Kai HAN; Jianyuan GUO; Yehui TANG; Yunhe WANG
- Web page: https://patentgrep.com/patent/US20250095352A1

## CPC

- G06N 3/045: Combinations of networks
- G06V 10/82: using neural networks
- G06F 16/55: Clustering; Classification
- G06N 3/042: Knowledge-based neural networks; Logical representations of neural networks
- G06N 3/084: Backpropagation, e.g. using gradient descent
- G06V 10/7715: {Feature extraction, e.g. by transforming the feature space, e.g. multi-dimensional scaling [MDS]; Mappings, e.g. subspace methods}
- G06V 10/806: {of extracted features}
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

This application discloses a visual task processing method and a related device thereof. A to-be-processed image can be processed using a target model, and features outputted by the target model can remain diversified, to help improve processing precision of a visual task for the to-be-processed image. The method in this application includes: obtaining a to-be-processed image; processing the to-be-processed image using a target model, to obtain a feature of the to-be-processed image, where the target model includes a first module and a second module connected to the first module, the first module includes a graph neural network, and the second module is configured to implement feature transformation; and completing a visual task for the to-be-processed image based on the feature of the to-be-processed image.

## Claims

### Claim 1

A method of visual task processing, comprising:
obtaining a to-be-processed image;
processing the to-be-processed image using a target model, to obtain a feature of the to-be-processed image, wherein the target model comprises a first module and a second module connected to the first module, the first module comprises a graph neural network, and the second module is configured to implement feature transformation; and
completing a visual task for the to-be-processed image based on the feature of the to-be-processed image.

### Claim 2 (depends on 1)

The method according to claim 1, wherein
a quantity of second modules is N+M, N≥1, and M≥1, and
processing the to-be-processed image comprises:
performing at least N times of feature transformation on the to-be-processed image using N second modules connected in series, to obtain a first feature;
performing feature aggregation on the first feature using the first module, to obtain a second feature;
performing at least M times of feature transformation on the second feature using M second modules connected in series, to obtain a third feature; and
obtaining the feature of the to-be-processed image based on the third feature.

### Claim 3 (depends on 2)

The method according to claim 2, wherein
the target model further comprises a third module, and
obtaining the feature of the to-be-processed image based on the third feature comprises:
fusing the to-be-processed image and the third feature by using the third module, to obtain a fourth feature; and
obtaining the feature of the to-be-processed image based on the fourth feature.

### Claim 4 (depends on 3)

The method according to claim 3, wherein
the target model further comprises K fourth modules connected in series and a fifth module, K≥1, and
obtaining the feature of the to-be-processed image based on the fourth feature comprises:
performing at least K times of feature transformation on the fourth feature using the K fourth modules, to obtain a fifth feature; and
fusing the fourth feature and the fifth feature using the fifth module, to obtain the feature of the to-be-processed image.

### Claim 5 (depends on 1)

The method according to claim 1, wherein the first module further comprises a normalization layer, and an activation function layer, and the graph neural network of the first module, the normalization layer of the first module, and the activation function layer of the first module are connected in series.

### Claim 6 (depends on 1)

The method according to claim 1, wherein the second module comprises a feature transformation layer and a normalization layer, the feature transformation layer of the second module and the normalization layer of the second module are connected in series, and the feature transformation layer of the second module is a fully-connected layer, a convolutional layer, or a Fourier transformation layer.

### Claim 7 (depends on 4)

The method according to claim 4, wherein a fourth module of the K fourth modules comprises a feature transformation layer and a normalization layer, and the feature transformation layer of the fourth module and the normalization layer of the fourth module are connected in series; or,
the fourth module comprises the feature transformation layer, the normalization layer, and an activation function layer, and the feature transformation layer of the fourth module, the normalization layer of the fourth module, and the activation function layer of the fourth module are connected in series,
wherein the feature transformation layer of the fourth module is a fully-connected layer, a convolutional layer, or a Fourier transformation layer.

### Claim 8 (depends on 1)

The method according to claim 1, wherein
before processing the to-be-processed image using the target model, the method further comprises:
dividing the to-be-processed image, to obtain P patches, wherein P>1;
mapping the P patches, to obtain vector representations of the P patches; and
constructing an initial feature of the to-be-processed image based on the vector representations of the P patches; and
processing the to-be-processed image using the target model comprises:
processing the initial feature of the to-be-processed image using the target model, to obtain the feature of the to-be-processed image.

### Claim 9 (depends on 8)

The method according to claim 8, wherein
before constructing the initial feature of the to-be-processed image, the method further comprises:
adding positional encoding of an ith patch to a vector representation of the ith patch, to obtain the vector representation of the ith patch, wherein the positional encoding of the ith patch indicates a position of the ith patch in the to-be-processed image, wherein i=1, . . . , P; and
constructing the initial feature of the to-be-processed image comprises:
constructing the initial feature of the to-be-processed image based on vector representations of the P patches.

### Claim 10 (depends on 1)

The method according to claim 1, wherein the visual task comprises at least one of: image classification, target detection, semantic segmentation, image denoising, or image super-resolution.

### Claim 11

A method of model training, comprising:
obtaining a to-be-processed image;
processing the to-be-processed image using a to-be-trained model, to obtain a feature of the to-be-processed image, wherein the to-be-trained model comprises a first module and a second module connected to the first module, the first module comprises a graph neural network, and the second module is configured to implement feature transformation;
obtaining a target loss based on the feature of the to-be-processed image and a real feature of the to-be-processed image, wherein the target loss indicates a difference between the feature of the to-be-processed image and the real feature of the to-be-processed image; and
updating parameters of the to-be-trained model based on the target loss, until a model training condition is met, to obtain a target model.

### Claim 12 (depends on 11)

The method according to claim 11, wherein
a quantity of second modules is N+M, N≥1, and M≥1, and
processing the to-be-processed image using the to-be-trained model comprises:
performing at least N times of feature transformation on the to-be-processed image using N second modules connected in series, to obtain a first feature;
performing feature aggregation on the first feature using the first module, to obtain a second feature;
performing at least M times of feature transformation on the second feature using M second modules connected in series, to obtain a third feature; and
obtaining the feature of the to-be-processed image based on the third feature.

### Claim 13 (depends on 12)

The method according to claim 12, wherein
the to-be-trained model further comprises a third module, and
obtaining the feature of the to-be-processed image based on the third feature comprises:
fusing the to-be-processed image and the third feature by using the third module, to obtain a fourth feature; and
obtaining the feature of the to-be-processed image based on the fourth feature.

### Claim 14 (depends on 13)

The method according to claim 13, wherein
the to-be-trained model further comprises K fourth modules connected in series and a fifth module, K≥1, and
obtaining the feature of the to-be-processed image based on the fourth feature comprises:
performing at least K times of feature transformation on the fourth feature using the K fourth modules, to obtain a fifth feature; and
fusing the fourth feature and the fifth feature using the fifth module, to obtain the feature of the to-be-processed image.

### Claim 15 (depends on 11)

The method according to claim 11, wherein the first module further comprises a normalization layer, and an activation function layer, and the graph neural network of the first module, the normalization layer of the first module, and the activation function layer of the first module are connected in series.

### Claim 16 (depends on 11)

The method according to claim 11, wherein the second module comprises a feature transformation layer and a normalization layer, the feature transformation layer of the second module and the normalization layer of the second module are connected in series, and the feature transformation layer of the second module is a fully-connected layer, a convolutional layer, or a Fourier transformation layer.

### Claim 17 (depends on 14)

The method according to claim 14, wherein a fourth module of the K fourth modules comprises a feature transformation layer and a normalization layer, and the feature transformation layer of the fourth module and the normalization layer of the fourth module are connected in series; or,
the fourth module comprises the feature transformation layer, the normalization layer, and an activation function layer, and the feature transformation layer of the fourth module, the normalization layer of the fourth module, and the activation function layer of the fourth module are connected in series, wherein
the feature transformation layer of the fourth module is a fully-connected layer, a convolutional layer, or a Fourier transformation layer.

### Claim 18 (depends on 11)

The method according to claim 11, wherein
before processing the to-be-processed image using the to-be-trained model, the method further comprises:
dividing the to-be-processed image, to obtain P patches, wherein P>1;
mapping the P patches, to obtain vector representations of the P patches; and
constructing an initial feature of the to-be-processed image based on the vector representations of the P patches; and
processing the to-be-processed image using the to-be-trained model comprises:
processing the initial feature of the to-be-processed image using the to-be-trained model, to obtain the feature of the to-be-processed image.

### Claim 19

A visual task processing apparatus, comprising:
a processor; and
a memory coupled to the processor and storing a program, which when executed by the processor, causes the visual task processing apparatus to:
obtain a to-be-processed image;
process the to-be-processed image using a target model, to obtain a feature of the to-be-processed image, wherein the target model comprises a first module and a second module connected to the first module, the first module comprises a graph neural network, and the second module is configured to implement feature transformation; and
complete a visual task for the to-be-processed image based on the feature of the to-be-processed image.

### Claim 20

A model training apparatus, comprising:
a processor; and
a memory coupled to the processor and storing a program, which when executed by the processor, causes the model training apparatus to:
obtain a to-be-processed image;
process the to-be-processed image by using a to-be-trained model, to obtain a feature of the to-be-processed image, wherein the to-be-trained model comprises a first module and a second module connected to the first module, the first module comprises a graph neural network, and the second module is configured to implement feature transformation;
obtain a target loss based on the feature of the to-be-processed image and a real feature of the to-be-processed image, wherein the target loss indicates a difference between the feature of the to-be-processed image and the real feature of the to-be-processed image; and
update parameters of the to-be-trained model based on the target loss, until a model training condition is met, to obtain a target model.
