# US 2021/0174537 A1 · Method and apparatus for detecting target object in image

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

- Number: US 2021/0174537 A1
- Document ID: US20210174537A1
- Status: Published application
- Kind: A1
- Application number: 16/894,123
- Filed: 2020-06-05
- Published: 2021-06-10
- Earliest claimed: 2019-12-10
- Assignees: Beijing Baidu Netcom Science Technology Co., Ltd.
- Applicants: Beijing Baidu Netcom Science and Technology Co., Ltd.
- Inventors: Xiaoqing Ye; Xiao Tan; Wei Zhang; Hao Sun; Errui Ding
- Web page: https://patentgrep.com/patent/US20210174537A1

## CPC

- G06T 7/73: using feature-based methods
- G06F 18/214: Generating training patterns; Bootstrap methods, e.g. bagging or boosting
- G06F 18/24: Classification techniques
- G06N 3/04: Architecture, e.g. interconnection topology
- G06N 3/045: Combinations of networks
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/08: Learning methods
- G06N 3/084: Backpropagation, e.g. using gradient descent
- G06N 3/09: Supervised learning
- G06T 7/70: Determining position or orientation of objects or cameras (camera calibration G06T7/80)
- G06T 11/20: Drawing from basic elements
- G06V 10/764: using classification, e.g. of video objects
- G06V 10/82: using neural networks
- G06V 20/58: Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads
- G06V 20/647: {by matching two-dimensional images to three-dimensional objects}
- G06T 2207/20081: Training; Learning
- G06T 2207/20084: Artificial neural networks [ANN]
- G06T 2207/30236: Traffic on road, railway or crossing
- G06T 2210/12: Bounding box
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING

## Abstract

Embodiments of the present disclosure provide a method and apparatus for detecting a target object in an image. The method includes: performing following prediction operations using a pre-trained neural network: detecting a target object in a two-dimensional image to determine a two-dimensional bounding box of the target object; and determining a relative position constraint relationship between the two-dimensional bounding box of the target object and a three-dimensional projection bounding box obtained by projecting a three-dimensional bounding box of the target object into the two-dimensional image; and the method further including: determining the three-dimensional projection bounding box of the target object, based on the two-dimensional bounding box of the target object and the relative position constraint relationship between the two-dimensional bounding box of the target object and the three-dimensional projection bounding box.

## Claims

### Claim 1

A method for detecting a target object in an image, the method comprising:
performing following prediction operations using a pre-trained neural network:
detecting the target object in a two-dimensional image to determine a two-dimensional bounding box of the target object; and
determining a relative position constraint relationship between the two-dimensional bounding box of the target object and a three-dimensional projection bounding box obtained by projecting a three-dimensional bounding box of the target object into the two-dimensional image; and
the method further comprising:
determining the three-dimensional projection bounding box of the target object, based on the two-dimensional bounding box of the target object and the relative position constraint relationship between the two-dimensional bounding box of the target object and the three-dimensional projection bounding box.

### Claim 2 (depends on 1)

The method according to claim 1, wherein determining the relative position constraint relationship between the two-dimensional bounding box of the target object and the three-dimensional projection bounding box obtained by projecting the three-dimensional bounding box of the target object into the two-dimensional image, comprises:
determining values of parameters in a preset parameter group corresponding to the target object;
wherein, the preset parameter group comprises at least two first parameter pairs and at least four second parameters;
each of the first parameter pairs respectively represents a relative position of a vertex of the three-dimensional bounding box and the two-dimensional bounding box, and two parameters in the first parameter pair respectively represent: a relative position of a vertex on the three-dimensional bounding box and two vertices in a height direction of the two-dimensional bounding box, and a relative position of a vertex on the three-dimensional bounding box and two vertexes in a width direction of the two-dimensional bounding box; and
each of the second parameters respectively represents a relative position of a vertex of the three-dimensional projection bounding box in a width or height direction of the two-dimensional bounding box, and two vertices of the two-dimensional bounding box in a same direction, and any one of the first parameter pairs and any one of the second parameters represent positions of different vertices of the three-dimensional projection bounding box relative to the two-dimensional bounding box.

### Claim 3 (depends on 2)

The method according to claim 2, wherein determining the relative position constraint relationship between the two-dimensional bounding box of the target object and the three-dimensional projection bounding box obtained by projecting the three-dimensional bounding box of the target object into the two-dimensional image, further comprises:
determining a posture type of the target object from at least two preset posture types, wherein the posture type of the target object is related to a number of vertices blocked by the target object among vertices of the three-dimensional projection bounding box of the target object; and
determining the preset parameter group corresponding to the target object according to the posture type of the target object.

### Claim 4 (depends on 3)

The method according to claim 3, wherein the posture type of the target object is further related to an orientation of the target object, and wherein determining the three-dimensional projection bounding box of the target object, based on the two-dimensional bounding box of the target object and the relative position constraint relationship between the two-dimensional bounding box of the target object and the three-dimensional projection bounding box, comprises:
determining coordinates of part of vertices of the three-dimensional projection bounding box based on coordinates of the vertices of the two-dimensional bounding box, the values of the parameters in the preset parameter group, and the posture type of the target object; and
calculating coordinates of other vertices of the three-dimensional projection bounding box, based on the determined coordinates of the part of vertices of the three-dimensional projection bounding box, and a projection geometric relationship between the three-dimensional projection bounding box and the corresponding three-dimensional bounding box.

### Claim 5 (depends on 1)

The method according to claim 1, wherein the prediction operations further comprise:
classifying the target object to determine a category of the target object.

### Claim 6

A method for training a neural network for detecting a target object, the method comprising:
acquiring sample data, the sample data comprising a sample image of a three-dimensional projection bounding box labeling the target object included in the three-dimensional projection bounding box, the three-dimensional projection bounding box being a projection of a corresponding three-dimensional bounding box in the sample image; and
performing multiple iteration training on the neural network for detecting the target object based on the sample data;
the iteration training comprising:
using the current neural network for detecting the target object to perform following operations:
detecting the target object in the sample image to obtain a detection result of a two-dimensional bounding box of the target object; and
determining a relative position constraint relationship between the two-dimensional bounding box and the three-dimensional projection bounding box of the target object in the sample image;
determining a detection result of the three-dimensional projection bounding box of the target object in the sample image, based on the detection result of the two-dimensional bounding box of the target object in the sample image and the relative position constraint relationship between the two-dimensional bounding box and the three-dimensional projection bounding box of the target object in the sample image; and
updating parameters of the neural network for detecting the target object, based on a difference between the detection result of the three-dimensional projection bounding box of the target object in the sample image and the three-dimensional projection bounding box of the target object in the sample image.

### Claim 7 (depends on 6)

The method according to claim 6, wherein the neural network for detecting the target object comprises a two-dimensional regression branch and a three-dimensional regression branch, wherein the two-dimensional regression branch outputs the detection result of the two-dimensional bounding box of the target object in the sample image, and the three-dimensional regression branch determines the relative position constraint relationship between the two-dimensional bounding box and the three-dimensional projection bounding box of the target object in the sample image.

### Claim 8 (depends on 7)

The method according to claim 7, wherein the neural network for detecting the target object further comprises a three-dimensional classification branch, and wherein the iteration training further comprises:
determining a posture type of the target object using the three-dimensional classification branch, the posture type of the target object being related to a number of vertices blocked by the target object in vertices of the three-dimensional projection bounding box of the target object, and/or an orientation of the target object; and
determining the relative position constraint relationship between the two-dimensional bounding box and the three-dimensional projection bounding box of the target object in the sample image according to the posture type of the target object by the three-dimensional regression branch.

### Claim 9 (depends on 7)

The method according to claim 7, wherein the sample data further comprises category labeling information of the target object in the sample image, and the neural network for detecting the target object further comprises a two-dimensional classification branch, and wherein the iteration training further comprises:
classifying the target object using the two-dimensional classification branch, and updating the parameters of the neural network for detecting the target object based on a difference between a classification result of the target object and the category labeling information of the target object.

### Claim 10

An apparatus for detecting a target object in an image, the apparatus comprising:
at least one processor; and
a memory storing instructions, wherein the instructions when executed by the at least one processor, cause the at least one processor to perform operations, the operations comprising:
performing following prediction operations using a pre-trained neural network:
detecting the target object in a two-dimensional image to determine a two-dimensional bounding box of the target object; and
determining a relative position constraint relationship between the two-dimensional bounding box of the target object and a three-dimensional projection bounding box obtained by projecting a three-dimensional bounding box of the target object into the two-dimensional image; and
a determination unit, configured to determine the three-dimensional projection bounding box of the target object, based on the two-dimensional bounding box of the target object and the relative position constraint relationship between the two-dimensional bounding box of the target object and the three-dimensional projection bounding box.

### Claim 11 (depends on 10)

The apparatus according to claim 10, wherein determining the relative position constraint relationship between the two-dimensional bounding box of the target object and the three-dimensional projection bounding box obtained by projecting the three-dimensional bounding box of the target object into the two-dimensional image, comprises:
determining values of parameters in a preset parameter group corresponding to the target object,
wherein the preset parameter group comprises at least two first parameter pairs and at least four second parameters,
wherein each of the first parameter pairs respectively represents a relative position of a vertex of the three-dimensional bounding box and the two-dimensional bounding box, and two parameters in the first parameter pair respectively represent: a relative position of a vertex on the three-dimensional bounding box and two vertices in a height direction of the two-dimensional bounding box, and a relative position of a vertex on the three-dimensional bounding box and two vertexes in a width direction of the two-dimensional bounding box, and
wherein each of the second parameters respectively represents a relative position of a vertex of the three-dimensional projection bounding box in a width or height direction of the two-dimensional bounding box, and two vertices of the two-dimensional bounding box in a same direction, and any one of the first parameter pairs and any one of the second parameters represent positions of different vertices of the three-dimensional projection bounding box relative to the two-dimensional bounding box.

### Claim 12 (depends on 11)

The apparatus according to claim 11, wherein determining the relative position constraint relationship between the two-dimensional bounding box of the target object and the three-dimensional projection bounding box obtained by projecting the three-dimensional bounding box of the target object into the two-dimensional image, further comprises:
determining a posture type of the target object from at least two preset posture types, wherein the posture type of the target object is related to a number of vertices blocked by the target object among vertices of the three-dimensional projection bounding box of the target object; and
determining the preset parameter group corresponding to the target object according to the posture type of the target object.

### Claim 13 (depends on 12)

The apparatus according to claim 12, wherein the posture type of the target object is further related to an orientation of the target object, and wherein determining the three-dimensional projection bounding box of the target object, based on the two-dimensional bounding box of the target object and the relative position constraint relationship between the two-dimensional bounding box of the target object and the three-dimensional projection bounding box, comprises:
determining coordinates of part of vertices of the three-dimensional projection bounding box based on coordinates of the vertices of the two-dimensional bounding box, the values of the parameters in the preset parameter group, and the posture type of the target object; and
calculating coordinates of other vertices of the three-dimensional projection bounding box, based on the determined coordinates of the part of vertices of the three-dimensional projection bounding box, and a projection geometric relationship between the three-dimensional projection bounding box and the corresponding three-dimensional bounding box.

### Claim 14 (depends on 10)

The apparatus according to claim 10, wherein the prediction operations further comprise:
classifying the target object to determine a category of the target object.

### Claim 15

An apparatus for training a neural network for detecting a target object, the apparatus comprising:
at least one processor; and
a memory storing instructions, wherein the instructions when executed by the at least one processor, cause the at least one processor to perform operations, the operations comprising:
acquiring sample data, the sample data comprising a sample image of a three-dimensional projection bounding box labeling the target object included in the three-dimensional projection bounding box, the three-dimensional projection bounding box being a projection of a corresponding three-dimensional bounding box in the sample image; and
performing multiple iteration training on the neural network for detecting the target object based on the sample data;
the iteration training comprising:
using the current neural network for detecting the target object to perform following operations: detecting the target object in the sample image to obtain a detection result of a two-dimensional bounding box of the target object, and determining a relative position constraint relationship between the two-dimensional bounding box and the three-dimensional projection bounding box of the target object in the sample image;
determining a detection result of the three-dimensional projection bounding box of the target object in the sample image, based on the detection result of the two-dimensional bounding box of the target object in the sample image and the relative position constraint relationship between the two-dimensional bounding box and the three-dimensional projection bounding box of the target object in the sample image; and
updating parameters of the neural network for detecting the target object, based on a difference between the detection result of the three-dimensional projection bounding box of the target object in the sample image and the three-dimensional projection bounding box of the target object in the sample image.

### Claim 16 (depends on 15)

The apparatus according to claim 15, wherein the neural network for detecting the target object comprises a two-dimensional regression branch and a three-dimensional regression branch, wherein the two-dimensional regression branch outputs the detection result of the two-dimensional bounding box of the target object in the sample image, and the three-dimensional regression branch determines the relative position constraint relationship between the two-dimensional bounding box and the three-dimensional projection bounding box of the target object in the sample image.

### Claim 17 (depends on 16)

The apparatus according to claim 16, wherein the neural network for detecting the target object further comprises a three-dimensional classification branch, and wherein the iteration training further comprises:
determining a posture type of the target object using the three-dimensional classification branch, the posture type of the target object being related to a number of vertices blocked by the target object in vertices of the three-dimensional projection bounding box of the target object, and/or an orientation of the target object; and
determining the relative position constraint relationship between the two-dimensional bounding box and the three-dimensional projection bounding box of the target object in the sample image according to the posture type of the target object by the three-dimensional regression branch.

### Claim 18 (depends on 16)

The apparatus according to claim 16, wherein the sample data further comprises category labeling information of the target object in the sample image, and the neural network for detecting the target object further comprises a two-dimensional classification branch, and wherein the iteration training further comprises:
classifying the target object using the two-dimensional classification branch, and updating the parameters of the neural network for detecting the target object based on a difference between a classification result of the target object and the category labeling information of the target object.

### Claim 19 (depends on 1)

A non-transitory computer readable medium, storing a computer program thereon, the program, when executed by a processor, implements the method according to claim 1.

### Claim 20 (depends on 6)

A non-transitory computer readable medium, storing a computer program thereon, the program, when executed by a processor, implements the method according to claim 6.
