# US 2023/0066021 A1 · Object detection

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

- Number: US 2023/0066021 A1
- Document ID: US20230066021A1
- Status: Published application
- Kind: A1
- Application number: 18/049,742
- Filed: 2022-10-26
- Published: 2023-03-02
- Earliest claimed: 2021-10-29
- Assignees: Beijing Baidu Netcom Science Technology Co., Ltd.
- Applicants: Beijing Baidu Netcom Science Technology Co., Ltd.
- Inventors: Yunhao WANG; Bin ZHANG; Chao LI; Yan PENG; Song CHEN; Song XUE; Yuan FENG; Shumin HAN
- Web page: https://patentgrep.com/patent/US20230066021A1

## CPC

- G06T 7/10: Segmentation; Edge detection (motion-based segmentation G06T7/215)
- G06T 7/70: Determining position or orientation of objects or cameras (camera calibration G06T7/80)
- G06V 10/255: {Detecting or recognising potential candidate objects based on visual cues, e.g. shapes}
- G06V 10/82: using neural networks
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING

## Abstract

A method is provided that includes: segmenting an image to be detected into a plurality of image blocks; generating a feature representation of the image to be detected based on the plurality of image blocks; mapping the feature representation by using a preset parameter set to obtain a plurality of feature maps of the image to be detected; and determining a position and a class of a target object in the image to be detected based on the plurality of feature maps.

## Claims

### Claim 1

A method, comprising:
segmenting an image to be detected into a plurality of image blocks;
generating a feature representation of the image to be detected based on the plurality of image blocks;
mapping the feature representation by using a preset parameter set to obtain a plurality of feature maps of the image to be detected; and
determining a position and a class of a target object in the image to be detected based on the plurality of feature maps.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the generating the feature representation of the image to be detected comprises:
for each image block of the plurality of image blocks:
determining a first vector representation of the image block based on pixel values of the image block; and
transforming the first vector representation by using a preset transformation matrix to generate a second vector representation of the image block; and
combining the second vector representation of each image block of the plurality of image blocks to obtain the feature representation of the image to be detected.

### Claim 3 (depends on 2)

The method according to claim 2, wherein the plurality of image blocks are of a same size and do not overlap with each other, and
wherein the first vector representation of the image block is a concatenation of pixel values of each channel of the image block.

### Claim 4 (depends on 1)

The method according to claim 1, further comprising:
training an object detection model, wherein the object detection model comprises a feature extraction network and a region proposal network, and wherein the training the object detection model comprises:
obtaining a first sample image and a second sample image, wherein the first sample image and the second sample image comprise a target object belonging to a target class, and the first sample image is annotated with a real position and the target class of the target object;
inputting the first sample image and the second sample image to the feature extraction network to obtain a first feature of the first sample image, wherein the first feature is extracted based on the second sample image;
inputting the first feature to the region proposal network to obtain a predicted position and a predicted class of the target object in the first sample image;
calculating a loss value of the object detection model based on the real position, the target class, the predicted position, and the predicted class; and
adjusting parameters of the object detection model based on the loss value.

### Claim 5 (depends on 4)

The method according to claim 4, wherein the second sample image comprises and only comprises the target object.

### Claim 6 (depends on 4)

The method according to claim 4, wherein the obtaining the first sample image and the second sample image comprises:
obtaining a plurality of sample images of the target class, wherein each sample image of the plurality of sample images comprises at least the target object; and
obtaining a plurality of local images by clipping a local region comprising the target object from each sample image of the plurality of sample images,
wherein the first sample image is any one of the plurality of sample images, and the second sample image is any one of the plurality of local images.

### Claim 7 (depends on 4)

The method according to claim 4, wherein the first sample image and the second sample image each are any one of a plurality of sample images of the target class.

### Claim 8 (depends on 4)

The method according to claim 4, further comprising:
before the obtaining the first sample image and the second sample image, pre-training the object detection model based on image data of a basic class, wherein the basic class is different from the target class.

### Claim 9 (depends on 4)

The method according to claim 4, wherein the feature extraction network comprises a first extraction branch for extracting the first feature and a second extraction branch for extracting a second feature of the second sample image, wherein the first extraction branch comprises at least one first attention module, the second extraction branch comprises at least one second attention module, the at least one first attention module and the at least one second attention module are in a one-to-one correspondence, and each first attention module shares parameters with a second attention module corresponding to the first attention module, wherein
each second attention module of the at least one second attention module is configured to: process second input data input to the second attention module, and output a value matrix of the second input data; and
each first attention module of the at least one first attention module is configured to:
obtain a value matrix output by a second attention module corresponding to the first attention module;
process first input data input to the first attention module to obtain a query matrix and a key matrix of the first input data; and
determine and output first output data of the first attention module based on the query matrix, the key matrix, and the value matrix.

### Claim 10 (depends on 9)

The method according to claim 9, further comprising:
deleting the second extraction branch in response to determining that the loss value is less than a preset threshold.

### Claim 11

An electronic device, comprising:
a processor; and
a memory communicatively connected to the processor, wherein
the memory stores instructions executable by the processor, wherein the instructions, when executed by the processor, are configured to cause the processor to perform operations comprising:
segmenting an image to be detected into a plurality of image blocks;
generating a feature representation of the image to be detected based on the plurality of image blocks;
mapping the feature representation by using a preset parameter set to obtain a plurality of feature maps of the image to be detected; and
determining a position and a class of a target object in the image to be detected based on the plurality of feature maps.

### Claim 12 (depends on 11)

The electronic device according to claim 11, wherein the generating the feature representation of the image to be detected comprises:
for each image block of the plurality of image blocks:
determining a first vector representation of the image block based on pixel values of the image block; and
transforming the first vector representation by using a preset transformation matrix to generate a second vector representation of the image block; and
combining the second vector representation of each image block of the plurality of image blocks to obtain the feature representation of the image to be detected.

### Claim 13 (depends on 12)

The electronic device according to claim 12, wherein the plurality of image blocks are of a same size and do not overlap with each other, and
wherein the first vector representation of the image block is a concatenation of pixel values of each channel of the image block.

### Claim 14 (depends on 11)

The electronic device according to claim 11, wherein the operations further comprise:
training an object detection model, wherein the object detection model comprises a feature extraction network and a region proposal network, and wherein the training the object detection model comprises:
obtaining a first sample image and a second sample image, wherein the first sample image and the second sample image comprise a target object belonging to a target class, and the first sample image is annotated with a real position and the target class of the target object;
inputting the first sample image and the second sample image to the feature extraction network to obtain a first feature of the first sample image, wherein the first feature is extracted based on the second sample image;
inputting the first feature to the region proposal network to obtain a predicted position and a predicted class of the target object in the first sample image;
calculating a loss value of the object detection model based on the real position, the target class, the predicted position, and the predicted class; and
adjusting parameters of the object detection model based on the loss value.

### Claim 15 (depends on 14)

The electronic device according to claim 14, wherein the second sample image comprises and only comprises the target object.

### Claim 16 (depends on 14)

The electronic device according to claim 14, wherein the obtaining the first sample image and the second sample image comprises:
obtaining a plurality of sample images of the target class, wherein each sample image of the plurality of sample images comprises at least the target object; and
obtaining a plurality of local images by clipping a local region comprising the target object from each sample image of the plurality of sample images,
wherein the first sample image is any one of the plurality of sample images, and the second sample image is any one of the plurality of local images.

### Claim 17 (depends on 14)

The electronic device according to claim 14, wherein the first sample image and the second sample image each are any one of a plurality of sample images of the target class.

### Claim 18 (depends on 14)

The electronic device according to claim 14, wherein the operations further comprise:
before the obtaining the first sample image and the second sample image, pre-training the object detection model based on image data of a basic class, wherein the basic class is different from the target class.

### Claim 19 (depends on 14)

The electronic device according to claim 14, wherein the feature extraction network comprises a first extraction branch for extracting the first feature and a second extraction branch for extracting a second feature of the second sample image, wherein the first extraction branch comprises at least one first attention module, the second extraction branch comprises at least one second attention module, the at least one first attention module and the at least one second attention module are in a one-to-one correspondence, and each first attention module shares parameters with a second attention module corresponding to the first attention module, wherein
each second attention module of the at least one second attention module is configured to: process second input data input to the second attention module, and output a value matrix of the second input data; and
each first attention module of the at least one first attention module is configured to:
obtain a value matrix output by a second attention module corresponding to the first attention module;
process first input data input to the first attention module to obtain a query matrix and a key matrix of the first input data; and
determine and output first output data of the first attention module based on the query matrix, the key matrix, and the value matrix.

### Claim 20

A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are configured to enable a computer to perform operations comprising:
segmenting an image to be detected into a plurality of image blocks;
generating a feature representation of the image to be detected based on the plurality of image blocks;
mapping the feature representation by using a preset parameter set to obtain a plurality of feature maps of the image to be detected; and
determining a position and a class of a target object in the image to be detected based on the plurality of feature maps.
