Skip to content

Commit 68ea4b4

Browse files
[Fix] Fix formula in the readthedocs (#2580)
* fix latex in readthedocs * fix zh_cn latex * fix zh_cn latex * fix en latex
1 parent 583e907 commit 68ea4b4

File tree

2 files changed

+48
-48
lines changed

2 files changed

+48
-48
lines changed

docs/en/user_guides/coord_sys_tutorial.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Despite the variety of datasets and equipment, by summarizing the line of works
4848
left ------ 0 ------> x right
4949
```
5050

51-
The definition of coordinate systems in this tutorial is actually **more than just defining the three axes**. For a box in the form of `` $$`(x, y, z, dx, dy, dz, r)`$$ ``, our coordinate systems also define how to interpret the box dimensions `` $$`(dx, dy, dz)`$$ `` and the yaw angle `` $$`r`$$ ``.
51+
The definition of coordinate systems in this tutorial is actually **more than just defining the three axes**. For a box in the form of $(x, y, z, dx, dy, dz, r)$, our coordinate systems also define how to interpret the box dimensions $(dx, dy, dz)$ and the yaw angle $r$.
5252

5353
The illustration of the three coordinate systems is shown below:
5454

@@ -60,13 +60,13 @@ We will stick to the three coordinate systems defined in this tutorial in the fu
6060

6161
## Definition of the yaw angle
6262

63-
Please refer to [wikipedia](https://en.wikipedia.org/wiki/Euler_angles#Tait%E2%80%93Bryan_angles) for the standard definition of the yaw angle. In object detection, we choose an axis as the gravity axis, and a reference direction on the plane `` $$`\Pi`$$ `` perpendicular to the gravity axis, then the reference direction has a yaw angle of 0, and other directions on `` $$`\Pi`$$ `` have non-zero yaw angles depending on its angle with the reference direction.
63+
Please refer to [wikipedia](https://en.wikipedia.org/wiki/Euler_angles#Tait%E2%80%93Bryan_angles) for the standard definition of the yaw angle. In object detection, we choose an axis as the gravity axis, and a reference direction on the plane $\Pi$ perpendicular to the gravity axis, then the reference direction has a yaw angle of 0, and other directions on $\Pi$ have non-zero yaw angles depending on its angle with the reference direction.
6464

6565
Currently, for all supported datasets, annotations do not include pitch angle and roll angle, which means we need only consider the yaw angle when predicting boxes and calculating overlap between boxes.
6666

6767
In MMDetection3D, all three coordinate systems are right-handed coordinate systems, which means the ascending direction of the yaw angle is counter-clockwise if viewed from the negative direction of the gravity axis (the axis is pointing at one's eyes).
6868

69-
The figure below shows that, in this right-handed coordinate system, if we set the positive direction of the x-axis as a reference direction, then the positive direction of the y-axis has a yaw angle of `` $$`\frac{\pi}{2}`$$ ``.
69+
The figure below shows that, in this right-handed coordinate system, if we set the positive direction of the x-axis as a reference direction, then the positive direction of the y-axis has a yaw angle of $\frac{\pi}{2}$.
7070

7171
```
7272
z up y front (yaw=0.5*pi)
@@ -97,9 +97,9 @@ __|____|____|____|______\ x right
9797

9898
## Definition of the box dimensions
9999

100-
The definition of the box dimensions cannot be disentangled with the definition of the yaw angle. In the previous section, we said that the direction of a box is defined to be parallel with the x-axis if its yaw angle is 0. Then naturally, the dimension of a box which corresponds to the x-axis should be `` $$`dx`$$ ``. However, this is not always the case in some datasets (we will address that later).
100+
The definition of the box dimensions cannot be disentangled with the definition of the yaw angle. In the previous section, we said that the direction of a box is defined to be parallel with the x-axis if its yaw angle is 0. Then naturally, the dimension of a box which corresponds to the x-axis should be $dx$. However, this is not always the case in some datasets (we will address that later).
101101

102-
The following figures show the meaning of the correspondence between the x-axis and `` $$`dx`$$ ``, and between the y-axis and `` $$`dy`$$ ``.
102+
The following figures show the meaning of the correspondence between the x-axis and $dx$, and between the y-axis and $dy$.
103103

104104
```
105105
y front
@@ -116,7 +116,7 @@ __|____|____|____|______\ x right
116116
| dy
117117
```
118118

119-
Note that the box direction is always parallel with the edge `` $$`dx`$$ ``.
119+
Note that the box direction is always parallel with the edge $dx$.
120120

121121
```
122122
y front
@@ -143,20 +143,20 @@ In SECOND, the LiDAR coordinate system for a box is defined as follows (a bird's
143143

144144
![](https://raw.githubusercontent.com/traveller59/second.pytorch/master/images/kittibox.png)
145145

146-
For each box, the dimensions are `` $$`(w, l, h)`$$ ``, and the reference direction for the yaw angle is the positive direction of the y axis. For more details, refer to the [repo](https://github.com/traveller59/second.pytorch#concepts).
146+
For each box, the dimensions are $(w, l, h)$, and the reference direction for the yaw angle is the positive direction of the y axis. For more details, refer to the [repo](https://github.com/traveller59/second.pytorch#concepts).
147147

148148
Our LiDAR coordinate system has two changes:
149149

150150
- The yaw angle is defined to be right-handed instead of left-handed for consistency;
151-
- The box dimensions are `` $$`(l, w, h)`$$ `` instead of `` $$`(w, l, h)`$$ ``, since `` $$`w`$$ `` corresponds to `` $$`dy`$$ `` and `` $$`l`$$ `` corresponds to `` $$`dx`$$ `` in KITTI.
151+
- The box dimensions are $(l, w, h)$ instead of $(w, l, h)$, since $w$ corresponds to $dy$ and $l$ corresponds to $dx$ in KITTI.
152152

153153
### Waymo
154154

155155
We use the KITTI-format data of Waymo dataset. Therefore, KITTI and Waymo also share the same coordinate system in our implementation.
156156

157157
### NuScenes
158158

159-
NuScenes provides a toolkit for evaluation, in which each box is wrapped into a `Box` instance. The coordinate system of `Box` is different from our LiDAR coordinate system in that the first two elements of the box dimension correspond to `` $$`(dy, dx)`$$ ``, or `` $$`(w, l)`$$ ``, respectively, instead of the reverse. For more details, please refer to the NuScenes [tutorial](https://github.com/open-mmlab/mmdetection3d/blob/master/docs/en/datasets/nuscenes_det.md#notes).
159+
NuScenes provides a toolkit for evaluation, in which each box is wrapped into a `Box` instance. The coordinate system of `Box` is different from our LiDAR coordinate system in that the first two elements of the box dimension correspond to $(dy, dx)$, or $(w, l)$, respectively, instead of the reverse. For more details, please refer to the NuScenes [tutorial](https://github.com/open-mmlab/mmdetection3d/blob/master/docs/en/datasets/nuscenes_det.md#notes).
160160

161161
Readers may refer to the [NuScenes development kit](https://github.com/nutonomy/nuscenes-devkit/tree/master/python-sdk/nuscenes/eval/detection) for the definition of a [NuScenes box](https://github.com/nutonomy/nuscenes-devkit/blob/2c6a752319f23910d5f55cc995abc547a9e54142/python-sdk/nuscenes/utils/data_classes.py#L457) and implementation of [NuScenes evaluation](https://github.com/nutonomy/nuscenes-devkit/blob/master/python-sdk/nuscenes/eval/detection/evaluate.py).
162162

@@ -188,25 +188,25 @@ Take the conversion between our Camera coordinate system and LiDAR coordinate sy
188188

189189
First, for points and box centers, the coordinates before and after the conversion satisfy the following relationship:
190190

191-
- `` $$`x_{LiDAR}=z_{camera}`$$ ``
192-
- `` $$`y_{LiDAR}=-x_{camera}`$$ ``
193-
- `` $$`z_{LiDAR}=-y_{camera}`$$ ``
191+
- $x\_{LiDAR}=z\_{camera}$
192+
- $y\_{LiDAR}=-x\_{camera}$
193+
- $z\_{LiDAR}=-y\_{camera}$
194194

195195
Then, the box dimensions before and after the conversion satisfy the following relationship:
196196

197-
- `` $$`dx_{LiDAR}=dx_{camera}`$$ ``
198-
- `` $$`dy_{LiDAR}=dz_{camera}`$$ ``
199-
- `` $$`dz_{LiDAR}=dy_{camera}`$$ ``
197+
- $dx\_{LiDAR}=dx\_{camera}$
198+
- $dy\_{LiDAR}=dz\_{camera}$
199+
- $dz\_{LiDAR}=dy\_{camera}$
200200

201201
Finally, the yaw angle should also be converted:
202202

203-
- `` $$`r_{LiDAR}=-\frac{\pi}{2}-r_{camera}`$$ ``
203+
- $r\_{LiDAR}=-\frac{\pi}{2}-r\_{camera}$
204204

205205
See the code [here](https://github.com/open-mmlab/mmdetection3d/blob/master/mmdet3d/core/bbox/structures/box_3d_mode.py) for more details.
206206

207207
### Bird's Eye View
208208

209-
The BEV of a camera coordinate system box is `` $$`(x, z, dx, dz, -r)`$$ `` if the 3D box is `` $$`(x, y, z, dx, dy, dz, r)`$$ ``. The inversion of the sign of the yaw angle is because the positive direction of the gravity axis of the Camera coordinate system points to the ground.
209+
The BEV of a camera coordinate system box is $(x, z, dx, dz, -r)$ if the 3D box is $(x, y, z, dx, dy, dz, r)$. The inversion of the sign of the yaw angle is because the positive direction of the gravity axis of the Camera coordinate system points to the ground.
210210

211211
See the code [here](https://github.com/open-mmlab/mmdetection3d/blob/master/mmdet3d/core/bbox/structures/cam_box3d.py) for more details.
212212

@@ -228,18 +228,18 @@ For each box related op, we have marked the type of boxes to which we can apply
228228

229229
No. For example, in KITTI, we need a calibration matrix when converting from Camera coordinate system to LiDAR coordinate system.
230230

231-
#### Q3: How does a phase difference of `` $$`2\pi`$$ `` in the yaw angle of a box affect evaluation?
231+
#### Q3: How does a phase difference of $2\pi$ in the yaw angle of a box affect evaluation?
232232

233-
For IoU calculation, a phase difference of `` $$`2\pi`$$ `` in the yaw angle will result in the same box, thus not affecting evaluation.
233+
For IoU calculation, a phase difference of $2\pi$ in the yaw angle will result in the same box, thus not affecting evaluation.
234234

235-
For angle prediction evaluation such as the NDS metric in NuScenes and the AOS metric in KITTI, the angle of predicted boxes will be first standardized, so the phase difference of `` $$`2\pi`$$ `` will not change the result.
235+
For angle prediction evaluation such as the NDS metric in NuScenes and the AOS metric in KITTI, the angle of predicted boxes will be first standardized, so the phase difference of $2\pi$ will not change the result.
236236

237-
#### Q4: How does a phase difference of `` $$`\pi`$$ `` in the yaw angle of a box affect evaluation?
237+
#### Q4: How does a phase difference of $\pi$ in the yaw angle of a box affect evaluation?
238238

239-
For IoU calculation, a phase difference of `` $$`\pi`$$ `` in the yaw angle will result in the same box, thus not affecting evaluation.
239+
For IoU calculation, a phase difference of $\pi$ in the yaw angle will result in the same box, thus not affecting evaluation.
240240

241241
However, for angle prediction evaluation, this will result in the exact opposite direction.
242242

243-
Just think about a car. The yaw angle is the angle between the direction of the car front and the positive direction of the x-axis. If we add `` $$`\pi`$$ `` to this angle, the car front will become the car rear.
243+
Just think about a car. The yaw angle is the angle between the direction of the car front and the positive direction of the x-axis. If we add $\pi$ to this angle, the car front will become the car rear.
244244

245-
For categories such as barrier, the front and the rear have no difference, therefore a phase difference of `` $$`\pi`$$ `` will not affect the angle prediction score.
245+
For categories such as barrier, the front and the rear have no difference, therefore a phase difference of $\pi$ will not affect the angle prediction score.

0 commit comments

Comments
 (0)