From be2cab9c6ec747b5ff9f24b3baee4c04d222f779 Mon Sep 17 00:00:00 2001 From: Sooah Lee Date: Tue, 21 Nov 2023 16:49:37 +0900 Subject: [PATCH] Fix wrong example of Datumaro dataset creation in document (#1195) - Fix wrong example of dataset creation in document - Ticket no.125131 --- CHANGELOG.md | 4 ++++ docs/source/docs/command-reference/context_free/explorer.md | 2 +- docs/source/docs/data-formats/datumaro_format.md | 3 +-- docs/source/docs/get-started/quick-start-guide/examples.rst | 4 ++-- .../docs/level-up/intermediate_skills/08_data_validate.rst | 2 +- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 10ae607390..774733b640 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add ImageColorScale context manager () +### Bug fixes +- Fix wrong example of Datumaro dataset creation in document + () + ## 16/11/2023 - Release 1.5.1 ### Enhancements - Enhance Datumaro data format stream importer performance diff --git a/docs/source/docs/command-reference/context_free/explorer.md b/docs/source/docs/command-reference/context_free/explorer.md index 3f80ddf25b..dbddbcec22 100644 --- a/docs/source/docs/command-reference/context_free/explorer.md +++ b/docs/source/docs/command-reference/context_free/explorer.md @@ -8,7 +8,7 @@ Explorer is a feature that operates on hash basis. Once you put dataset that use To explore similar data in dataset, you need to set query first. Query could be image, text, list of images, list of texts and list of images and texts. The query does not need to be an image that exists in the dataset. You can put in any data that you want to explore similar dataset. And you need to set top-k that how much you want to find similar data. The default value for top-k is 50, so if you hope to find more smaller results, you would set top-k. For single query, we computed hamming distance of hash between whole dataset and query. And we sorted those distance and select top-k data which have short distance. For list query, we repeated computing distance for each query and select top-k data based on distance among all dataset. -The command can be applied to a dataset. And if you want to use multiple dataset as database, you could use merged dataset. The current project (`-p/--project`) is also used a context for plugins, so it can be useful for dataset paths having custom formats. When not specified, the current project's working tree is used. To save visualized result (`-s/--save`) is turned off as default. This visualized result is based on [Visualizer](../../jupyter_notebook_examples/visualizer). +The command can be applied to a dataset. And if you want to use multiple dataset as database, you could use merged dataset. The current project (`-p/--project`) is also used a context for plugins, so it can be useful for dataset paths having custom formats. When not specified, the current project's working tree is used. To save visualized result (`-s/--save`) is turned off as default. This visualized result is based on [Visualizer](../../jupyter_notebook_examples/notebooks/03_visualize). Usage: ```console diff --git a/docs/source/docs/data-formats/datumaro_format.md b/docs/source/docs/data-formats/datumaro_format.md index 37401715a9..4c2ed5d794 100644 --- a/docs/source/docs/data-formats/datumaro_format.md +++ b/docs/source/docs/data-formats/datumaro_format.md @@ -4,8 +4,7 @@ So far, in the field of computer vision, there are various tasks such as classif and segmentation, as well as pose estimation and visual tracking, and public data is used by providing a format suitable for each task. Even within the same segmentation task, some data formats provide annotation information as polygons, while others provide mask form. In order to ensure compatibility -with different tasks and formats, we provide a novel Datumaro format with `.json` ([Datumaro](../explanation/formats/datumaro.md)) or `.datum` ([DatumaroBinary](../explanation/formats/datumaro.md)) -extensions. +with different tasks and formats, we provide a novel Datumaro format with `.json` ([Datumaro](./formats/datumaro)) or `.datum` ([DatumaroBinary](./formats/datumaro_binary)) extensions. A variety of metadata can be stored in the datumaro format. First of all, `dm_format_version` field is provided for backward compatibility to help with data version tracing and various metadata can be diff --git a/docs/source/docs/get-started/quick-start-guide/examples.rst b/docs/source/docs/get-started/quick-start-guide/examples.rst index 27cec1021a..9fc1a59aed 100644 --- a/docs/source/docs/get-started/quick-start-guide/examples.rst +++ b/docs/source/docs/get-started/quick-start-guide/examples.rst @@ -85,9 +85,9 @@ Examples import numpy as np import datumaro as dm - dataset = dm.Dataset([ + dataset = dm.Dataset.from_iterable([ dm.DatasetItem(id='image1', subset='train', - image=np.ones((5, 5, 3)), + media=dm.Image.from_numpy(data=np.ones((5, 5, 3))), annotations=[ dm.Bbox(1, 2, 3, 4, label=0), ] diff --git a/docs/source/docs/level-up/intermediate_skills/08_data_validate.rst b/docs/source/docs/level-up/intermediate_skills/08_data_validate.rst index d9114821c4..f6f6aa5f33 100644 --- a/docs/source/docs/level-up/intermediate_skills/08_data_validate.rst +++ b/docs/source/docs/level-up/intermediate_skills/08_data_validate.rst @@ -10,7 +10,7 @@ be paid, and sometimes it may be necessary to filter or correct the data in adva data validation functionality for this purpose. More detailed descriptions about validation errors and warnings are given by :ref:`here `. -The Python example for the usage of validator is described in this `notebook <../../jupyter_notebook_examples/notebooks/11_validate>`_. +The Python example for the usage of validator is described in this :doc:`notebook <../../jupyter_notebook_examples/notebooks/11_validate>`. .. tab-set::