Skip to content

Commit f7c4302

Browse files
authored
Update randlanet pretrained weight links.
2 parents 1c45bfe + f9ae864 commit f7c4302

File tree

11 files changed

+73
-65
lines changed

11 files changed

+73
-65
lines changed

.github/workflows/ubuntu.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ jobs:
1717
steps:
1818
- name: Checkout source code
1919
uses: actions/checkout@v2
20-
with:
21-
submodules: true
2220
- name: Setup cache
2321
uses: actions/cache@v2
2422
with:
@@ -35,7 +33,7 @@ jobs:
3533
- name: Set up Python version
3634
uses: actions/setup-python@v2
3735
with:
38-
python-version: 3.6
36+
python-version: "3.10"
3937
# Pre-installed 18.04 packages: https://git.io/JfHmW
4038
- name: Install ccache
4139
run: |

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ pipeline = ml3d.pipelines.SemanticSegmentation(model, dataset=dataset, device="g
137137
# download the weights.
138138
ckpt_folder = "./logs/"
139139
os.makedirs(ckpt_folder, exist_ok=True)
140-
ckpt_path = ckpt_folder + "randlanet_semantickitti_202009090354utc.pth"
141-
randlanet_url = "https://storage.googleapis.com/open3d-releases/model-zoo/randlanet_semantickitti_202009090354utc.pth"
140+
ckpt_path = ckpt_folder + "randlanet_semantickitti_202201071330utc.pth"
141+
randlanet_url = "https://storage.googleapis.com/open3d-releases/model-zoo/randlanet_semantickitti_202201071330utc.pth"
142142
if not os.path.exists(ckpt_path):
143143
cmd = "wget {} -O {}".format(randlanet_url, ckpt_path)
144144
os.system(cmd)

ci/run_ci.sh

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,14 @@
33
# The following environment variables are required:
44
# - NPROC
55
#
6-
TENSORFLOW_VER="2.5.2"
7-
TORCH_GLNX_VER="1.8.2+cpu"
6+
TENSORFLOW_VER="2.8.2"
7+
TORCH_GLNX_VER="1.12.0+cpu"
8+
# OPENVINO_DEV_VER="2021.4.2" # Numpy version conflict with TF 2.8.2
9+
PIP_VER="21.1.1"
10+
WHEEL_VER="0.37.1"
11+
STOOLS_VER="50.3.2"
812
YAPF_VER="0.30.0"
9-
PYTEST_VER="6.0.1"
13+
PYTEST_VER="7.1.2"
1014
PYTEST_RANDOMLY_VER="3.8.0"
1115

1216
set -euo pipefail
@@ -16,7 +20,14 @@ echo
1620
export PATH_TO_OPEN3D_ML=$(pwd)
1721
# the build system of the main repo expects a master branch. make sure master exists
1822
git checkout -b master || true
19-
pip install -r requirements.txt
23+
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"
29+
30+
python -m pip install -r requirements.txt
2031
echo $PATH_TO_OPEN3D_ML
2132
cd ..
2233
python -m pip install -U Cython
@@ -26,28 +37,25 @@ echo
2637
git clone --recursive --branch master https://github.com/isl-org/Open3D.git
2738

2839
./Open3D/util/install_deps_ubuntu.sh assume-yes
29-
python -m pip install -U tensorflow-cpu==$TENSORFLOW_VER
30-
python -m pip install -U torch==${TORCH_GLNX_VER} -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html
31-
python -m pip install -U pytest=="$PYTEST_VER" \
32-
pytest-randomly=="$PYTEST_RANDOMLY_VER"
33-
python -m pip install -U yapf=="$YAPF_VER"
34-
python -m pip install -U openvino-dev==2021.4.2
40+
python -m pip install -U tensorflow-cpu==$TENSORFLOW_VER \
41+
torch==${TORCH_GLNX_VER} --extra-index-url https://download.pytorch.org/whl/cpu/
42+
# openvino-dev=="$OPENVINO_DEV_VER"
3543

3644
echo 3. Configure for bundling the Open3D-ML part
3745
echo
3846
mkdir Open3D/build
3947
pushd Open3D/build
4048
cmake -DBUNDLE_OPEN3D_ML=ON \
41-
-DOPEN3D_ML_ROOT=$PATH_TO_OPEN3D_ML \
42-
-DGLIBCXX_USE_CXX11_ABI=OFF \
43-
-DBUILD_TENSORFLOW_OPS=ON \
44-
-DBUILD_PYTORCH_OPS=ON \
45-
-DBUILD_GUI=OFF \
46-
-DBUILD_RPC_INTERFACE=OFF \
47-
-DBUILD_UNIT_TESTS=OFF \
48-
-DBUILD_BENCHMARKS=OFF \
49-
-DBUILD_EXAMPLES=OFF \
50-
..
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=OFF \
54+
-DBUILD_RPC_INTERFACE=OFF \
55+
-DBUILD_UNIT_TESTS=OFF \
56+
-DBUILD_BENCHMARKS=OFF \
57+
-DBUILD_EXAMPLES=OFF \
58+
..
5159

5260
echo 4. Build and install wheel
5361
echo
@@ -60,12 +68,12 @@ popd
6068
mkdir test_workdir
6169
pushd test_workdir
6270
mv $PATH_TO_OPEN3D_ML/tests .
63-
echo Add --rondomly-seed=SEED to the test command to reproduce test order.
71+
echo Add --randomly-seed=SEED to the test command to reproduce test order.
6472
python -m pytest tests
6573

6674
echo ... now do the same but in dev mode by setting OPEN3D_ML_ROOT
6775
export OPEN3D_ML_ROOT=$PATH_TO_OPEN3D_ML
68-
echo Add --rondomly-seed=SEED to the test command to reproduce test order.
76+
echo Add --randomly-seed=SEED to the test command to reproduce test order.
6977
python -m pytest tests
7078
unset OPEN3D_ML_ROOT
7179

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):

ml3d/datasets/matterport_objects.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99
from ..utils import DATASET
1010
from .utils import BEVBox3D
1111

12-
logging.basicConfig(
13-
level=logging.INFO,
14-
format='%(levelname)s - %(asctime)s - %(module)s - %(message)s',
15-
)
1612
log = logging.getLogger(__name__)
1713

1814

ml3d/tf/models/randlanet.py

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,26 @@
1111

1212

1313
class RandLANet(BaseModel):
14-
"""Class defining RandLANet, a Semantic Segmentation model.
15-
Based on the architecture
16-
https://arxiv.org/abs/1911.11236#
14+
"""Class defining RandLANet, a Semantic Segmentation model. Based on the
15+
architecture from the paper `RandLA-Net: Efficient Semantic Segmentation of
16+
Large-Scale Point Clouds <https://arxiv.org/abs/1911.11236>`__.
1717
18-
Reference Implementation - https://github.com/QingyongHu/RandLA-Net
18+
RandLA-Net is an efficient and lightweight neural architecture which
19+
directly infer per-point semantics for large-scale point clouds. The key
20+
approach is to use random point sampling instead of more complex point
21+
selection approaches. Although remarkably computation and memory
22+
efficient, random sampling can discard key features by chance. To overcome
23+
this, we introduce a novel local feature aggregation module to
24+
progressively increase the receptive field for each 3D point, thereby
25+
effectively preserving geometric details.
1926
20-
RandLA-Net is an efficient and lightweight neural architecture which directly infer
21-
per-point semantics for large-scale point clouds. The key approach is to use random
22-
point sampling instead of more complex point selection approaches. Although
23-
remarkably computation and memory efficient, random sampling can discard key features
24-
by chance. To overcome this, we introduce a novel local feature aggregation module to
25-
progressively increase the receptive field for each 3D point, thereby effectively
26-
preserving geometric details.
27+
**Architecture**
2728
28-
Architecture
2929
.. image:: https://user-images.githubusercontent.com/23613902/150006228-34fb9e04-76b6-4022-af08-c308da6dcaae.png
30+
:width: 100%
3031
32+
References:
33+
https://github.com/QingyongHu/RandLA-Net
3134
"""
3235

3336
def __init__(

ml3d/torch/dataloaders/default_batcher.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import torch
21
import re
3-
import collections.abc
4-
from torch._six import string_classes
2+
import collections
3+
import torch
54

5+
container_abcs = collections.abc
6+
string_classes = (str, bytes)
67
np_str_obj_array_pattern = re.compile(r'[SaUO]')
78

89

ml3d/torch/models/randlanet.py

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,26 @@
1515

1616

1717
class RandLANet(BaseModel):
18-
"""Class defining RandLANet, a Semantic Segmentation model.
19-
Based on the architecture
20-
https://arxiv.org/abs/1911.11236#
18+
"""Class defining RandLANet, a Semantic Segmentation model. Based on the
19+
architecture from the paper `RandLA-Net: Efficient Semantic Segmentation of
20+
Large-Scale Point Clouds <https://arxiv.org/abs/1911.11236>`__.
2121
22-
Reference Implementation - https://github.com/QingyongHu/RandLA-Net
22+
RandLA-Net is an efficient and lightweight neural architecture which
23+
directly infer per-point semantics for large-scale point clouds. The key
24+
approach is to use random point sampling instead of more complex point
25+
selection approaches. Although remarkably computation and memory
26+
efficient, random sampling can discard key features by chance. To overcome
27+
this, we introduce a novel local feature aggregation module to
28+
progressively increase the receptive field for each 3D point, thereby
29+
effectively preserving geometric details.
2330
24-
RandLA-Net is an efficient and lightweight neural architecture which directly infer
25-
per-point semantics for large-scale point clouds. The key approach is to use random
26-
point sampling instead of more complex point selection approaches. Although
27-
remarkably computation and memory efficient, random sampling can discard key features
28-
by chance. To overcome this, we introduce a novel local feature aggregation module to
29-
progressively increase the receptive field for each 3D point, thereby effectively
30-
preserving geometric details.
31+
**Architecture**
3132
32-
Architecture
3333
.. image:: https://user-images.githubusercontent.com/23613902/150006228-34fb9e04-76b6-4022-af08-c308da6dcaae.png
34+
:width: 100%
3435
36+
References:
37+
https://github.com/QingyongHu/RandLA-Net
3538
"""
3639

3740
def __init__(

requirements-torch.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
--extra-index-url https://download.pytorch.org/whl/torch/
1+
--extra-index-url https://download.pytorch.org/whl/cpu/
22
torch==1.12.0+cpu ; sys_platform != 'darwin'
33
torchvision==0.13.0+cpu ; sys_platform != 'darwin'
44
torch==1.12.0 ; sys_platform == 'darwin'

scripts/download_datasets/download_semantic3d.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,5 @@ mv $BASE_DIR/station1_xyz_intensity_rgb.txt $BASE_DIR/neugasse_station1_xyz_inte
5858

5959
# cleanup
6060
mkdir -p $BASE_DIR/zip_files
61-
mv *.7z $BASE_DIR/zip_files
61+
mv $BASE_DIR/*.7z $BASE_DIR/zip_files
6262

0 commit comments

Comments
 (0)