Skip to content

Commit 6123f52

Browse files
committed
Support kornia v0.7 and above
* kornia v0.7+ deprecated the XYZW quaternion coefficient order * Related PR: kornia/kornia#2437 open-mmlab#1722 * Optimize docs
1 parent 09fa9bc commit 6123f52

File tree

3 files changed

+21
-15
lines changed

3 files changed

+21
-15
lines changed

docs/INSTALL.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,10 @@ git clone https://github.com/open-mmlab/OpenPCDet.git
1919

2020
b. Install the dependent libraries as follows:
2121

22-
[comment]: <> (* Install the dependent python libraries: )
23-
24-
[comment]: <> (```)
25-
26-
[comment]: <> (pip install -r requirements.txt )
27-
28-
[comment]: <> (```)
29-
22+
* Install the dependent python libraries:
23+
```shell
24+
pip install -r requirements.txt --upgrade
25+
```
3026
* Install the SparseConv library, we use the implementation from [`[spconv]`](https://github.com/traveller59/spconv).
3127
* If you use PyTorch 1.1, then make sure you install the `spconv v1.0` with ([commit 8da6f96](https://github.com/traveller59/spconv/tree/8da6f967fb9a054d8870c3515b1b44eca2103634)) instead of the latest one.
3228
* If you use PyTorch 1.3+, then you need to install the `spconv v1.2`. As mentioned by the author of [`spconv`](https://github.com/traveller59/spconv), you need to use their docker if you use PyTorch 1.4+.
@@ -38,10 +34,24 @@ pip install -e .
3834
```
3935
* To build the wheel only, run the following command:
4036
```shell
37+
pip wheel . -w whl --no-deps --extra-index-url https://download.pytorch.org/whl/${CUDA_VERSION}
38+
```
39+
You can find the latest `CUDA_VERSION` from [PyTorch](https://pytorch.org/get-started/locally/). In case you want to build the wheel with `build` package:
40+
```shell
4141
pip install build
4242
python -m build --wheel
4343
```
44+
The usage of `pip wheel` is preferred, as the `build` package does not support `--extra-index-url` option. So if you have installed PyTorch with the extra index above, `pip wheel` can use cached packages to speed up the building process, but `build` will download PyTorch from PyPI, which is much slower and may cause version mismatch, unless you build the package in the current environment:
45+
```shell
46+
# For pip wheel
47+
pip wheel . -w whl --no-deps --no-build-isolation
48+
# For build
49+
python -m build --wheel --no-isolation
50+
```
4451
* To install the built wheel, run the following command:
4552
```shell
53+
# For pip wheel
54+
pip install whl/*.whl
55+
# For build
4656
pip install dist/*.whl
4757
```

pcdet/datasets/argo2/argo2_utils/so3.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ def quat_to_mat(quat_wxyz: Tensor) -> Tensor:
1616
Returns:
1717
(...,3,3) 3D rotation matrices.
1818
"""
19-
return C.quaternion_to_rotation_matrix(
20-
quat_wxyz, order=C.QuaternionCoeffOrder.WXYZ
21-
)
19+
return C.quaternion_to_rotation_matrix(quat_wxyz)
2220

2321

2422
# @torch.jit.script
@@ -31,9 +29,7 @@ def mat_to_quat(mat: Tensor) -> Tensor:
3129
Returns:
3230
(...,4) Scalar first quaternions.
3331
"""
34-
return C.rotation_matrix_to_quaternion(
35-
mat, order=C.QuaternionCoeffOrder.WXYZ
36-
)
32+
return C.rotation_matrix_to_quaternion(mat)
3733

3834

3935
@torch.jit.script

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ torchvision
1111
SharedArray
1212
opencv-python
1313
pyquaternion
14-
kornia<0.7
14+
kornia>=0.7
1515
ninja
1616
av2

0 commit comments

Comments
 (0)