Skip to content

Commit

Permalink
Merge branch 'dev' into add-TUM-Facade-dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
ssheorey authored Dec 22, 2023
2 parents 10edcfc + 6f20459 commit cd60915
Show file tree
Hide file tree
Showing 27 changed files with 555 additions and 196 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/0-build-issue-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ body:
required: true
- label: "I have tested with the [latest development wheel](http://www.open3d.org/docs/latest/getting_started.html#development-version-pip)."
required: true
- label: "I have checked the [release documentation](http://www.open3d.org/docs/release/) and the [latest documentation](http://www.open3d.org/docs/latest/) (for `master` branch)."
- label: "I have checked the [release documentation](http://www.open3d.org/docs/release/) and the [latest documentation](http://www.open3d.org/docs/latest/) (for `main` branch)."
required: true

- type: textarea
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/1-bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ body:
required: true
- label: "I have tested with the [latest development wheel](http://www.open3d.org/docs/latest/getting_started.html#development-version-pip)."
required: true
- label: "I have checked the [release documentation](http://www.open3d.org/docs/release/) and the [latest documentation](http://www.open3d.org/docs/latest/) (for `master` branch)."
- label: "I have checked the [release documentation](http://www.open3d.org/docs/release/) and the [latest documentation](http://www.open3d.org/docs/latest/) (for `main` branch)."
required: true

- type: textarea
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/2-questions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ body:
required: true
- label: "I have tested with the [latest development wheel](http://www.open3d.org/docs/latest/getting_started.html#development-version-pip)."
required: true
- label: "I have checked the [release documentation](http://www.open3d.org/docs/release/) and the [latest documentation](http://www.open3d.org/docs/latest/) (for `master` branch)."
- label: "I have checked the [release documentation](http://www.open3d.org/docs/release/) and the [latest documentation](http://www.open3d.org/docs/latest/) (for `main` branch)."
required: true

- type: textarea
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/3-feature-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ body:
required: true
- label: "I have tested with the [latest development wheel](http://www.open3d.org/docs/latest/getting_started.html#development-version-pip)."
required: true
- label: "I have checked the [release documentation](http://www.open3d.org/docs/release/) and the [latest documentation](http://www.open3d.org/docs/latest/) (for `master` branch)."
- label: "I have checked the [release documentation](http://www.open3d.org/docs/release/) and the [latest documentation](http://www.open3d.org/docs/latest/) (for `main` branch)."
required: true

- type: textarea
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Style check
on:
workflow_dispatch:
push:
branches: [master, dev]
branches: [main, dev]
pull_request:
types: [opened, reopened, synchronize]

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Ubuntu CI
on:
workflow_dispatch:
push:
branches: [master, dev]
branches: [main, dev]
pull_request:
types: [opened, reopened, synchronize]

Expand All @@ -16,7 +16,7 @@ jobs:
NPROC: 2
steps:
- name: Checkout source code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup cache
uses: actions/cache@v3
with:
Expand All @@ -33,7 +33,7 @@ jobs:
- name: Set up Python version
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"
# Pre-installed packages: https://github.com/actions/runner-images/tree/main/images
- name: Install ccache
run: |
Expand Down
216 changes: 115 additions & 101 deletions README.md

Large diffs are not rendered by default.

57 changes: 23 additions & 34 deletions ci/run_ci.sh
Original file line number Diff line number Diff line change
@@ -1,54 +1,42 @@
#!/usr/bin/env bash
#
# The following environment variables are required:
# - NPROC
#
TENSORFLOW_VER="2.8.2"
TORCH_GLNX_VER="1.13.1+cpu"
# OPENVINO_DEV_VER="2021.4.2" # Numpy version conflict with TF 2.8.2
PIP_VER="21.1.1"
WHEEL_VER="0.38.4"
STOOLS_VER="67.3.2"
YAPF_VER="0.30.0"
PYTEST_VER="7.1.2"
PYTEST_RANDOMLY_VER="3.8.0"

set -euo pipefail

NPROC=${NPROC:?'env var must be set to number of available CPUs.'}
PIP_VER="23.2.1"

echo 1. Prepare the Open3D-ML repo and install dependencies
echo
export PATH_TO_OPEN3D_ML=$(pwd)
# the build system of the main repo expects a master branch. make sure master exists
git checkout -b master || true
python -m pip install -U pip==$PIP_VER \
wheel=="$WHEEL_VER" \
setuptools=="$STOOLS_VER" \
yapf=="$YAPF_VER" \
pytest=="$PYTEST_VER" \
pytest-randomly=="$PYTEST_RANDOMLY_VER"

python -m pip install -r requirements.txt
echo $PATH_TO_OPEN3D_ML
export PATH_TO_OPEN3D_ML="$PWD"
echo "$PATH_TO_OPEN3D_ML"
# the build system of the main repo expects a main branch. make sure main exists
git checkout -b main || true
python -m pip install -U pip==$PIP_VER
python -m pip install -r requirements.txt \
-r requirements-torch.txt
# -r requirements-tensorflow.txt # TF disabled on Linux (Open3D PR#6288)
# -r requirements-openvino.txt # Numpy version conflict with TF 2.8.2
cd ..
python -m pip install -U Cython

echo 2. clone Open3D and install dependencies
echo
git clone --recursive --branch master https://github.com/isl-org/Open3D.git
git clone --branch main https://github.com/isl-org/Open3D.git

./Open3D/util/install_deps_ubuntu.sh assume-yes
python -m pip install -U tensorflow-cpu==$TENSORFLOW_VER \
torch==${TORCH_GLNX_VER} --extra-index-url https://download.pytorch.org/whl/cpu/
# openvino-dev=="$OPENVINO_DEV_VER"
python -m pip install -r Open3D/python/requirements.txt \
-r Open3D/python/requirements_style.txt \
-r Open3D/python/requirements_test.txt

echo 3. Configure for bundling the Open3D-ML part
echo
mkdir Open3D/build
pushd Open3D/build
# TF disabled on Linux (Open3D PR#6288)
cmake -DBUNDLE_OPEN3D_ML=ON \
-DOPEN3D_ML_ROOT=$PATH_TO_OPEN3D_ML \
-DOPEN3D_ML_ROOT="${PATH_TO_OPEN3D_ML}" \
-DGLIBCXX_USE_CXX11_ABI=OFF \
-DBUILD_TENSORFLOW_OPS=ON \
-DBUILD_TENSORFLOW_OPS=OFF \
-DBUILD_PYTORCH_OPS=ON \
-DBUILD_GUI=ON \
-DBUILD_UNIT_TESTS=OFF \
Expand All @@ -66,12 +54,13 @@ echo
popd
mkdir test_workdir
pushd test_workdir
mv $PATH_TO_OPEN3D_ML/tests .
mv "$PATH_TO_OPEN3D_ML/tests" .
echo Add --randomly-seed=SEED to the test command to reproduce test order.
python -m pytest tests

echo ... now do the same but in dev mode by setting OPEN3D_ML_ROOT
export OPEN3D_ML_ROOT=$PATH_TO_OPEN3D_ML
echo "... now do the same but in dev mode by setting OPEN3D_ML_ROOT"
echo
export OPEN3D_ML_ROOT="$PATH_TO_OPEN3D_ML"
echo Add --randomly-seed=SEED to the test command to reproduce test order.
python -m pytest tests
unset OPEN3D_ML_ROOT
Expand Down
47 changes: 47 additions & 0 deletions ml3d/configs/randlanet_pandaset.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
dataset:
name: Pandaset
dataset_path: path_to_dataset
cache_dir: ./logs/cache
test_result_folder: './logs/test'
training_split: [ '001', '002', '003', '005', '011', '013', '015', '016',
'017', '019', '021', '023', '024', '027', '028', '029',
'030', '032', '033', '034', '035', '037', '038', '039',
'040', '041', '042', '043', '044', '046', '052', '053',
'054', '056', '057', '058', '064', '065', '066', '067',
'070', '071', '072', '073', '077', '078', '080', '084',
'088', '089', '090', '094', '095', '097', '098', '101',
'102', '103', '105', '106', '109', '110', '112', '113'
]
test_split: ['115', '116', '117', '119', '120', '124', '139', '149', '158']
validation_split: ['122', '123']
use_cache: true
sampler:
name: 'SemSegRandomSampler'
model:
name: RandLANet
batcher: DefaultBatcher
num_classes: 39
num_points: 81920
num_neighbors: 16
framework: torch
num_layers: 4
ignored_label_inds: [0]
sub_sampling_ratio: [4, 4, 4, 4]
in_channels: 3
dim_features: 8
dim_output: [16, 64, 128, 256]
grid_size: 0.06
pipeline:
name: SemanticSegmentation
max_epoch: 50
save_ckpt_freq: 5
device: gpu
optimizer:
lr: 0.001
batch_size: 4
main_log_dir: './logs'
logs_dir: './logs'
scheduler_gamma: 0.9886
test_batch_size: 2
train_sum_dir: './logs/training_log'
val_batch_size: 2
8 changes: 5 additions & 3 deletions ml3d/datasets/kitti.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,11 @@ def __len__(self):

def get_data(self, idx):
pc_path = self.path_list[idx]
label_path = pc_path.replace('velodyne',
'label_2').replace('.bin', '.txt')
calib_path = label_path.replace('label_2', 'calib')

# Replace the last instance of "velodyne" in the path by label_2, and the '.bin' by '.txt'
label_path = ("label_2".join(pc_path.rsplit("velodyne", 1))).replace(
'.bin', '.txt')
calib_path = "calib".join(label_path.rsplit("label_2", 1))

pc = self.dataset.read_lidar(pc_path)
calib = self.dataset.read_calib(calib_path)
Expand Down
3 changes: 2 additions & 1 deletion ml3d/datasets/matterport_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,8 @@ def __len__(self):

def get_data(self, idx):
pc_path = self.path_list[idx]
label_path = pc_path.replace('pc', 'boxes').replace('.bin', '.txt')
label_path = ("boxes".join(pc_path.rsplit("pc",
1))).replace('.bin', '.txt')

pc = self.dataset.read_lidar(pc_path)
label = self.dataset.read_label(label_path)
Expand Down
Loading

0 comments on commit cd60915

Please sign in to comment.