Commit d1368b01 authored by Shaoshuai Shi's avatar Shaoshuai Shi
Browse files

update documents for OpenPCDet v0.5.0

parent 17133605
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
`OpenPCDet` is a clear, simple, self-contained open source project for LiDAR-based 3D object detection. `OpenPCDet` is a clear, simple, self-contained open source project for LiDAR-based 3D object detection.
It is also the official code release of [`[PointRCNN]`](https://arxiv.org/abs/1812.04244), [`[Part-A^2 net]`](https://arxiv.org/abs/1907.03670), [`[PV-RCNN]`](https://arxiv.org/abs/1912.13192) and [`[Voxel R-CNN]`](https://arxiv.org/abs/2012.15712). It is also the official code release of [`[PointRCNN]`](https://arxiv.org/abs/1812.04244), [`[Part-A2-Net]`](https://arxiv.org/abs/1907.03670), [`[PV-RCNN]`](https://arxiv.org/abs/1912.13192) and [`[Voxel R-CNN]`](https://arxiv.org/abs/2012.15712).
[2021-12-01] **NEW**: `OpenPCDet` has been updated to `v0.5.0`. **NEW**: `OpenPCDet` has been updated to `v0.5.0` (Dec. 2021).
## Overview ## Overview
- [Changelog](#changelog) - [Changelog](#changelog)
...@@ -130,7 +130,7 @@ By default, all models are trained with **20% data (~32k frames)** of all the tr ...@@ -130,7 +130,7 @@ By default, all models are trained with **20% data (~32k frames)** of all the tr
|---------------------------------------------|----------:|:-------:|:-------:|:-------:|:-------:|:-------:| |---------------------------------------------|----------:|:-------:|:-------:|:-------:|:-------:|:-------:|
| [SECOND](tools/cfgs/waymo_models/second.yaml) | 70.96/70.34|62.58/62.02|65.23/54.24 |57.22/47.49| 57.13/55.62 | 54.97/53.53 | | [SECOND](tools/cfgs/waymo_models/second.yaml) | 70.96/70.34|62.58/62.02|65.23/54.24 |57.22/47.49| 57.13/55.62 | 54.97/53.53 |
| [CenterPoint](tools/cfgs/waymo_models/centerpoint_without_resnet.yaml)| 71.33/70.76|63.16/62.65| 72.09/65.49 |64.27/58.23| 68.68/67.39 |66.11/64.87| | [CenterPoint](tools/cfgs/waymo_models/centerpoint_without_resnet.yaml)| 71.33/70.76|63.16/62.65| 72.09/65.49 |64.27/58.23| 68.68/67.39 |66.11/64.87|
| [CenterPoint(ResNet)](tools/cfgs/waymo_models/centerpoint.yaml)|72.76/72.23|64.91/64.42 |74.19/67.96 |66.03/60.34| 71.04/69.79 |68.49/67.28 | | [CenterPoint (ResNet)](tools/cfgs/waymo_models/centerpoint.yaml)|72.76/72.23|64.91/64.42 |74.19/67.96 |66.03/60.34| 71.04/69.79 |68.49/67.28 |
| [Part-A2-Anchor](tools/cfgs/waymo_models/PartA2.yaml) | 74.66/74.12 |65.82/65.32 |71.71/62.24 |62.46/54.06 |66.53/65.18 |64.05/62.75 | | [Part-A2-Anchor](tools/cfgs/waymo_models/PartA2.yaml) | 74.66/74.12 |65.82/65.32 |71.71/62.24 |62.46/54.06 |66.53/65.18 |64.05/62.75 |
| [PV-RCNN (AnchorHead)](tools/cfgs/waymo_models/pv_rcnn.yaml) | 75.41/74.74 |67.44/66.80 |71.98/61.24 |63.70/53.95 |65.88/64.25 |63.39/61.82 | | [PV-RCNN (AnchorHead)](tools/cfgs/waymo_models/pv_rcnn.yaml) | 75.41/74.74 |67.44/66.80 |71.98/61.24 |63.70/53.95 |65.88/64.25 |63.39/61.82 |
| [PV-RCNN (CenterHead)](tools/cfgs/waymo_models/pv_rcnn_with_centerhead_rpn.yaml) | 75.95/75.43 |68.02/67.54 |75.94/69.40 |67.66/61.62 |70.18/68.98 |67.73/66.57| | [PV-RCNN (CenterHead)](tools/cfgs/waymo_models/pv_rcnn_with_centerhead_rpn.yaml) | 75.95/75.43 |68.02/67.54 |75.94/69.40 |67.66/61.62 |70.18/68.98 |67.73/66.57|
...@@ -149,7 +149,7 @@ All models are trained with 8 GTX 1080Ti GPUs and are available for download. ...@@ -149,7 +149,7 @@ All models are trained with 8 GTX 1080Ti GPUs and are available for download.
### Other datasets ### Other datasets
More datasets are on the way. Welcome to support other datasets by submitting pull request.
## Installation ## Installation
......
...@@ -6,8 +6,11 @@ We suppose you already followed the [INSTALL.md](INSTALL.md) to install the `Ope ...@@ -6,8 +6,11 @@ We suppose you already followed the [INSTALL.md](INSTALL.md) to install the `Ope
1. Download the provided pretrained models as shown in the [README.md](../README.md). 1. Download the provided pretrained models as shown in the [README.md](../README.md).
2. Make sure you have already installed the `mayavi` visualization tools. If not, you could install it as follows: 2. Make sure you have already installed the [`Open3D`](https://github.com/isl-org/Open3D) (faster) or `mayavi` visualization tools.
If not, you could install it as follows:
``` ```
pip install open3d
# or
pip install mayavi pip install mayavi
``` ```
......
...@@ -71,11 +71,14 @@ OpenPCDet ...@@ -71,11 +71,14 @@ OpenPCDet
│ │ │── raw_data │ │ │── raw_data
│ │ │ │── segment-xxxxxxxx.tfrecord │ │ │ │── segment-xxxxxxxx.tfrecord
| | | |── ... | | | |── ...
| | |── waymo_processed_data | | |── waymo_processed_data_v0_5_0
│ │ │ │── segment-xxxxxxxx/ │ │ │ │── segment-xxxxxxxx/
| | | |── ... | | | |── ...
│ │ │── pcdet_gt_database_train_sampled_xx/ │ │ │── waymo_processed_data_v0_5_0_gt_database_train_sampled_1/
│ │ │── pcdet_waymo_dbinfos_train_sampled_xx.pkl │ │ │── waymo_processed_data_v0_5_0_waymo_dbinfos_train_sampled_1.pkl
│ │ │── waymo_processed_data_v0_5_0_gt_database_train_sampled_1_global.npy (optional)
│ │ │── waymo_processed_data_v0_5_0_infos_train.pkl (optional)
│ │ │── waymo_processed_data_v0_5_0_infos_val.pkl (optional)
├── pcdet ├── pcdet
├── tools ├── tools
``` ```
...@@ -87,7 +90,7 @@ pip3 install waymo-open-dataset-tf-2-0-0==1.2.0 --user ...@@ -87,7 +90,7 @@ pip3 install waymo-open-dataset-tf-2-0-0==1.2.0 --user
``` ```
* Extract point cloud data from tfrecord and generate data infos by running the following command (it takes several hours, * Extract point cloud data from tfrecord and generate data infos by running the following command (it takes several hours,
and you could refer to `data/waymo/waymo_processed_data` to see how many records that have been processed): and you could refer to `data/waymo/waymo_processed_data_v0_5_0` to see how many records that have been processed):
```python ```python
python -m pcdet.datasets.waymo.waymo_dataset --func create_waymo_infos \ python -m pcdet.datasets.waymo.waymo_dataset --func create_waymo_infos \
--cfg_file tools/cfgs/dataset_configs/waymo_dataset.yaml --cfg_file tools/cfgs/dataset_configs/waymo_dataset.yaml
...@@ -96,7 +99,7 @@ python -m pcdet.datasets.waymo.waymo_dataset --func create_waymo_infos \ ...@@ -96,7 +99,7 @@ python -m pcdet.datasets.waymo.waymo_dataset --func create_waymo_infos \
Note that you do not need to install `waymo-open-dataset` if you have already processed the data before and do not need to evaluate with official Waymo Metrics. Note that you do not need to install `waymo-open-dataset` if you have already processed the data before and do not need to evaluate with official Waymo Metrics.
## Pretrained Models ## Pretrained Models
If you would like to train [CaDDN](../tools/cfgs/kitti_models/CaDDN.yaml), download the pretrained [DeepLabV3 model](https://download.pytorch.org/models/deeplabv3_resnet101_coco-586e9e4e.pth) and place within the `checkpoints` directory If you would like to train [CaDDN](../tools/cfgs/kitti_models/CaDDN.yaml), download the pretrained [DeepLabV3 model](https://download.pytorch.org/models/deeplabv3_resnet101_coco-586e9e4e.pth) and place within the `checkpoints` directory. Please make sure the [kornia](https://github.com/kornia/kornia) is installed since it is needed for `CaDDN`.
``` ```
OpenPCDet OpenPCDet
├── checkpoints ├── checkpoints
......
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
### Requirements ### Requirements
All the codes are tested in the following environment: All the codes are tested in the following environment:
* Linux (tested on Ubuntu 14.04/16.04) * Linux (tested on Ubuntu 14.04/16.04/18.04/20.04/21.04)
* Python 3.6+ * Python 3.6+
* PyTorch 1.1 or higher (tested on PyTorch 1.1, 1,3, 1,5) * PyTorch 1.1 or higher (tested on PyTorch 1.1, 1,3, 1,5~1.10)
* CUDA 9.0 or higher (PyTorch 1.3+ needs CUDA 9.2+) * CUDA 9.0 or higher (PyTorch 1.3+ needs CUDA 9.2+)
* [`spconv v1.0 (commit 8da6f96)`](https://github.com/traveller59/spconv/tree/8da6f967fb9a054d8870c3515b1b44eca2103634) or [`spconv v1.2`](https://github.com/traveller59/spconv) * [`spconv v1.0 (commit 8da6f96)`](https://github.com/traveller59/spconv/tree/8da6f967fb9a054d8870c3515b1b44eca2103634) or [`spconv v1.2`](https://github.com/traveller59/spconv) or [`spconv v2.x`](https://github.com/traveller59/spconv)
### Install `pcdet v0.3` ### Install `pcdet v0.5`
NOTE: Please re-install `pcdet v0.3` by running `python setup.py develop` even if you have already installed previous version. NOTE: Please re-install `pcdet v0.5` by running `python setup.py develop` even if you have already installed previous version.
a. Clone this repository. a. Clone this repository.
```shell ```shell
...@@ -19,16 +19,20 @@ git clone https://github.com/open-mmlab/OpenPCDet.git ...@@ -19,16 +19,20 @@ git clone https://github.com/open-mmlab/OpenPCDet.git
b. Install the dependent libraries as follows: b. Install the dependent libraries as follows:
* Install the dependent python libraries: [comment]: <> (* Install the dependent python libraries: )
```
pip install -r requirements.txt [comment]: <> (```)
```
[comment]: <> (pip install -r requirements.txt )
[comment]: <> (```)
* Install the SparseConv library, we use the implementation from [`[spconv]`](https://github.com/traveller59/spconv). * Install the SparseConv library, we use the implementation from [`[spconv]`](https://github.com/traveller59/spconv).
* 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. * 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.
* 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+. * 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+.
* You could also install latest `spconv v2.x` with pip, see the official documents of [spconv](https://github.com/traveller59/spconv).
c. Install this `pcdet` library by running the following command:
c. Install this `pcdet` library and its dependent libraries by running the following command:
```shell ```shell
python setup.py develop python setup.py develop
``` ```
import os import os
import sys
import subprocess import subprocess
from setuptools import find_packages, setup from setuptools import find_packages, setup
from setuptools.command.install import install
# TODO: This is a bit buggy since it requires torch before installing torch.
from torch.utils.cpp_extension import BuildExtension, CUDAExtension from torch.utils.cpp_extension import BuildExtension, CUDAExtension
...@@ -30,15 +27,6 @@ def write_version_to_file(version, target_file): ...@@ -30,15 +27,6 @@ def write_version_to_file(version, target_file):
print('__version__ = "%s"' % version, file=f) print('__version__ = "%s"' % version, file=f)
class PostInstallation(install):
"""Post-installation for installation mode."""
def run(self):
install.run(self)
# Note: buggy for kornia==0.5.3 and it will be fixed in the next version.
# Set kornia to 0.5.2 temporarily
subprocess.call([sys.executable, '-m', 'pip', 'install', 'kornia==0.5.2', '--no-dependencies'])
if __name__ == '__main__': if __name__ == '__main__':
version = '0.5.0+%s' % get_git_commit_number() version = '0.5.0+%s' % get_git_commit_number()
write_version_to_file(version, 'pcdet/version.py') write_version_to_file(version, 'pcdet/version.py')
...@@ -48,23 +36,24 @@ if __name__ == '__main__': ...@@ -48,23 +36,24 @@ if __name__ == '__main__':
version=version, version=version,
description='OpenPCDet is a general codebase for 3D object detection from point cloud', description='OpenPCDet is a general codebase for 3D object detection from point cloud',
install_requires=[ install_requires=[
'numpy', 'numpy<=1.20',
'torch>=1.1', 'llvmlite',
# 'spconv', # spconv has different names depending on the cuda version
'numba', 'numba',
'tensorboardX', 'tensorboardX',
'easydict', 'easydict',
'pyyaml' 'pyyaml',
'scikit-image',
'tqdm',
'SharedArray',
# 'spconv', # spconv has different names depending on the cuda version
], ],
author='Shaoshuai Shi', author='Shaoshuai Shi',
author_email='shaoshuaics@gmail.com', author_email='shaoshuaics@gmail.com',
license='Apache License 2.0', license='Apache License 2.0',
packages=find_packages(exclude=['tools', 'data', 'output']), packages=find_packages(exclude=['tools', 'data', 'output']),
cmdclass={ cmdclass={
'build_ext': BuildExtension, 'build_ext': BuildExtension,
'install': PostInstallation,
# Post installation cannot be done. ref: https://github.com/pypa/setuptools/issues/1936.
# 'develop': PostInstallation,
}, },
ext_modules=[ ext_modules=[
make_cuda_ext( make_cuda_ext(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment