From e3552d9868327dd18913580a0578e26003dcd9d7 Mon Sep 17 00:00:00 2001 From: "changjun.zhu" Date: Fri, 5 Nov 2021 15:11:40 +0800 Subject: [PATCH] docs: use template to generate rst files in "Examples" --- .gitignore | 4 + docs/code/LeedsSportsPose.py | 4 + docs/code/NeolixOD.py | 4 + docs/source/__init__.py | 6 + docs/source/_generate/__init__.py | 10 + docs/source/_generate/generate_examples.py | 159 +++++++++++++++ docs/source/_templates/__init__.py | 10 + .../DogsVsCats.rst => _templates/examples.py} | 103 +++++----- docs/source/conf.py | 12 +- docs/source/features/dataset_management.rst | 6 +- docs/source/features/visualization.rst | 2 +- docs/source/quick_start/examples/BSTLD.rst | 182 ----------------- .../quick_start/examples/LeedsSportsPose.rst | 169 ---------------- docs/source/quick_start/examples/NeolixOD.rst | 177 ----------------- .../quick_start/examples/Newsgroups20.rst | 187 ------------------ docs/source/quick_start/examples/THCHS30.rst | 159 --------------- docs/source/quick_start/examples/index.rst | 72 +++---- 17 files changed, 305 insertions(+), 961 deletions(-) create mode 100644 docs/source/__init__.py create mode 100644 docs/source/_generate/__init__.py create mode 100644 docs/source/_generate/generate_examples.py create mode 100644 docs/source/_templates/__init__.py rename docs/source/{quick_start/examples/DogsVsCats.rst => _templates/examples.py} (52%) delete mode 100644 docs/source/quick_start/examples/BSTLD.rst delete mode 100644 docs/source/quick_start/examples/LeedsSportsPose.rst delete mode 100644 docs/source/quick_start/examples/NeolixOD.rst delete mode 100644 docs/source/quick_start/examples/Newsgroups20.rst delete mode 100644 docs/source/quick_start/examples/THCHS30.rst diff --git a/.gitignore b/.gitignore index 5af2d1ec9..9f3720b4e 100644 --- a/.gitignore +++ b/.gitignore @@ -71,6 +71,10 @@ instance/ # Sphinx documentation docs/_build/ +# Documentation generated files +docs/source/quick_start/examples/generated/ +docs/source/reference/api/api_rst/ + # PyBuilder target/ diff --git a/docs/code/LeedsSportsPose.py b/docs/code/LeedsSportsPose.py index 67e43dca9..4bb983b83 100644 --- a/docs/code/LeedsSportsPose.py +++ b/docs/code/LeedsSportsPose.py @@ -43,6 +43,10 @@ dataset = Dataset("LeedsSportsPose", gas) """""" +"""Read Dataset / list segment names""" +dataset.keys() +"""""" + """Read Dataset / get segment""" segment = dataset[0] """""" diff --git a/docs/code/NeolixOD.py b/docs/code/NeolixOD.py index eb60f677b..5909bc30e 100644 --- a/docs/code/NeolixOD.py +++ b/docs/code/NeolixOD.py @@ -42,6 +42,10 @@ dataset = Dataset("NeolixOD", gas) """""" +"""Read Dataset / list segment names""" +dataset.keys() +"""""" + """Read Dataset / get segment""" segment = dataset[0] """""" diff --git a/docs/source/__init__.py b/docs/source/__init__.py new file mode 100644 index 000000000..a15f2b9c7 --- /dev/null +++ b/docs/source/__init__.py @@ -0,0 +1,6 @@ +#!/usr/bin/env python3 +# +# Copyright 2021 Graviti. Licensed under MIT License. +# + +"""Source.""" diff --git a/docs/source/_generate/__init__.py b/docs/source/_generate/__init__.py new file mode 100644 index 000000000..0385732d0 --- /dev/null +++ b/docs/source/_generate/__init__.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python3 +# +# Copyright 2021 Graviti. Licensed under MIT License. +# + +"""Generate.""" + +from docs.source._generate.generate_examples import generate_examples_rst + +__all__ = ["generate_examples_rst"] diff --git a/docs/source/_generate/generate_examples.py b/docs/source/_generate/generate_examples.py new file mode 100644 index 000000000..f8dc268a2 --- /dev/null +++ b/docs/source/_generate/generate_examples.py @@ -0,0 +1,159 @@ +#!/usr/bin/env python3 +# +# Copyright 2021 Graviti. Licensed under MIT License. +# +"""Generate rst flies in Examples.""" + +import os +import sys +from collections import defaultdict +from pathlib import Path + +sys.path.insert(0, str(Path(__file__).parents[3])) +from docs.source._templates import ( # noqa: E402 # pylint: disable=wrong-import-position + EXAMPLES_TEMPLATE, +) + +_DATASET_NAMES = ( + "Dogs Vs Cats", + "20 Newsgroups", + "BSTLD", + "Neolix OD", + "Leeds Sports Pose", + "THCHS-30", +) +_LABEL_TYPES = ( + "Classification", + "Classification", + "Box2D", + "Box3D", + "Keypoints2D", + "Sentence", +) +_FILE_NAMES = ("DogsVsCats", "Newsgroups20", "BSTLD", "NeolixOD", "LeedsSportsPose", "THCHS30") + +_DATASET_WITH_IMAGES = ("BSTLD", "Neolix OD", "Leeds Sports Pose") + +_FIGURE_DESCRIPTION = """(:numref:`Fig. %s `). + +.. _example-{file_name}: + +.. figure:: ../../../images/example-{label_type}.png + :scale: 50 % + :align: center + + The preview of a cropped image with labels from "{dataset_name}". +""" + +_CATEGORY_ATTRIBUTE_DESCRIPTIONS = {} +_CATEGORY_ATTRIBUTE_DESCRIPTIONS[ + "BSTLD" +] = """ +The only annotation type for "{dataset_name}" is +:ref:`reference/label_format/{label_type}:{label_type}`, and there are 13 +:ref:`reference/label_format/CommonLabelProperties:category` types and one +:ref:`reference/label_format/CommonLabelProperties:attributes` type. +""" + +_CATEGORY_ATTRIBUTE_DESCRIPTIONS[ + "Dogs Vs Cats" +] = """ +The only annotation type for "{dataset_name}" is +:ref:`reference/label_format/{label_type}:{label_type}`, and there are 2 +:ref:`reference/label_format/CommonLabelProperties:category` types. +""" + +_CATEGORY_ATTRIBUTE_DESCRIPTIONS[ + "Leeds Sports Pose" +] = """ +The only annotation type for "{dataset_name}" is +:ref:`reference/label_format/{label_type}:{label_type}`. +""" + +_CATEGORY_ATTRIBUTE_DESCRIPTIONS[ + "Neolix OD" +] = """ +The only annotation type for "{dataset_name}" is +:ref:`reference/label_format/{label_type}:{label_type}`, and there are 15 +:ref:`reference/label_format/CommonLabelProperties:category` types and 3 +:ref:`reference/label_format/CommonLabelProperties:attributes` type. +""" + +_CATEGORY_ATTRIBUTE_DESCRIPTIONS[ + "20 Newsgroups" +] = """ +The only annotation type for "{dataset_name}" is +:ref:`reference/label_format/{label_type}:{label_type}`, and there are 20 +:ref:`reference/label_format/CommonLabelProperties:category` types +""" + +_CATEGORY_ATTRIBUTE_DESCRIPTIONS["THCHS-30"] = "" + +_CATALOG_DESCRIPTIONS = defaultdict( + lambda: """ +.. literalinclude:: ../../../../../tensorbay/opendataset/{file_name}/catalog.json + :language: json + :name: {file_name}-catalog + :linenos: +""" +) + +_CATALOG_DESCRIPTIONS[ + "THCHS-30" +] = """However the catalog of THCHS-30 is too large, instead of +reading it from json file, we read it by mapping from subcatalog that is loaded by +the raw file. Check the :ref:`dataloader ` below for more details. +""" + +_INFORMATION_DESCRIPTIONS = defaultdict( + lambda: """The information stored in +:ref:`reference/label_format/CommonLabelProperties:category` is one of the names in "categories" +list of :ref:`catalog.json <{file_name}-catalog>`. The information stored in +:ref:`reference/label_format/CommonLabelProperties:attributes` is one or several of +the attributes in "attributes" list of :ref:`catalog.json <{file_name}-catalog>`. +See :ref:`reference/label_format/{label_type}:{label_type}` label format for more details. +""" +) + +_INFORMATION_DESCRIPTIONS[ + "THCHS-30" +] = """It contains ``sentence``, ``spell`` and ``phone`` +information. See :ref:`Sentence ` label +format for more details. +""" + + +def generate_examples_rst(example_path: str) -> None: + """Generate rst flies in Examples. + + Arguments: + example_path: The path of rst files in Examples. + + """ + os.makedirs(example_path, exist_ok=True) + for dataset_name, label_type, file_name in zip(_DATASET_NAMES, _LABEL_TYPES, _FILE_NAMES): + if dataset_name in _DATASET_WITH_IMAGES: + figure_description_tmp = _FIGURE_DESCRIPTION.format( + dataset_name=dataset_name, file_name=file_name, label_type=label_type + ) + else: + figure_description_tmp = "" + catalog_description = _CATALOG_DESCRIPTIONS[dataset_name].format(file_name=file_name) + information_description = _INFORMATION_DESCRIPTIONS[dataset_name].format( + label_type=label_type, file_name=file_name + ) + category_attribute_description = _CATEGORY_ATTRIBUTE_DESCRIPTIONS[dataset_name].format( + dataset_name=dataset_name, label_type=label_type + ) + with open(os.path.join(example_path, f"{file_name}.rst"), "w", encoding="utf-8") as fp: + fp.write( + EXAMPLES_TEMPLATE.format( + dataset_name=dataset_name, + file_name=file_name, + label_type=label_type, + figure_description=figure_description_tmp, + catalog_description=catalog_description, + category_attribute_description=category_attribute_description, + information_description=information_description, + ) + ) diff --git a/docs/source/_templates/__init__.py b/docs/source/_templates/__init__.py new file mode 100644 index 000000000..ffada6495 --- /dev/null +++ b/docs/source/_templates/__init__.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python3 +# +# Copyright 2021 Graviti. Licensed under MIT License. +# + +"""Template.""" + +from docs.source._templates.examples import EXAMPLES_TEMPLATE + +__all__ = ["EXAMPLES_TEMPLATE"] diff --git a/docs/source/quick_start/examples/DogsVsCats.rst b/docs/source/_templates/examples.py similarity index 52% rename from docs/source/quick_start/examples/DogsVsCats.rst rename to docs/source/_templates/examples.py index c166acc7a..f549bb8d2 100644 --- a/docs/source/quick_start/examples/DogsVsCats.rst +++ b/docs/source/_templates/examples.py @@ -1,9 +1,18 @@ -############## - Dogs vs Cats -############## - -This topic describes how to manage the `Dogs vs Cats Dataset `_, -which is a dataset with :ref:`reference/label_format/Classification:Classification` label. +#!/usr/bin/env python3 +# +# Copyright 2021 Graviti. Licensed under MIT License. +# +"""The template for example rst files.""" + +EXAMPLES_TEMPLATE = ''' +###################################### + {dataset_name} +###################################### + +This topic describes how to manage the `{dataset_name} Dataset `_, which is a dataset with +:ref:`reference/label_format/{label_type}:{label_type}` label +{figure_description} ***************************** Authorize a Client Instance @@ -11,7 +20,7 @@ An :ref:`reference/glossary:accesskey` is needed to authenticate identity when using TensorBay. -.. literalinclude:: ../../../../docs/code/DogsVsCats.py +.. literalinclude:: ../../../../../docs/code/{file_name}.py :language: python :start-after: """Authorize a Client Instance""" :end-before: """""" @@ -20,7 +29,7 @@ Create Dataset **************** -.. literalinclude:: ../../../../docs/code/DogsVsCats.py +.. literalinclude:: ../../../../../docs/code/{file_name}.py :language: python :start-after: """Create Dataset""" :end-before: """""" @@ -29,10 +38,11 @@ Organize Dataset ****************** -Normally, ``dataloader.py`` and ``catalog.json`` are required to organize the "Dogs vs Cats" dataset into the :class:`~tensorbay.dataset.dataset.Dataset` instance. +Normally, ``dataloader.py`` and ``catalog.json`` are required to organize the "{dataset_name}" +dataset into the :class:`~tensorbay.dataset.dataset.Dataset` instance. In this example, they are stored in the same directory like:: - Dogs vs Cats/ + {dataset_name}/ catalog.json dataloader.py @@ -41,52 +51,51 @@ A :ref:`reference/dataset_structure:catalog` contains all label information of one dataset, which is typically stored in a json file like ``catalog.json``. +{catalog_description} -.. literalinclude:: ../../../../tensorbay/opendataset/DogsVsCats/catalog.json - :language: json - :name: dogsvscats-catalog - :linenos: - -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. +{category_attribute_description} .. note:: - By passing the path of the ``catalog.json``, :func:`~tensorbay.dataset.dataset.DatasetBase.load_catalog` supports loading the catalog into dataset. + By passing the path of the ``catalog.json``, :func:`~tensorbay.dataset.dataset.DatasetBase. + load_catalog` supports loading the catalog into dataset. .. important:: - See :ref:`catalog table ` for more catalogs with different label types. + See :ref:`catalog table ` for more catalogs with different + label types. Step 2: Write the Dataloader ============================ -A :ref:`reference/glossary:dataloader` is needed to organize the dataset into -a :class:`~tensorbay.dataset.dataset.Dataset` instance. +A :ref:`reference/glossary:dataloader` is needed to organize the dataset into a :class:`~tensorbay. +dataset.dataset.Dataset` instance. -.. literalinclude:: ../../../../tensorbay/opendataset/DogsVsCats/loader.py +.. literalinclude:: ../../../../../tensorbay/opendataset/{file_name}/loader.py :language: python - :name: dogsvscats-dataloader + :name: {file_name}-dataloader :linenos: -See :ref:`Classification annotation ` for more details. - +See :ref:`{label_type} annotation ` for more +details. There are already a number of dataloaders in TensorBay SDK provided by the community. -Thus, instead of writing, importing an available dataloadert is also feasible. +Thus, instead of writing, importing an available dataloader is also feasible. -.. literalinclude:: ../../../../docs/code/DogsVsCats.py +.. literalinclude:: ../../../../../docs/code/{file_name}.py :language: python :start-after: """Organize dataset / import dataloader""" :end-before: """""" .. note:: - Note that catalogs are automatically loaded in available dataloaders, users do not have to write them again. + Note that catalogs are automatically loaded in available dataloaders, users do not have to write + them again. .. important:: - See :ref:`dataloader table ` for more examples of dataloaders with different label types. + See :ref:`dataloader table ` for dataloaders with different label + types. ******************* Visualize Dataset @@ -100,13 +109,17 @@ Upload Dataset **************** -The organized "Dogs vs Cats" dataset can be uploaded to TensorBay for sharing, reuse, etc. +The organized "{dataset_name}" dataset can be uploaded to TensorBay for sharing, reuse, etc. -.. literalinclude:: ../../../../docs/code/DogsVsCats.py +.. literalinclude:: ../../../../../docs/code/{file_name}.py :language: python :start-after: """Upload Dataset""" :end-before: """""" +.. note:: + Set ``skip_uploaded_files=True`` to skip uploaded data. + The data will be skiped if its name and segment name is the same as remote data. + Similar with Git, the commit step after uploading can record changes to the dataset as a version. If needed, do the modifications and commit again. Please see :ref:`features/version_control/index:Version Control` for more details. @@ -115,55 +128,53 @@ Read Dataset ************** -Now "Dogs vs Cats" dataset can be read from TensorBay. +Now "{dataset_name}" dataset can be read from TensorBay. -.. literalinclude:: ../../../../docs/code/DogsVsCats.py +.. literalinclude:: ../../../../../docs/code/{file_name}.py :language: python :start-after: """Read Dataset / get dataset""" :end-before: """""" -In :ref:`reference/dataset_structure:dataset` "Dogs vs Cats", there are two -:ref:`segments `: ``train`` and ``test``. Get the segment names by listing them all. -.. literalinclude:: ../../../../docs/code/DogsVsCats.py +.. literalinclude:: ../../../../../docs/code/{file_name}.py :language: python :start-after: """Read Dataset / list segment names""" :end-before: """""" Get a segment by passing the required segment name. -.. literalinclude:: ../../../../docs/code/DogsVsCats.py +.. literalinclude:: ../../../../../docs/code/{file_name}.py :language: python :start-after: """Read Dataset / get segment""" :end-before: """""" -In the train :ref:`reference/dataset_structure:segment`, there is a sequence of :ref:`reference/dataset_structure:data`, -which can be obtained by index. +In the :ref:`reference/dataset_structure:segment`, there is a sequence of +:ref:`reference/dataset_structure:data`, which can be obtained by index. -.. literalinclude:: ../../../../docs/code/DogsVsCats.py +.. literalinclude:: ../../../../../docs/code/{file_name}.py :language: python :start-after: """Read Dataset / get data""" :end-before: """""" In each :ref:`reference/dataset_structure:data`, -there is a sequence of :ref:`reference/label_format/Classification:Classification` annotations, +there is a sequence of :ref:`reference/label_format/{label_type}:{label_type}` annotations, which can be obtained by index. -.. literalinclude:: ../../../../docs/code/DogsVsCats.py +.. literalinclude:: ../../../../../docs/code/{file_name}.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/CommonLabelProperties:category` is -one of the names in "categories" list of :ref:`catalog.json `. -See :ref:`reference/label_format/Classification:Classification` label format for more details. +There is only one label type in "{dataset_name}" dataset, which is ``{label_type}``. +{information_description} **************** Delete Dataset **************** -.. literalinclude:: ../../../../docs/code/DogsVsCats.py +.. literalinclude:: ../../../../../docs/code/{file_name}.py :language: python :start-after: """Delete Dataset""" :end-before: """""" +''' diff --git a/docs/source/conf.py b/docs/source/conf.py index 3bb1f2b56..64a8857b7 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -15,11 +15,14 @@ # documentation root, use os.path.abspath to make it absolute, like shown here. # """Configuration file for the Sphinx documentation builder.""" +import os import sys from pathlib import Path sys.path.insert(0, str(Path(__file__).parents[2])) - +from docs.source._generate import ( # noqa: E402 # pylint: disable=wrong-import-position + generate_examples_rst, +) # -- Project information ----------------------------------------------------- @@ -79,3 +82,10 @@ # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". # html_static_path = ["_static"] + +# -- Generate some rst files in Examples ------------------------------------- + +source_path = os.path.dirname(os.path.abspath(__file__)) +example_path = os.path.join(source_path, "quick_start", "examples", "generated") +os.makedirs(example_path, exist_ok=True) +generate_examples_rst(example_path) diff --git a/docs/source/features/dataset_management.rst b/docs/source/features/dataset_management.rst index c3adc13d0..0c6116eee 100644 --- a/docs/source/features/dataset_management.rst +++ b/docs/source/features/dataset_management.rst @@ -31,7 +31,7 @@ The typical steps to organize a local dataset: A catalog is needed only if there is label information inside the dataset. -Take the :ref:`Organization of BSTLD ` as an example. +Take the :ref:`Organization of BSTLD ` as an example. **************** @@ -57,7 +57,7 @@ There are plenty of benefits of uploading local datasets to TensorBay. During uploading dataset or data, if the remote path of the data is the same as another data under the same segment, the old data will be replaced. -Take the :ref:`Upload Dataset of BSTLD ` as an example. +Take the :ref:`Upload Dataset of BSTLD ` as an example. ************** Read Dataset @@ -82,7 +82,7 @@ Two types of datasets can be read from TensorBay: .. _my datasets(or team datasets): https://gas.graviti.cn/tensorbay/dataset-list .. _TensorBay: https://gas.graviti.cn/tensorbay/ -Take the :ref:`Read Dataset of BSTLD ` as an example. +Take the :ref:`Read Dataset of BSTLD ` as an example. **************** Update Dataset diff --git a/docs/source/features/visualization.rst b/docs/source/features/visualization.rst index 1251b0c4e..ee67748d1 100644 --- a/docs/source/features/visualization.rst +++ b/docs/source/features/visualization.rst @@ -26,7 +26,7 @@ To install **Pharos** by **pip**, run the following command: Organize a Dataset ================== -Take the :ref:`BSTLD ` as an example: +Take the :ref:`BSTLD ` as an example: .. literalinclude:: ../../../docs/code/pharos.py :language: python diff --git a/docs/source/quick_start/examples/BSTLD.rst b/docs/source/quick_start/examples/BSTLD.rst deleted file mode 100644 index 062b22be7..000000000 --- a/docs/source/quick_start/examples/BSTLD.rst +++ /dev/null @@ -1,182 +0,0 @@ -######## - BSTLD -######## - -This topic describes how to manage the `BSTLD Dataset `_, -which is a dataset with :ref:`reference/label_format/Box2D:Box2D` label(:numref:`Fig. %s `). - -.. _example-bstld: - -.. figure:: ../../images/example-Box2D.png - :scale: 50 % - :align: center - - The preview of a cropped image with labels from "BSTLD". - -***************************** - Authorize a Client Instance -***************************** - -An :ref:`reference/glossary:accesskey` is needed to authenticate identity when using TensorBay. - -.. literalinclude:: ../../../../docs/code/BSTLD.py - :language: python - :start-after: """Authorize a Client Instance""" - :end-before: """""" - -**************** - Create Dataset -**************** - -.. literalinclude:: ../../../../docs/code/BSTLD.py - :language: python - :start-after: """Create Dataset""" - :end-before: """""" - -****************** - Organize Dataset -****************** - -Normally, ``dataloader.py`` and ``catalog.json`` are required to organize the "BSTLD" dataset into the :class:`~tensorbay.dataset.dataset.Dataset` instance. -In this example, they are stored in the same directory like:: - - BSTLD/ - catalog.json - dataloader.py - -Step 1: Write the Catalog -========================= - -A :ref:`reference/dataset_structure:catalog` contains all label information of one dataset, which -is typically stored in a json file like ``catalog.json``. - -.. literalinclude:: ../../../../tensorbay/opendataset/BSTLD/catalog.json - :language: json - :name: BSTLD-catalog - :linenos: - -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. - -.. note:: - - By passing the path of the ``catalog.json``, :func:`~tensorbay.dataset.dataset.DatasetBase.load_catalog` supports loading the catalog into dataset. - -.. important:: - - See :ref:`catalog table ` for more catalogs with different label types. - -Step 2: Write the Dataloader -============================ - -A :ref:`reference/glossary:dataloader` is needed to organize the dataset into a :class:`~tensorbay.dataset.dataset.Dataset` instance. - -.. literalinclude:: ../../../../tensorbay/opendataset/BSTLD/loader.py - :language: python - :name: BSTLD-dataloader - :linenos: - -See :ref:`Box2D annotation ` for more details. - -There are already a number of dataloaders in TensorBay SDK provided by the community. -Thus, instead of writing, importing an available dataloader is also feasible. - -.. literalinclude:: ../../../../docs/code/BSTLD.py - :language: python - :start-after: """Organize dataset / import dataloader""" - :end-before: """""" - -.. note:: - - Note that catalogs are automatically loaded in available dataloaders, users do not have to write them again. - -.. important:: - - See :ref:`dataloader table ` for dataloaders with different label types. - -******************* - Visualize Dataset -******************* - -Optionally, the organized dataset can be visualized by **Pharos**, which is a TensorBay SDK plug-in. -This step can help users to check whether the dataset is correctly organized. -Please see :ref:`features/visualization:Visualization` for more details. - -**************** - Upload Dataset -**************** - -The organized "BSTLD" dataset can be uploaded to TensorBay for sharing, reuse, etc. - -.. literalinclude:: ../../../../docs/code/BSTLD.py - :language: python - :start-after: """Upload Dataset""" - :end-before: """""" - -.. note:: - Set `skip_uploaded_files=True` to skip uploaded data. - The data will be skiped if its name and segment name is the same as remote data. - -Similar with Git, the commit step after uploading can record changes to the dataset as a version. -If needed, do the modifications and commit again. -Please see :ref:`features/version_control/index:Version Control` for more details. - -************** - Read Dataset -************** - -Now "BSTLD" dataset can be read from TensorBay. - -.. literalinclude:: ../../../../docs/code/BSTLD.py - :language: python - :start-after: """Read Dataset / get dataset""" - :end-before: """""" - -In :ref:`reference/dataset_structure:dataset` "BSTLD", there are three -:ref:`segments `: ``train``, ``test`` and ``additional``. -Get the segment names by listing them all. - -.. literalinclude:: ../../../../docs/code/BSTLD.py - :language: python - :start-after: """Read Dataset / list segment names""" - :end-before: """""" - -Get a segment by passing the required segment name. - -.. literalinclude:: ../../../../docs/code/BSTLD.py - :language: python - :start-after: """Read Dataset / get segment""" - :end-before: """""" - - -In the train :ref:`reference/dataset_structure:segment`, there is a sequence of :ref:`reference/dataset_structure:data`, -which can be obtained by index. - -.. literalinclude:: ../../../../docs/code/BSTLD.py - :language: python - :start-after: """Read Dataset / get data""" - :end-before: """""" - -In each :ref:`reference/dataset_structure:data`, -there is a sequence of :ref:`reference/label_format/Box2D:Box2D` annotations, -which can be obtained by index. - -.. literalinclude:: ../../../../docs/code/BSTLD.py - :language: python - :start-after: """Read Dataset / get label""" - :end-before: """""" - -There is only one label type in "BSTLD" dataset, which is ``box2d``. -The information stored in :ref:`reference/label_format/CommonLabelProperties:category` is -one of the names in "categories" list of :ref:`catalog.json `. The information stored -in :ref:`reference/label_format/CommonLabelProperties:attributes` is one or several of the attributes in "attributes" list of :ref:`catalog.json `. -See :ref:`reference/label_format/Box2D:Box2D` label format for more details. - -**************** - Delete Dataset -**************** - -.. literalinclude:: ../../../../docs/code/BSTLD.py - :language: python - :start-after: """Delete Dataset""" - :end-before: """""" diff --git a/docs/source/quick_start/examples/LeedsSportsPose.rst b/docs/source/quick_start/examples/LeedsSportsPose.rst deleted file mode 100644 index fa8ef1ad7..000000000 --- a/docs/source/quick_start/examples/LeedsSportsPose.rst +++ /dev/null @@ -1,169 +0,0 @@ -################### - Leeds Sports Pose -################### - -This topic describes how to manage the `Leeds Sports Pose Dataset `_, -which is a dataset with :ref:`reference/label_format/Keypoints2D:Keypoints2D` label(:numref:`Fig. %s `). - -.. _example-leedssportspose: - -.. figure:: ../../images/example-Keypoints2D.png - :scale: 80 % - :align: center - - The preview of an image with labels from "Leeds Sports Pose". - -***************************** - Authorize a Client Instance -***************************** - -An :ref:`reference/glossary:accesskey` is needed to authenticate identity when using TensorBay. - -.. literalinclude:: ../../../../docs/code/LeedsSportsPose.py - :language: python - :start-after: """Authorize a Client Instance""" - :end-before: """""" - -**************** - Create Dataset -**************** - -.. literalinclude:: ../../../../docs/code/LeedsSportsPose.py - :language: python - :start-after: """Create Dataset""" - :end-before: """""" - -****************** - Organize Dataset -****************** - -Normally, ``dataloader.py`` and ``catalog.json`` are required to organize the "Leeds Sports Pose" dataset into the :class:`~tensorbay.dataset.dataset.Dataset` instance. -In this example, they are stored in the same directory like:: - - Leeds Sports Pose/ - catalog.json - dataloader.py - -Step 1: Write the Catalog -========================= - -A :ref:`reference/dataset_structure:catalog` contains all label information of one dataset, which -is typically stored in a json file like ``catalog.json``. - -.. literalinclude:: ../../../../tensorbay/opendataset/LeedsSportsPose/catalog.json - :language: json - :name: LeedsSportsPose-catalog - :linenos: - -The only annotation type for "Leeds Sports Pose" is :ref:`reference/label_format/Keypoints2D:Keypoints2D`. - -.. note:: - - By passing the path of the ``catalog.json``, :func:`~tensorbay.dataset.dataset.DatasetBase.load_catalog` supports loading the catalog into dataset. - -.. important:: - - See :ref:`catalog table ` for more catalogs with different label types. - -Step 2: Write the Dataloader -============================ - -A :ref:`reference/glossary:dataloader` is needed to organize the dataset into -a :class:`~tensorbay.dataset.dataset.Dataset` instance. - -.. literalinclude:: ../../../../tensorbay/opendataset/LeedsSportsPose/loader.py - :language: python - :name: LeedsSportsPose-dataloader - :linenos: - -See :ref:`Keipoints2D annotation ` for more details. - - -There are already a number of dataloaders in TensorBay SDK provided by the community. -Thus, instead of writing, importing an available dataloader is also feasible. - -.. literalinclude:: ../../../../docs/code/LeedsSportsPose.py - :language: python - :start-after: """Organize dataset / import dataloader""" - :end-before: """""" - -.. note:: - - Note that catalogs are automatically loaded in available dataloaders, users do not have to write them again. - -.. important:: - - See :ref:`dataloader table ` for dataloaders with different label types. - -******************* - Visualize Dataset -******************* - -Optionally, the organized dataset can be visualized by **Pharos**, which is a TensorBay SDK plug-in. -This step can help users to check whether the dataset is correctly organized. -Please see :ref:`features/visualization:Visualization` for more details. - -**************** - Upload Dataset -**************** - -The organized "BSTLD" dataset can be uploaded to TensorBay for sharing, reuse, etc. - -.. literalinclude:: ../../../../docs/code/LeedsSportsPose.py - :language: python - :start-after: """Upload Dataset""" - :end-before: """""" - -Similar with Git, the commit step after uploading can record changes to the dataset as a version. -If needed, do the modifications and commit again. -Please see :ref:`features/version_control/index:Version Control` for more details. - -************** - Read Dataset -************** - -Now "Leeds Sports Pose" dataset can be read from TensorBay. - -.. literalinclude:: ../../../../docs/code/LeedsSportsPose.py - :language: python - :start-after: """Read Dataset / get dataset""" - :end-before: """""" - -In :ref:`reference/dataset_structure:dataset` "Leeds Sports Pose", there is one -:ref:`reference/dataset_structure:segment` named ``default``. Get it by passing the segment name or the index. - -.. literalinclude:: ../../../../docs/code/LeedsSportsPose.py - :language: python - :start-after: """Read Dataset / get segment""" - :end-before: """""" - -In the default :ref:`reference/dataset_structure:segment`, there is a sequence of :ref:`reference/dataset_structure:data`, -which can be obtained by index. - -.. literalinclude:: ../../../../docs/code/LeedsSportsPose.py - :language: python - :start-after: """Read Dataset / get data""" - :end-before: """""" - -In each :ref:`reference/dataset_structure:data`, -there is a sequence of :ref:`reference/label_format/Keypoints2D:Keypoints2D` annotations, -which can be obtained by index. - -.. literalinclude:: ../../../../docs/code/LeedsSportsPose.py - :language: python - :start-after: """Read Dataset / get label""" - :end-before: """""" - -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:Keypoints2D` -label format for more details. - -**************** - Delete Dataset -**************** - -.. literalinclude:: ../../../../docs/code/LeedsSportsPose.py - :language: python - :start-after: """Delete Dataset""" - :end-before: """""" diff --git a/docs/source/quick_start/examples/NeolixOD.rst b/docs/source/quick_start/examples/NeolixOD.rst deleted file mode 100644 index 4107765db..000000000 --- a/docs/source/quick_start/examples/NeolixOD.rst +++ /dev/null @@ -1,177 +0,0 @@ -########### - Neolix OD -########### - -This topic describes how to manage the `Neolix OD dataset`_, -which is a dataset with :ref:`reference/label_format/Box3D:Box3D` label type -(:numref:`Fig. %s `). - -.. _Neolix OD dataset: https://gas.graviti.cn/dataset/graviti-open-dataset/NeolixOD - -.. _example-neolixod: - -.. figure:: ../../images/example-Box3D.png - :scale: 50 % - :align: center - - The preview of a point cloud from "Neolix OD" with Box3D labels. - -***************************** - Authorize a Client Instance -***************************** - -An :ref:`reference/glossary:accesskey` is needed to authenticate identity when using TensorBay. - -.. literalinclude:: ../../../../docs/code/NeolixOD.py - :language: python - :start-after: """Authorize a Client Instance""" - :end-before: """""" - -**************** - Create Dataset -**************** - - -.. literalinclude:: ../../../../docs/code/NeolixOD.py - :language: python - :start-after: """Create Dataset""" - :end-before: """""" - -****************** - Organize Dataset -****************** - -Normally, ``dataloader.py`` and ``catalog.json`` are required to organize the "Neolix OD" dataset into the :class:`~tensorbay.dataset.dataset.Dataset` instance. -In this example, they are stored in the same directory like:: - - Neolix OD/ - catalog.json - dataloader.py - -Step 1: Write the Catalog -========================= - -A :ref:`Catalog ` contains all label information of one dataset, -which is typically stored in a json file like ``catalog.json``. - -.. literalinclude:: ../../../../tensorbay/opendataset/NeolixOD/catalog.json - :language: json - :name: neolixod-catalog - :linenos: - -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. - -.. note:: - - By passing the path of the ``catalog.json``, :func:`~tensorbay.dataset.dataset.DatasetBase.load_catalog` supports loading the catalog into dataset. - -.. important:: - - See :ref:`catalog table ` for more catalogs with different label types. - -Step 2: Write the Dataloader -============================ - -A :ref:`reference/glossary:dataloader` is needed to organize the dataset into -a :class:`~tensorbay.dataset.dataset.Dataset` instance. - -.. literalinclude:: ../../../../tensorbay/opendataset/NeolixOD/loader.py - :language: python - :name: neolixod-dataloader - :linenos: - -See :ref:`Box3D annotation ` for more details. - - -There are already a number of dataloaders in TensorBay SDK provided by the community. -Thus, instead of writing, importing an available dataloader is also feasible. - -.. literalinclude:: ../../../../docs/code/NeolixOD.py - :language: python - :start-after: """Organize dataset / import dataloader""" - :end-before: """""" - -.. note:: - - Note that catalogs are automatically loaded in available dataloaders, users do not have to write them again. - -.. important:: - - See :ref:`dataloader table ` for dataloaders with different label types. - -******************* - Visualize Dataset -******************* - -Optionally, the organized dataset can be visualized by **Pharos**, which is a TensorBay SDK plug-in. -This step can help users to check whether the dataset is correctly organized. -Please see :ref:`features/visualization:Visualization` for more details. - -**************** - Upload Dataset -**************** - -The organized "Neolix OD" dataset can be uploaded to tensorBay for sharing, reuse, etc. - -.. literalinclude:: ../../../../docs/code/NeolixOD.py - :language: python - :start-after: """Upload Dataset""" - :end-before: """""" - -Similar with Git, the commit step after uploading can record changes to the dataset as a version. -If needed, do the modifications and commit again. -Please see :ref:`features/version_control/index:Version Control` for more details. - -************** - Read Dataset -************** - -Now "Neolix OD" dataset can be read from TensorBay. - -.. literalinclude:: ../../../../docs/code/NeolixOD.py - :language: python - :start-after: """Read Dataset / get dataset""" - :end-before: """""" - -In :ref:`reference/dataset_structure:Dataset` "Neolix OD", there is only one -:ref:`segment `: ``default``. -Get a segment by passing the required segment name or the index. - -.. literalinclude:: ../../../../docs/code/NeolixOD.py - :language: python - :start-after: """Read Dataset / get segment""" - :end-before: """""" - -In the default :ref:`reference/dataset_structure:Segment`, -there is a sequence of :ref:`reference/dataset_structure:Data`, -which can be obtained by index. - -.. literalinclude:: ../../../../docs/code/NeolixOD.py - :language: python - :start-after: """Read Dataset / get data""" - :end-before: """""" - -In each :ref:`reference/dataset_structure:Data`, -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/CommonLabelProperties:Category` is -one of the category names in "categories" list of :ref:`catalog.json `. -The information stored in :ref:`reference/label_format/CommonLabelProperties:Attributes` -is one of the attributes in "attributes" list of :ref:`catalog.json `. -See :ref:`reference/label_format/Box3D:Box3D` label format for more details. - -**************** - Delete Dataset -**************** - -.. literalinclude:: ../../../../docs/code/NeolixOD.py - :language: python - :start-after: """Delete Dataset""" - :end-before: """""" diff --git a/docs/source/quick_start/examples/Newsgroups20.rst b/docs/source/quick_start/examples/Newsgroups20.rst deleted file mode 100644 index 02045b430..000000000 --- a/docs/source/quick_start/examples/Newsgroups20.rst +++ /dev/null @@ -1,187 +0,0 @@ -############### - 20 Newsgroups -############### - -This topic describes how to manage the `20 Newsgroups dataset`_, which is a dataset -with :ref:`reference/label_format/Classification:Classification` label type. - -.. _20 Newsgroups dataset: https://gas.graviti.cn/dataset/data-decorators/Newsgroups20 - -***************************** - Authorize a Client Instance -***************************** - -An :ref:`reference/glossary:accesskey` is needed to authenticate identity when using TensorBay. - -.. literalinclude:: ../../../../docs/code/Newsgroups20.py - :language: python - :start-after: """Authorize a Client Instance""" - :end-before: """""" - -**************** - Create Dataset -**************** - -.. literalinclude:: ../../../../docs/code/Newsgroups20.py - :language: python - :start-after: """Create Dataset""" - :end-before: """""" - -****************** - Organize Dataset -****************** - -Normally, ``dataloader.py`` and ``catalog.json`` are required to organize the "20 Newsgroups" dataset into the :class:`~tensorbay.dataset.dataset.Dataset` instance. -In this example, they are stored in the same directory like:: - - 20 Newsgroups/ - catalog.json - dataloader.py - - -It takes the following steps to organize the "20 Newsgroups" dataset by -the :class:`~tensorbay.dataset.dataset.Dataset` instance. - -Step 1: Write the Catalog -========================= - -A :ref:`Catalog ` contains all label information of one dataset, -which is typically stored in a json file like ``catalog.json``. - -.. literalinclude:: ../../../../tensorbay/opendataset/Newsgroups20/catalog.json - :language: json - :name: Newsgroups20-catalog - :linenos: - -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. - -.. note:: - - * The :ref:`categories` in - :ref:`reference/dataset_structure:Dataset` "20 Newsgroups" have parent-child relationship, - and it use "." to sparate different levels. - * By passing the path of the ``catalog.json``, :func:`~tensorbay.dataset.dataset.DatasetBase.load_catalog` supports loading the catalog into dataset. - -.. important:: - - See :ref:`catalog table ` for more catalogs with different label types. - -Step 2: Write the Dataloader -============================ - -A :ref:`reference/glossary:Dataloader` is neeeded to organize the dataset into a -:class:`~tensorbay.dataset.dataset.Dataset` instance. - -.. literalinclude:: ../../../../tensorbay/opendataset/Newsgroups20/loader.py - :language: python - :name: Newsgroups20-dataloader - :linenos: - -See :ref:`Classification annotation ` for more details. - -.. note:: - - The data in "20 Newsgroups" do not have extensions - so that a "txt" extension is added to the remote path of each data file - to ensure the loaded dataset could function well on TensorBay. - - -There are already a number of dataloaders in TensorBay SDK provided by the community. -Thus, instead of writing, importing an available dataloader is also feasible. - -.. literalinclude:: ../../../../docs/code/Newsgroups20.py - :language: python - :start-after: """Organize dataset / import dataloader""" - :end-before: """""" - -.. note:: - - Note that catalogs are automatically loaded in available dataloaders, users do not have to write them again. - -.. important:: - - See :ref:`dataloader table ` for dataloaders with different label types. - -******************* - Visualize Dataset -******************* - -Optionally, the organized dataset can be visualized by **Pharos**, which is a TensorBay SDK plug-in. -This step can help users to check whether the dataset is correctly organized. -Please see :ref:`features/visualization:Visualization` for more details. - -**************** - Upload Dataset -**************** - -The organized "20 Newsgroups" dataset can be uploaded to TensorBay for sharing, reuse, etc. - -.. literalinclude:: ../../../../docs/code/Newsgroups20.py - :language: python - :start-after: """Upload Dataset""" - :end-before: """""" - -Similar with Git, the commit step after uploading can record changes to the dataset as a version. -If needed, do the modifications and commit again. -Please see :ref:`features/version_control/index:Version Control` for more details. - -************** - Read Dataset -************** - -Now "20 Newsgroups" dataset can be read from TensorBay. - -.. literalinclude:: ../../../../docs/code/Newsgroups20.py - :language: python - :start-after: """Read Dataset / get dataset""" - :end-before: """""" - -In :ref:`reference/dataset_structure:Dataset` "20 Newsgroups", there are four -:ref:`Segments `: ``20news-18828``, -``20news-bydate-test`` and ``20news-bydate-train``, ``20_newsgroups``. -Get the segment names by listing them all. - -.. literalinclude:: ../../../../docs/code/Newsgroups20.py - :language: python - :start-after: """Read Dataset / list segment names""" - :end-before: """""" - -Get a segment by passing the required segment name. - -.. literalinclude:: ../../../../docs/code/Newsgroups20.py - :language: python - :start-after: """Read Dataset / get segment""" - :end-before: """""" - -In the 20news-18828 :ref:`reference/dataset_structure:Segment`, there is a sequence of :ref:`reference/dataset_structure:Data`, -which can be obtained by index. - -.. literalinclude:: ../../../../docs/code/Newsgroups20.py - :language: python - :start-after: """Read Dataset / get data""" - :end-before: """""" - -In each :ref:`reference/dataset_structure:Data`, -there is a sequence of :ref:`reference/label_format/Classification:Classification` annotations, -which can be obtained by index. - -.. literalinclude:: ../../../../docs/code/Newsgroups20.py - :language: python - :start-after: """Read Dataset / get label""" - :end-before: """""" - -There is only one label type in "20 Newsgroups" dataset, which is ``Classification``. -The information stored in :ref:`reference/label_format/CommonLabelProperties:Category` is -one of the category names in "categories" list of :ref:`catalog.json `. -See :ref:`this page ` for more details about the -structure of Classification. - -**************** - Delete Dataset -**************** - -.. literalinclude:: ../../../../docs/code/Newsgroups20.py - :language: python - :start-after: """Delete Dataset""" - :end-before: """""" diff --git a/docs/source/quick_start/examples/THCHS30.rst b/docs/source/quick_start/examples/THCHS30.rst deleted file mode 100644 index 66020089a..000000000 --- a/docs/source/quick_start/examples/THCHS30.rst +++ /dev/null @@ -1,159 +0,0 @@ -########### - THCHS-30 -########### - -This topic describes how to manage the `THCHS-30 Dataset`_, -which is a dataset with :ref:`reference/label_format/Sentence:Sentence` label - -.. _THCHS-30 Dataset: https://www.graviti.com/open-datasets/data-decorators/THCHS30 - -***************************** - Authorize a Client Instance -***************************** - -An :ref:`reference/glossary:accesskey` is needed to authenticate identity when using TensorBay. - -.. literalinclude:: ../../../../docs/code/THCHS30.py - :language: python - :start-after: """Authorize a Client Instance""" - :end-before: """""" - -**************** - Create Dataset -**************** - -.. literalinclude:: ../../../../docs/code/THCHS30.py - :language: python - :start-after: """Create Dataset""" - :end-before: """""" - -****************** -Organize Dataset -****************** - -It takes the following steps to organize the “THCHS-30” dataset by the :class:`~tensorbay.dataset.dataset.Dataset` instance. - -Step 1: Write the Catalog -========================= - -A :ref:`Catalog ` contains all label information of one -dataset, which is typically stored in a json file. However the catalog of THCHS-30 is too -large, instead of reading it from json file, we read it by mapping from subcatalog that is -loaded by the raw file. Check the :ref:`dataloader ` below for more details. - -.. important:: - - See :ref:`catalog table ` for more catalogs with different - label types. - -Step 2: Write the Dataloader -============================ - -A :ref:`dataloader ` is needed to organize the dataset -into a :class:`~tensorbay.dataset.dataset.Dataset` instance. - -.. literalinclude:: ../../../../tensorbay/opendataset/THCHS30/loader.py - :language: python - :name: THCHS30-dataloader - :linenos: - -See :ref:`Sentence annotation ` for more details. - - -There are already a number of dataloaders in TensorBay SDK provided by the community. -Thus, instead of writing, importing an available dataloadert is also feasible. - -.. literalinclude:: ../../../../docs/code/THCHS30.py - :language: python - :start-after: """Organize dataset / import dataloader""" - :end-before: """""" - -.. note:: - - Note that catalogs are automatically loaded in available dataloaders, users do not have to write them again. - -.. important:: - - See :ref:`dataloader table ` for dataloaders with different label types. - -******************* - Visualize Dataset -******************* - -Optionally, the organized dataset can be visualized by **Pharos**, which is a TensorBay SDK plug-in. -This step can help users to check whether the dataset is correctly organized. -Please see :ref:`features/visualization:Visualization` for more details. - -**************** -Upload Dataset -**************** - -The organized "THCHS-30" dataset can be uploaded to TensorBay for sharing, reuse, etc. - -.. literalinclude:: ../../../../docs/code/THCHS30.py - :language: python - :start-after: """Upload Dataset""" - :end-before: """""" - -Similar with Git, the commit step after uploading can record changes to the dataset as a version. -If needed, do the modifications and commit again. -Please see :ref:`features/version_control/index:Version Control` for more details. - -************** -Read Dataset -************** - -Now "THCHS-30" dataset can be read from TensorBay. - -.. literalinclude:: ../../../../docs/code/THCHS30.py - :language: python - :start-after: """Read Dataset / get dataset""" - :end-before: """""" - -In :ref:`reference/dataset_structure:Dataset` "THCHS-30", there are three -:ref:`Segments `: -``dev``, ``train`` and ``test``. -Get the segment names by listing them all. - -.. literalinclude:: ../../../../docs/code/THCHS30.py - :language: python - :start-after: """Read Dataset / list segment names""" - :end-before: """""" - -Get a segment by passing the required segment name. - -.. literalinclude:: ../../../../docs/code/THCHS30.py - :language: python - :start-after: """Read Dataset / get segment""" - :end-before: """""" - -In the dev :ref:`reference/dataset_structure:Segment`, -there is a sequence of :ref:`reference/dataset_structure:Data`, -which can be obtained by index. - -.. literalinclude:: ../../../../docs/code/THCHS30.py - :language: python - :start-after: """Read Dataset / get data""" - :end-before: """""" - -In each :ref:`reference/dataset_structure:Data`, -there is a sequence of :ref:`reference/label_format/Sentence:Sentence` annotations, -which can be obtained by index. - -.. literalinclude:: ../../../../docs/code/THCHS30.py - :language: python - :start-after: """Read Dataset / get label""" - :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 ` -label format for more details. - -**************** -Delete Dataset -**************** - -.. literalinclude:: ../../../../docs/code/THCHS30.py - :language: python - :start-after: """Delete Dataset""" - :end-before: """""" diff --git a/docs/source/quick_start/examples/index.rst b/docs/source/quick_start/examples/index.rst index b8a2b89b7..ae6101df4 100644 --- a/docs/source/quick_start/examples/index.rst +++ b/docs/source/quick_start/examples/index.rst @@ -10,47 +10,47 @@ The following table lists a series of examples to help developers to use TensorB :align: center :widths: auto - ====================================================================== ========================================================================= - Examples Description - ====================================================================== ========================================================================= - :ref:`quick_start/examples/DogsVsCats:Dogs vs Cats` | Topic: Dataset Management - | Data Type: Image - | Label Type: :ref:`reference/label_format/Classification:Classification` - :ref:`quick_start/examples/Newsgroups20:20 Newsgroups` | Topic: Dataset Management - | Data Type: Text - | Label Type: :ref:`reference/label_format/Classification:Classification` - :ref:`quick_start/examples/BSTLD:BSTLD` | Topic: Dataset Management - | Data Type: Image - | Label Type: :ref:`reference/label_format/Box2D:Box2D` - :ref:`quick_start/examples/NeolixOD:Neolix OD` | Topic: Dataset Management - | Data Type: Point Cloud - | Label Type: :ref:`reference/label_format/Box3D:Box3D` - :ref:`quick_start/examples/LeedsSportsPose:Leeds Sports Pose` | Topic: Dataset Management - | Data Type: Image - | Label Type: :ref:`reference/label_format/Keypoints2D:Keypoints2D` - :ref:`quick_start/examples/THCHS30:THCHS-30` | Topic: Dataset Management - | Data Type: Audio - | Label Type: :ref:`reference/label_format/Sentence:Sentence` - :ref:`quick_start/examples/VOC2012Segmentation:VOC2012 Segmentation` | Topic: Dataset Management - | Data Type: Image - | Label Types: :ref:`reference/label_format/SemanticMask:SemanticMask`, - :ref:`reference/label_format/InstanceMask:InstanceMask` - :ref:`quick_start/examples/update_dataset:Update Dataset` | Topic: Update Dataset - :ref:`quick_start/examples/move_and_copy:Move And Copy` | Topic: Move And Copy - :ref:`quick_start/examples/merge_datasets:Merge Datasets` | Topic: Merge Datasets - :ref:`quick_start/examples/get_label_statistics:Get Label Statistics` | Topic: Get Label Statistics - ====================================================================== ========================================================================= + ========================================================================= ========================================================================= + Examples Description + ========================================================================= ========================================================================= + :ref:`quick_start/examples/generated/DogsVsCats:Dogs vs Cats` | Topic: Dataset Management + | Data Type: Image + | Label Type: :ref:`reference/label_format/Classification:Classification` + :ref:`quick_start/examples/generated/Newsgroups20:20 Newsgroups` | Topic: Dataset Management + | Data Type: Text + | Label Type: :ref:`reference/label_format/Classification:Classification` + :ref:`quick_start/examples/generated/BSTLD:BSTLD` | Topic: Dataset Management + | Data Type: Image + | Label Type: :ref:`reference/label_format/Box2D:Box2D` + :ref:`quick_start/examples/generated/NeolixOD:Neolix OD` | Topic: Dataset Management + | Data Type: Point Cloud + | Label Type: :ref:`reference/label_format/Box3D:Box3D` + :ref:`quick_start/examples/generated/LeedsSportsPose:Leeds Sports Pose` | Topic: Dataset Management + | Data Type: Image + | Label Type: :ref:`reference/label_format/Keypoints2D:Keypoints2D` + :ref:`quick_start/examples/generated/THCHS30:THCHS-30` | Topic: Dataset Management + | Data Type: Audio + | Label Type: :ref:`reference/label_format/Sentence:Sentence` + :ref:`quick_start/examples/VOC2012Segmentation:VOC2012 Segmentation` | Topic: Dataset Management + | Data Type: Image + | Label Types: :ref:`reference/label_format/SemanticMask:SemanticMask`, + :ref:`reference/label_format/InstanceMask:InstanceMask` + :ref:`quick_start/examples/update_dataset:Update Dataset` | Topic: Update Dataset + :ref:`quick_start/examples/move_and_copy:Move And Copy` | Topic: Move And Copy + :ref:`quick_start/examples/merge_datasets:Merge Datasets` | Topic: Merge Datasets + :ref:`quick_start/examples/get_label_statistics:Get Label Statistics` | Topic: Get Label Statistics + ========================================================================= ========================================================================= .. toctree:: :hidden: :maxdepth: 2 - DogsVsCats - Newsgroups20 - BSTLD - NeolixOD - LeedsSportsPose - THCHS30 + generated/DogsVsCats + generated/Newsgroups20 + generated/BSTLD + generated/NeolixOD + generated/LeedsSportsPose + generated/THCHS30 VOC2012Segmentation update_dataset move_and_copy