Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix readme training example (issue: 639) #641

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,26 @@ Similar as for inference, pipelines provide an interface for training a model on
a dataset.

```python
import ml3d
from open3d import _ml3d
from ml3d.torch import RandLANet, SemanticSegmentation

dataset_path = "/media/nikste/SSD_030_06/semantic_kitti/"
cfg_path = "ml3d/configs/randlanet_semantickitti.yml"
# '/path/to/SemanticKITTI/'
cfg = _ml3d.utils.Config.load_from_file(cfg_path)
dataset = ml3d.datasets.SemanticKITTI(dataset_path=dataset_path, use_cache=True)

# create the model with random initialization.
model = RandLANet(**cfg.model)

pipeline = SemanticSegmentation(model=model, dataset=dataset, **cfg.pipeline)

# prints training progress in the console.
pipeline.run_train()



# use a cache for storing the results of the preprocessing (default path is './logs/cache')
dataset = ml3d.datasets.SemanticKITTI(dataset_path='/path/to/SemanticKITTI/', use_cache=True)

Expand Down
Loading