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

docs: split "label_format.rst" according to different label types #982

Merged
merged 1 commit into from
Sep 3, 2021
Merged
Show file tree
Hide file tree
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
18 changes: 9 additions & 9 deletions docs/source/advanced_features/fusion_dataset/CADC.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
This topic describes how to manage the "CADC" dataset.

"CADC" is a fusion dataset with 8 :ref:`sensors<advanced_features/fusion_dataset/fusion_dataset_structure:sensor>` including 7 :class:`cameras<tensorbay.sensor.sensor.Camera>` and 1 :class:`lidar<tensorbay.sensor.sensor.Lidar>`
, and has :ref:`reference/label_format:Box3D` type of labels on the point cloud data.
, and has :ref:`reference/label_format/Box3D:Box3D` type of labels on the point cloud data.
graczhual marked this conversation as resolved.
Show resolved Hide resolved
(:numref:`Fig. %s <example-cadc>`).
See `this page <https://gas.graviti.cn/dataset/hello-dataset/CADC>`_ for more details about this dataset.

Expand Down Expand Up @@ -68,8 +68,8 @@ Write the Catalog
The first step is to write the :ref:`reference/dataset_structure:Catalog`.
Catalog is a json file contains all label information of one dataset.
See :ref:`this page <reference/dataset_structure:Catalog>` for more details.
The only annotation type for "CADC" is :ref:`reference/label_format:Box3D`, and there are 10
:ref:`reference/label_format:Category` types and 9 :ref:`reference/label_format:Attributes` types.
The only annotation type for "CADC" is :ref:`reference/label_format/Box3D:Box3D`, and there are 10
:ref:`reference/label_format/CommonLabelProperties:Category` types and 9 :ref:`reference/label_format/CommonLabelProperties:Attributes` types.

.. literalinclude:: ../../../../tensorbay/opendataset/CADC/catalog.json
:language: json
Expand Down Expand Up @@ -153,8 +153,8 @@ After adding the sensors to the fusion segments, the frames should be added into
Each frame contains the data corresponding to each sensor, and each data should be added to the frame under the key of sensor name(L147).

In fusion datasets, it is common that not all data have labels.
In "CADC", only point cloud files(Lidar data) have :ref:`reference/label_format:Box3D` type of labels(L145).
See :ref:`this page <reference/label_format:Box3D>` for more details about Box3D annotation details.
In "CADC", only point cloud files(Lidar data) have :ref:`reference/label_format/Box3D:Box3D` type of labels(L145).
See :ref:`this page <reference/label_format/Box3D:Box3D>` for more details about Box3D annotation details.

.. note::
The :ref:`CADC dataloader <cadc-dataloader>` above uses relative import(L16-L19).
Expand Down Expand Up @@ -257,7 +257,7 @@ You can get each data by the corresponding sensor name.

In "CADC", only :ref:`data<advanced_features/fusion_dataset/fusion_dataset_structure:data in fusion dataset>`
under :class:`~tensorbay.sensor.sensor.Lidar`
has a sequence of :ref:`reference/label_format:Box3D` annotations.
has a sequence of :ref:`reference/label_format/Box3D:Box3D` annotations.
You can get one by index.

.. literalinclude:: ../../../../docs/code/CADC.py
Expand All @@ -266,12 +266,12 @@ You can get one by index.
:end-before: """"""

There is only one label type in "CADC" dataset, which is ``box3d``.
The information stored in :ref:`reference/label_format:Category` is
The information stored in :ref:`reference/label_format/CommonLabelProperties:Category` is
one of the category names in "categories" list of :ref:`catalog.json <cadc-catalog>`.
The information stored in :ref:`reference/label_format:Attributes`
The information stored in :ref:`reference/label_format/CommonLabelProperties:Attributes`
is some of the attributes in "attributes" list of :ref:`catalog.json <cadc-catalog>`.

See :ref:`this page <reference/label_format:Box3D>` for more details about the structure of Box3D.
See :ref:`this page <reference/label_format/Box3D:Box3D>` for more details about the structure of Box3D.

***********************
Delete Fusion Dataset
Expand Down
16 changes: 8 additions & 8 deletions docs/source/examples/BSTLD.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
########

This topic describes how to manage the `BSTLD Dataset <https://gas.graviti.cn/dataset/data-decorators/BSTLD>`_,
which is a dataset with :ref:`reference/label_format:Box2D` label(:numref:`Fig. %s <example-bstld>`).
which is a dataset with :ref:`reference/label_format/Box2D:Box2D` label(:numref:`Fig. %s <example-bstld>`).

.. _example-bstld:

Expand Down Expand Up @@ -50,8 +50,8 @@ is typically stored in a json file.
:name: BSTLD-catalog
:linenos:

The only annotation type for "BSTLD" is :ref:`reference/label_format:Box2D`, and there are 13
:ref:`reference/label_format:category` types and one :ref:`reference/label_format:attributes` type.
The only annotation type for "BSTLD" is :ref:`reference/label_format/Box2D:Box2D`, and there are 13
:ref:`reference/label_format/CommonLabelProperties:category` types and one :ref:`reference/label_format/CommonLabelProperties:attributes` type.

.. important::

Expand All @@ -68,7 +68,7 @@ a :class:`~tensorbay.dataset.dataset.Dataset` instance.
:name: BSTLD-dataloader
:linenos:

See :ref:`Box2D annotation <reference/label_format:Box2D>` for more details.
See :ref:`Box2D annotation <reference/label_format/Box2D:Box2D>` for more details.

.. note::

Expand Down Expand Up @@ -157,7 +157,7 @@ which can be obtained by index.
:end-before: """"""

In each :ref:`reference/dataset_structure:data`,
there is a sequence of :ref:`reference/label_format:Box2D` annotations,
there is a sequence of :ref:`reference/label_format/Box2D:Box2D` annotations,
which can be obtained by index.

.. literalinclude:: ../../../docs/code/BSTLD.py
Expand All @@ -166,10 +166,10 @@ which can be obtained by index.
:end-before: """"""

There is only one label type in "BSTLD" dataset, which is ``box2d``.
The information stored in :ref:`reference/label_format:category` is
The information stored in :ref:`reference/label_format/CommonLabelProperties:category` is
one of the names in "categories" list of :ref:`catalog.json <BSTLD-catalog>`. The information stored
in :ref:`reference/label_format:attributes` is one or several of the attributes in "attributes" list of :ref:`catalog.json <BSTLD-catalog>`.
See :ref:`reference/label_format:Box2D` label format for more details.
in :ref:`reference/label_format/CommonLabelProperties:attributes` is one or several of the attributes in "attributes" list of :ref:`catalog.json <BSTLD-catalog>`.
See :ref:`reference/label_format/Box2D:Box2D` label format for more details.

****************
Delete Dataset
Expand Down
14 changes: 7 additions & 7 deletions docs/source/examples/DogsVsCats.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
##############

This topic describes how to manage the `Dogs vs Cats Dataset <https://gas.graviti.cn/dataset/data-decorators/DogsVsCats>`_,
which is a dataset with :ref:`reference/label_format:Classification` label.
which is a dataset with :ref:`reference/label_format/Classification:Classification` label.

*****************************
Authorize a Client Instance
Expand Down Expand Up @@ -42,8 +42,8 @@ is typically stored in a json file.
:name: dogsvscats-catalog
:linenos:

The only annotation type for "Dogs vs Cats" is :ref:`reference/label_format:Classification`, and there are 2
:ref:`reference/label_format:category` types.
The only annotation type for "Dogs vs Cats" is :ref:`reference/label_format/Classification:Classification`, and there are 2
:ref:`reference/label_format/CommonLabelProperties:category` types.

.. important::

Expand All @@ -60,7 +60,7 @@ a :class:`~tensorbay.dataset.dataset.Dataset` instance.
:name: dogsvscats-dataloader
:linenos:

See :ref:`Classification annotation <reference/label_format:Classification>` for more details.
See :ref:`Classification annotation <reference/label_format/Classification:Classification>` for more details.

.. note::

Expand Down Expand Up @@ -148,17 +148,17 @@ which can be obtained by index.
:end-before: """"""

In each :ref:`reference/dataset_structure:data`,
there is a sequence of :ref:`reference/label_format:Classification` annotations,
there is a sequence of :ref:`reference/label_format/Classification:Classification` annotations,
which can be obtained by index.

.. literalinclude:: ../../../docs/code/DogsVsCats.py
:language: python
:start-after: """Read Dataset / get label"""
:end-before: """"""

There is only one label type in "Dogs vs Cats" dataset, which is ``classification``. The information stored in :ref:`reference/label_format:category` is
There is only one label type in "Dogs vs Cats" dataset, which is ``classification``. The information stored in :ref:`reference/label_format/CommonLabelProperties:category` is
one of the names in "categories" list of :ref:`catalog.json <dogsvscats-catalog>`.
See :ref:`reference/label_format:Classification` label format for more details.
See :ref:`reference/label_format/Classification:Classification` label format for more details.

****************
Delete Dataset
Expand Down
10 changes: 5 additions & 5 deletions docs/source/examples/LeedsSportsPose.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
###################

This topic describes how to manage the `Leeds Sports Pose Dataset <https://gas.graviti.cn/dataset/data-decorators/LeedsSportsPose>`_,
which is a dataset with :ref:`reference/label_format:Keypoints2D` label(:numref:`Fig. %s <example-leedssportspose>`).
which is a dataset with :ref:`reference/label_format/Keypoints2D:Keypoints2D` label(:numref:`Fig. %s <example-leedssportspose>`).

.. _example-leedssportspose:

Expand Down Expand Up @@ -50,7 +50,7 @@ is typically stored in a json file.
:name: LeedsSportsPose-catalog
:linenos:

The only annotation type for "Leeds Sports Pose" is :ref:`reference/label_format:Keypoints2D`.
The only annotation type for "Leeds Sports Pose" is :ref:`reference/label_format/Keypoints2D:Keypoints2D`.

.. important::

Expand All @@ -67,7 +67,7 @@ a :class:`~tensorbay.dataset.dataset.Dataset` instance.
:name: LeedsSportsPose-dataloader
:linenos:

See :ref:`Keipoints2D annotation <reference/label_format:Keypoints2D>` for more details.
See :ref:`Keipoints2D annotation <reference/label_format/Keypoints2D:Keypoints2D>` for more details.

.. note::

Expand Down Expand Up @@ -147,7 +147,7 @@ which can be obtained by index.
:end-before: """"""

In each :ref:`reference/dataset_structure:data`,
there is a sequence of :ref:`reference/label_format:Keypoints2D` annotations,
there is a sequence of :ref:`reference/label_format/Keypoints2D:Keypoints2D` annotations,
which can be obtained by index.

.. literalinclude:: ../../../docs/code/LeedsSportsPose.py
Expand All @@ -157,7 +157,7 @@ which can be obtained by index.

There is only one label type in "Leeds Sports Pose" dataset, which is ``keypoints2d``. The information stored in ``x`` (``y``) is
the x (y) coordinate of one keypoint of one keypoints list. The information stored in ``v`` is
the visible status of one keypoint of one keypoints list. See :ref:`reference/label_format:Keypoints2D`
the visible status of one keypoint of one keypoints list. See :ref:`reference/label_format/Keypoints2D:Keypoints2D`
label format for more details.

****************
Expand Down
16 changes: 8 additions & 8 deletions docs/source/examples/NeolixOD.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
###########

This topic describes how to manage the `Neolix OD dataset`_,
which is a dataset with :ref:`reference/label_format:Box3D` label type
which is a dataset with :ref:`reference/label_format/Box3D:Box3D` label type
(:numref:`Fig. %s <example-neolixod>`).

.. _Neolix OD dataset: https://gas.graviti.cn/dataset/graviti-open-dataset/NeolixOD
Expand Down Expand Up @@ -54,8 +54,8 @@ which is typically stored in a json file.
:name: neolixod-catalog
:linenos:

The only annotation type for "Neolix OD" is :ref:`reference/label_format:Box3D`, and there are 15
:ref:`reference/label_format:Category` types and 3 :ref:`reference/label_format:Attributes` types.
The only annotation type for "Neolix OD" is :ref:`reference/label_format/Box3D:Box3D`, and there are 15
:ref:`reference/label_format/CommonLabelProperties:Category` types and 3 :ref:`reference/label_format/CommonLabelProperties:Attributes` types.

.. important::

Expand All @@ -72,7 +72,7 @@ a :class:`~tensorbay.dataset.dataset.Dataset` instance.
:name: neolixod-dataloader
:linenos:

See :ref:`Box3D annotation <reference/label_format:Box3D>` for more details.
See :ref:`Box3D annotation <reference/label_format/Box3D:Box3D>` for more details.

.. note::

Expand Down Expand Up @@ -154,19 +154,19 @@ which can be obtained by index.
:end-before: """"""

In each :ref:`reference/dataset_structure:Data`,
there is a sequence of :ref:`reference/label_format:Box3D` annotations,
there is a sequence of :ref:`reference/label_format/Box3D:Box3D` annotations,

.. literalinclude:: ../../../docs/code/NeolixOD.py
:language: python
:start-after: """Read Dataset / get label"""
:end-before: """"""

There is only one label type in "Neolix OD" dataset, which is ``box3d``.
The information stored in :ref:`reference/label_format:Category` is
The information stored in :ref:`reference/label_format/CommonLabelProperties:Category` is
one of the category names in "categories" list of :ref:`catalog.json <neolixod-catalog>`.
The information stored in :ref:`reference/label_format:Attributes`
The information stored in :ref:`reference/label_format/CommonLabelProperties:Attributes`
is one of the attributes in "attributes" list of :ref:`catalog.json <neolixod-catalog>`.
See :ref:`reference/label_format:Box3D` label format for more details.
See :ref:`reference/label_format/Box3D:Box3D` label format for more details.

****************
Delete Dataset
Expand Down
16 changes: 8 additions & 8 deletions docs/source/examples/Newsgroups20.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
###############

This topic describes how to manage the `20 Newsgroups dataset`_, which is a dataset
with :ref:`reference/label_format:Classification` label type.
with :ref:`reference/label_format/Classification:Classification` label type.

.. _20 Newsgroups dataset: https://gas.graviti.cn/dataset/data-decorators/Newsgroups20

Expand Down Expand Up @@ -45,15 +45,15 @@ which is typically stored in a json file.
:name: Newsgroups20-catalog
:linenos:

The only annotation type for "20 Newsgroups" is :ref:`reference/label_format:Classification`,
and there are 20 :ref:`reference/label_format:Category` types.
The only annotation type for "20 Newsgroups" is :ref:`reference/label_format/Classification:Classification`,
and there are 20 :ref:`reference/label_format/CommonLabelProperties:Category` types.

.. important::

See :ref:`catalog table <reference/dataset_structure:catalog>` for more catalogs with different label types.

.. note::
The :ref:`categories<reference/label_format:Category>` in
The :ref:`categories<reference/label_format/CommonLabelProperties:Category>` in
:ref:`reference/dataset_structure:Dataset` "20 Newsgroups" have parent-child relationship,
and it use "." to sparate different levels.

Expand All @@ -68,7 +68,7 @@ A :ref:`reference/glossary:Dataloader` is neeeded to organize the dataset into a
:name: Newsgroups20-dataloader
:linenos:

See :ref:`Classification annotation <reference/label_format:Classification>` for more details.
See :ref:`Classification annotation <reference/label_format/Classification:Classification>` for more details.

.. note::

Expand Down Expand Up @@ -163,7 +163,7 @@ which can be obtained by index.
:end-before: """"""

In each :ref:`reference/dataset_structure:Data`,
there is a sequence of :ref:`reference/label_format:Classification` annotations,
there is a sequence of :ref:`reference/label_format/Classification:Classification` annotations,
which can be obtained by index.

.. literalinclude:: ../../../docs/code/Newsgroups20.py
Expand All @@ -172,9 +172,9 @@ which can be obtained by index.
:end-before: """"""

There is only one label type in "20 Newsgroups" dataset, which is ``Classification``.
The information stored in :ref:`reference/label_format:Category` is
The information stored in :ref:`reference/label_format/CommonLabelProperties:Category` is
one of the category names in "categories" list of :ref:`catalog.json <Newsgroups20-catalog>`.
See :ref:`this page <reference/label_format:Classification>` for more details about the
See :ref:`this page <reference/label_format/Classification:Classification>` for more details about the
structure of Classification.

****************
Expand Down
8 changes: 4 additions & 4 deletions docs/source/examples/THCHS30.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
###########

This topic describes how to manage the `THCHS-30 Dataset`_,
which is a dataset with :ref:`reference/label_format:Sentence` label
which is a dataset with :ref:`reference/label_format/Sentence:Sentence` label

.. _THCHS-30 Dataset: https://www.graviti.com/open-datasets/data-decorators/THCHS30

Expand Down Expand Up @@ -57,7 +57,7 @@ into a :class:`~tensorbay.dataset.dataset.Dataset` instance.
:name: THCHS30-dataloader
:linenos:

See :ref:`Sentence annotation <reference/label_format:Sentence>` for more details.
See :ref:`Sentence annotation <reference/label_format/Sentence:Sentence>` for more details.

.. note::
Since the :ref:`THCHS-30 dataloader <THCHS30-dataloader>` above is already included in TensorBay,
Expand Down Expand Up @@ -146,7 +146,7 @@ which can be obtained by index.
:end-before: """"""

In each :ref:`reference/dataset_structure:Data`,
there is a sequence of :ref:`reference/label_format:Sentence` annotations,
there is a sequence of :ref:`reference/label_format/Sentence:Sentence` annotations,
which can be obtained by index.

.. literalinclude:: ../../../docs/code/THCHS30.py
Expand All @@ -155,7 +155,7 @@ which can be obtained by index.
:end-before: """"""

There is only one label type in "THCHS-30" dataset, which is ``Sentence``. It contains
``sentence``, ``spell`` and ``phone`` information. See :ref:`Sentence <reference/label_format:Sentence>`
``sentence``, ``spell`` and ``phone`` information. See :ref:`Sentence <reference/label_format/Sentence:Sentence>`
label format for more details.

****************
Expand Down
Loading