Skip to content

Commit 7196c76

Browse files
authored
Merge dev to master for Open3D 0.17 release. (#586)
2 parents 643e15c + f28224e commit 7196c76

28 files changed

+155
-78
lines changed

README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ respective requirements files:
4646
```bash
4747
# To install a compatible version of TensorFlow
4848
pip install -r requirements-tensorflow.txt
49-
# To install a compatible version of PyTorch with CUDA
49+
# To install a compatible version of PyTorch
50+
pip install -r requirements-torch.txt
51+
# To install a compatible version of PyTorch with CUDA on Linux
5052
pip install -r requirements-torch-cuda.txt
5153
```
5254

@@ -338,15 +340,17 @@ The table shows the available models and datasets for the segmentation task and
338340
For the task of object detection, we measure the performance of different methods using the mean average precision (mAP) for bird's eye view (BEV) and 3D.
339341
The table shows the available models and datasets for the object detection task and the respective scores. Each score links to the respective weight file.
340342
For the evaluation, the models were evaluated using the validation subset, according to KITTI's validation criteria. The models were trained for three classes (car, pedestrian and cyclist). The calculated values are the mean value over the mAP of all classes for all difficulty levels.
343+
For the Waymo dataset, the models were trained on three classes (pedestrian, vehicle, cyclist).
341344

342345

343-
| Model / Dataset | KITTI [BEV / 3D] @ 0.70|
344-
|--------------------|---------------|
345-
| PointPillars (tf) | [61.6 / 55.2](https://storage.googleapis.com/open3d-releases/model-zoo/pointpillars_kitti_202012221652utc.zip) |
346-
| PointPillars (torch) | [61.2 / 52.8](https://storage.googleapis.com/open3d-releases/model-zoo/pointpillars_kitti_202012221652utc.pth) |
347-
| PointRCNN (tf) | [78.2 / 65.9](https://storage.googleapis.com/open3d-releases/model-zoo/pointrcnn_kitti_202105071146utc.zip) |
348-
| PointRCNN (torch) | [78.2 / 65.9](https://storage.googleapis.com/open3d-releases/model-zoo/pointrcnn_kitti_202105071146utc.pth) |
346+
| Model / Dataset | KITTI [BEV / 3D] @ 0.70| Waymo (BEV / 3D) @ 0.50 |
347+
|--------------------|------------------------|------------------|
348+
| PointPillars (tf) | [61.6 / 55.2](https://storage.googleapis.com/open3d-releases/model-zoo/pointpillars_kitti_202012221652utc.zip) | - |
349+
| PointPillars (torch) | [61.2 / 52.8](https://storage.googleapis.com/open3d-releases/model-zoo/pointpillars_kitti_202012221652utc.pth) | avg: 61.01 / 48.30 \| [best: 61.47 / 57.55](https://storage.googleapis.com/open3d-releases/model-zoo/pointpillars_waymo_202211200158utc_seed2_gpu16.pth) [^wpp-train] |
350+
| PointRCNN (tf) | [78.2 / 65.9](https://storage.googleapis.com/open3d-releases/model-zoo/pointrcnn_kitti_202105071146utc.zip) | - |
351+
| PointRCNN (torch) | [78.2 / 65.9](https://storage.googleapis.com/open3d-releases/model-zoo/pointrcnn_kitti_202105071146utc.pth) | - |
349352

353+
[^wpp-train]: The avg. metrics are the average of three sets of training runs with 4, 8, 16 and 32 GPUs. Training was for halted after 30 epochs. Model checkpoint is available for the best training run.
350354

351355
#### Training PointRCNN
352356

@@ -402,6 +406,7 @@ For downloading these datasets visit the respective webpages and have a look at
402406
* [Visualize custom data](docs/howtos.md#visualize-custom-data)
403407
* [Adding a new model](docs/howtos.md#adding-a-new-model)
404408
* [Adding a new dataset](docs/howtos.md#adding-a-new-dataset)
409+
* [Distributed training](docs/howtos.md#distributed-training)
405410
* [Visualize and compare input data, ground truth and results in TensorBoard](docs/tensorboard.md)
406411
* [Inference with Intel OpenVINO](docs/openvino.md)
407412

ci/run_ci.sh

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
# - NPROC
55
#
66
TENSORFLOW_VER="2.8.2"
7-
TORCH_GLNX_VER="1.12.0+cpu"
7+
TORCH_GLNX_VER="1.13.1+cpu"
88
# OPENVINO_DEV_VER="2021.4.2" # Numpy version conflict with TF 2.8.2
99
PIP_VER="21.1.1"
10-
WHEEL_VER="0.37.1"
11-
STOOLS_VER="50.3.2"
10+
WHEEL_VER="0.38.4"
11+
STOOLS_VER="67.3.2"
1212
YAPF_VER="0.30.0"
1313
PYTEST_VER="7.1.2"
1414
PYTEST_RANDOMLY_VER="3.8.0"
@@ -21,11 +21,11 @@ export PATH_TO_OPEN3D_ML=$(pwd)
2121
# the build system of the main repo expects a master branch. make sure master exists
2222
git checkout -b master || true
2323
python -m pip install -U pip==$PIP_VER \
24-
wheel=="$WHEEL_VER" \
25-
setuptools=="$STOOLS_VER" \
26-
yapf=="$YAPF_VER" \
27-
pytest=="$PYTEST_VER" \
28-
pytest-randomly=="$PYTEST_RANDOMLY_VER"
24+
wheel=="$WHEEL_VER" \
25+
setuptools=="$STOOLS_VER" \
26+
yapf=="$YAPF_VER" \
27+
pytest=="$PYTEST_VER" \
28+
pytest-randomly=="$PYTEST_RANDOMLY_VER"
2929

3030
python -m pip install -r requirements.txt
3131
echo $PATH_TO_OPEN3D_ML
@@ -38,23 +38,23 @@ git clone --recursive --branch master https://github.com/isl-org/Open3D.git
3838

3939
./Open3D/util/install_deps_ubuntu.sh assume-yes
4040
python -m pip install -U tensorflow-cpu==$TENSORFLOW_VER \
41-
torch==${TORCH_GLNX_VER} --extra-index-url https://download.pytorch.org/whl/cpu/
41+
torch==${TORCH_GLNX_VER} --extra-index-url https://download.pytorch.org/whl/cpu/
4242
# openvino-dev=="$OPENVINO_DEV_VER"
4343

4444
echo 3. Configure for bundling the Open3D-ML part
4545
echo
4646
mkdir Open3D/build
4747
pushd Open3D/build
4848
cmake -DBUNDLE_OPEN3D_ML=ON \
49-
-DOPEN3D_ML_ROOT=$PATH_TO_OPEN3D_ML \
50-
-DGLIBCXX_USE_CXX11_ABI=OFF \
51-
-DBUILD_TENSORFLOW_OPS=ON \
52-
-DBUILD_PYTORCH_OPS=ON \
53-
-DBUILD_GUI=ON \
54-
-DBUILD_UNIT_TESTS=OFF \
55-
-DBUILD_BENCHMARKS=OFF \
56-
-DBUILD_EXAMPLES=OFF \
57-
..
49+
-DOPEN3D_ML_ROOT=$PATH_TO_OPEN3D_ML \
50+
-DGLIBCXX_USE_CXX11_ABI=OFF \
51+
-DBUILD_TENSORFLOW_OPS=ON \
52+
-DBUILD_PYTORCH_OPS=ON \
53+
-DBUILD_GUI=ON \
54+
-DBUILD_UNIT_TESTS=OFF \
55+
-DBUILD_BENCHMARKS=OFF \
56+
-DBUILD_EXAMPLES=OFF \
57+
..
5858

5959
echo 4. Build and install wheel
6060
echo

docs/howtos.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Second, we will construct the networks and pipelines, load the pretrained weight
2929
from ml3d.torch.models import RandLANet, KPFCNN
3030

3131
kpconv_url = "https://storage.googleapis.com/open3d-releases/model-zoo/kpconv_semantickitti_202009090354utc.pth"
32-
randlanet_url = "https://storage.googleapis.com/open3d-releases/model-zoo/randlanet_semantickitti_202009090354utc.pth"
32+
randlanet_url = "https://storage.googleapis.com/open3d-releases/model-zoo/randlanet_semantickitti_202201071330utc.pth"
3333

3434
ckpt_path = "./logs/vis_weights_{}.pth".format('RandLANet')
3535
if not exists(ckpt_path):
@@ -243,3 +243,18 @@ import open3d.ml.torch as ml3d
243243
model = ml3d.models.MyModel()
244244
dataset = ml3d.datasets.MyDataset()
245245
```
246+
247+
## Distributed training (preview)
248+
249+
Open3D-ML currently supports distributed training with PyTorch for object detection on Waymo with the PointPillars model. More comprehensive support for semantic segmentation models will follow shortly.
250+
251+
Distributed training uses the PyTorch Distributed Data Parallel (DDP) module and can be used to distribute training across multiple computer nodes, each with multiple GPUs. Here is a chart of per eopch runtime showing the speedup of sample runs with increasing number of GPUs. The training was run on a cluster containing 4 nodes with 8 RTX 3090 GPUs each.
252+
253+
- Dataset: Waymo v1.3
254+
- Model: PointPillars
255+
- GPU: RTX 3090
256+
- Batch size: 4 per GPU
257+
258+
![PointPillars training on Waymo per epoch training time with number of GPUs](https://user-images.githubusercontent.com/41028320/220750523-57075575-8cc7-4e40-99b0-a4e79995f1ec.png)
259+
260+
See [`scripts/train_scripts/pointpillars_waymo.sh`](../scripts/train_scripts/pointpillars_waymo.sh) for an example SLURM training script for distributed training on two nodes, using four GPUs on each node. The remaining configuration is read from the config file [`pointpillars_waymo.yml`](../ml3d/configs/pointpillars_waymo.yml).

examples/vis_pred.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def pred_custom_data(pc_names, pcs, pipeline_r, pipeline_k):
7777

7878
def get_torch_ckpts():
7979
kpconv_url = "https://storage.googleapis.com/open3d-releases/model-zoo/kpconv_semantickitti_202009090354utc.pth"
80-
randlanet_url = "https://storage.googleapis.com/open3d-releases/model-zoo/randlanet_semantickitti_202009090354utc.pth"
80+
randlanet_url = "https://storage.googleapis.com/open3d-releases/model-zoo/randlanet_semantickitti_202201071330utc.pth"
8181

8282
ckpt_path_r = example_dir + "/vis_weights_{}.pth".format('RandLANet')
8383
if not exists(ckpt_path_r):
@@ -95,7 +95,7 @@ def get_torch_ckpts():
9595

9696
def get_tf_ckpts():
9797
kpconv_url = "https://storage.googleapis.com/open3d-releases/model-zoo/kpconv_semantickitti_202010021102utc.zip"
98-
randlanet_url = "https://storage.googleapis.com/open3d-releases/model-zoo/randlanet_semantickitti_202010091306.zip"
98+
randlanet_url = "https://storage.googleapis.com/open3d-releases/model-zoo/randlanet_semantickitti_202201071330utc.zip"
9999

100100
ckpt_path_dir = example_dir + "/vis_weights_{}".format('RandLANet')
101101
if not exists(ckpt_path_dir):

examples/visualize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def main():
164164
path = ensure_demo_data()
165165

166166
kpconv_url = "https://storage.googleapis.com/open3d-releases/model-zoo/kpconv_semantickitti_202009090354utc.pth"
167-
randlanet_url = "https://storage.googleapis.com/open3d-releases/model-zoo/randlanet_semantickitti_202009090354utc.pth"
167+
randlanet_url = "https://storage.googleapis.com/open3d-releases/model-zoo/randlanet_semantickitti_202201071330utc.pth"
168168
ckpt_path = "../dataset/checkpoints/vis_weights_{}.pth".format(
169169
args.model)
170170

ml3d/tf/modules/pointnet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def __init__(self):
9393
def call(self, xyz, features=None, new_xyz=None, training=True):
9494
r"""
9595
:param xyz: (B, N, 3) tensor of the xyz coordinates of the features
96-
:param features: (B, N, C) tensor of the descriptors of the the features
96+
:param features: (B, N, C) tensor of the descriptors of the features
9797
:param new_xyz:
9898
:return:
9999
new_xyz: (B, npoint, 3) tensor of the new features' xyz

ml3d/tf/utils/pointnet/pointnet2_modules.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def __init__(self):
1717
def call(self, xyz, features=None, new_xyz=None, training=True):
1818
r"""
1919
:param xyz: (B, N, 3) tensor of the xyz coordinates of the features
20-
:param features: (B, N, C) tensor of the descriptors of the the features
20+
:param features: (B, N, C) tensor of the descriptors of the features
2121
:param new_xyz:
2222
:return:
2323
new_xyz: (B, npoint, 3) tensor of the new features' xyz

ml3d/torch/modules/pointnet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def forward(self,
122122
new_xyz=None) -> (torch.Tensor, torch.Tensor):
123123
r"""
124124
:param xyz: (B, N, 3) tensor of the xyz coordinates of the features
125-
:param features: (B, N, C) tensor of the descriptors of the the features
125+
:param features: (B, N, C) tensor of the descriptors of the features
126126
:param new_xyz:
127127
:return:
128128
new_xyz: (B, npoint, 3) tensor of the new features' xyz

ml3d/torch/utils/pointnet/pointnet2_modules.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def forward(self,
5050
r"""Forward.
5151
5252
:param xyz: (B, N, 3) tensor of the xyz coordinates of the features
53-
:param features: (B, N, C) tensor of the descriptors of the the features
53+
:param features: (B, N, C) tensor of the descriptors of the features
5454
:param new_xyz:
5555
:return:
5656
new_xyz: (B, npoint, 3) tensor of the new features' xyz

ml3d/utils/builder.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ def build_network(cfg):
1414
return build(cfg, NETWORK)
1515

1616

17-
def convert_device_name(framework, device_ids):
17+
def convert_device_name(device_type, device_ids):
1818
"""Convert device to either cpu or cuda."""
1919
gpu_names = ["gpu", "cuda"]
2020
cpu_names = ["cpu"]
21-
if framework not in cpu_names + gpu_names:
21+
if device_type not in cpu_names + gpu_names:
2222
raise KeyError("the device should either "
23-
"be cuda or cpu but got {}".format(framework))
23+
"be cuda or cpu but got {}".format(device_type))
2424
assert type(device_ids) is list
2525
device_ids_new = []
2626
for device in device_ids:
2727
device_ids_new.append(int(device))
2828

29-
if framework in gpu_names:
29+
if device_type in gpu_names:
3030
return "cuda", device_ids_new
3131
else:
3232
return "cpu", device_ids_new

0 commit comments

Comments
 (0)