Skip to content

Commit

Permalink
Merge pull request #12 from DSD-DBS/new_docs
Browse files Browse the repository at this point in the history
Update Docs
  • Loading branch information
unexcellent authored Dec 2, 2024
2 parents 9ea9e29 + 2adc73c commit d32f3bb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
SPDX-License-Identifier: Apache-2.0
===================
2 Validating Scenes
1 Validating Scenes
===================

Motivation
Expand All @@ -17,12 +17,14 @@ For the validation you need 2 things: the scene and the project specific ontholo
The onthology should be provided by your project partner. It is a .yaml-file listing all classes and their attributes.

.. code-block:: python
import json
from pathlib import Path
from raillabel_providerkit import validate
import raillabel
scene = raillabel.load("path/to/scene.json")
with Path("path/to/scene.json").open() as scene_file:
scene_dict = json.load(scene_file)
assert validate(scene, "path/to/onthology.yaml") == []
assert validate(scene_dict) == []
If this code does not raise any errors, you are good to go. If it does, read the content of the list `validate` returns carefully. It should tell you where the errors are. If you are unsure, contact your project partner or raise an issue on GitHub.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
SPDX-License-Identifier: Apache-2.0
=============================
1 Converting Annotation Files
2 Converting Annotation Files
=============================

Many annotation providers have their own proprietary format, that they use internally. If the project requirements demand the delivery of the data in the RailLabel format, then the `raillabel_providerkit.convert()` method can support you with that.
Expand Down

0 comments on commit d32f3bb

Please sign in to comment.