From ea8aad5c4ba5744980212fe09a7199d09353e785 Mon Sep 17 00:00:00 2001 From: Roman Donchenko Date: Tue, 25 May 2021 19:53:36 +0300 Subject: [PATCH] Fix spelling errors --- CHANGELOG.md | 4 ++-- README.md | 4 ++-- datumaro/components/extractor.py | 6 +++--- datumaro/components/operations.py | 6 +++--- datumaro/plugins/accuracy_checker_plugin/details/ac.py | 4 ++-- .../accuracy_checker_plugin/details/representation.py | 4 ++-- datumaro/plugins/cifar_format.py | 4 ++-- datumaro/plugins/ndr.py | 6 +++--- datumaro/plugins/splitter.py | 6 +++--- docs/cli_design.mm | 2 +- docs/developer_guide.md | 2 +- docs/formats/cityscapes_user_manual.md | 2 +- docs/formats/coco_user_manual.md | 2 +- docs/user_manual.md | 2 +- tests/cli/test_voc_format.py | 6 +++--- tests/test_dataset.py | 2 +- 16 files changed, 31 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e85315d9d1..2009358aca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Added -- Support for escaping in attribiute values in LabelMe format () +- Support for escaping in attribute values in LabelMe format () - Support for Segmentation Splitting () - Support for CIFAR-10/100 dataset format (, ) - Support for COCO panoptic and stuff format () @@ -175,7 +175,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - `CamVid` dataset format () - Ability to install `opencv-python-headless` dependency with `DATUMARO_HEADLESS=1` - enviroment variable instead of `opencv-python` () + environment variable instead of `opencv-python` () ### Changed - Allow empty supercategory in COCO () diff --git a/README.md b/README.md index 2c5957f522..559eac4762 100644 --- a/README.md +++ b/README.md @@ -152,7 +152,7 @@ CVAT annotations ---> Publication, statistics etc. - keep only vertically-oriented images - remove small area bounding boxes from annotations - Annotation conversions, for instance: - - polygons to instance masks and vise-versa + - polygons to instance masks and vice-versa - apply a custom colormap for mask annotations - rename or remove dataset labels - Splitting a dataset into multiple subsets like `train`, `val`, and `test`: @@ -170,7 +170,7 @@ CVAT annotations ---> Publication, statistics etc. - sampling with Entropy based algorithm - Dataset quality checking - Simple checking for errors - - Comparison with model infernece + - Comparison with model inference - Merging and comparison of multiple datasets - Annotation validation based on the task type(classification, etc) - Dataset comparison diff --git a/datumaro/components/extractor.py b/datumaro/components/extractor.py index ebeaf01ecc..e8cc4f89c9 100644 --- a/datumaro/components/extractor.py +++ b/datumaro/components/extractor.py @@ -1,5 +1,5 @@ -# Copyright (C) 2019-2020 Intel Corporation +# Copyright (C) 2019-2021 Intel Corporation # # SPDX-License-Identifier: MIT @@ -69,7 +69,7 @@ def from_iterable(cls, iterable): iterable ([type]): This iterable object can be: 1)simple str - will generate one Category with str as name 2)list of str - will interpreted as list of Category names - 3)list of positional argumetns - will generate Categories + 3)list of positional arguments - will generate Categories with this arguments @@ -448,7 +448,7 @@ def from_iterable(cls, iterable): Args: iterable ([type]): This iterable object can be: - 1) list of positional argumetns - will generate Categories + 1) list of positional arguments - will generate Categories with these arguments Returns: diff --git a/datumaro/components/operations.py b/datumaro/components/operations.py index db3c9c3889..bfe26aec99 100644 --- a/datumaro/components/operations.py +++ b/datumaro/components/operations.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020 Intel Corporation +# Copyright (C) 2020-2021 Intel Corporation # # SPDX-License-Identifier: MIT @@ -153,7 +153,7 @@ class Conf: quorum = attrib(converter=int, default=0) ignored_attributes = attrib(converter=set, factory=set) - def _groups_conveter(value): + def _groups_converter(value): result = [] for group in value: rg = set() @@ -163,7 +163,7 @@ def _groups_conveter(value): rg.add((name, optional)) result.append(rg) return result - groups = attrib(converter=_groups_conveter, factory=list) + groups = attrib(converter=_groups_converter, factory=list) close_distance = attrib(converter=float, default=0.75) conf = attrib(converter=ensure_cls(Conf), factory=Conf) diff --git a/datumaro/plugins/accuracy_checker_plugin/details/ac.py b/datumaro/plugins/accuracy_checker_plugin/details/ac.py index 4fc2ffb5c6..b235e57848 100644 --- a/datumaro/plugins/accuracy_checker_plugin/details/ac.py +++ b/datumaro/plugins/accuracy_checker_plugin/details/ac.py @@ -1,10 +1,10 @@ -# Copyright (C) 2020 Intel Corporation +# Copyright (C) 2020-2021 Intel Corporation # # SPDX-License-Identifier: MIT from datumaro.util.tf_util import import_tf -import_tf() # prevent TF loading and potential interpeter crash +import_tf() # prevent TF loading and potential interpreter crash from itertools import groupby diff --git a/datumaro/plugins/accuracy_checker_plugin/details/representation.py b/datumaro/plugins/accuracy_checker_plugin/details/representation.py index d7007806bf..76da49ee0a 100644 --- a/datumaro/plugins/accuracy_checker_plugin/details/representation.py +++ b/datumaro/plugins/accuracy_checker_plugin/details/representation.py @@ -1,10 +1,10 @@ -# Copyright (C) 2020 Intel Corporation +# Copyright (C) 2020-2021 Intel Corporation # # SPDX-License-Identifier: MIT from datumaro.util.tf_util import import_tf -import_tf() # prevent TF loading and potential interpeter crash +import_tf() # prevent TF loading and potential interpreter crash import accuracy_checker.representation as ac diff --git a/datumaro/plugins/cifar_format.py b/datumaro/plugins/cifar_format.py index 287f00de8e..e2a2bec12b 100644 --- a/datumaro/plugins/cifar_format.py +++ b/datumaro/plugins/cifar_format.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020 Intel Corporation +# Copyright (C) 2020-2021 Intel Corporation # # SPDX-License-Identifier: MIT @@ -161,7 +161,7 @@ def apply(self): annotation_dict['data'] = np.array(data) if len(image_sizes): size = (CifarPath.IMAGE_SIZE, CifarPath.IMAGE_SIZE) - # 'image_sizes' isn't included in the standart format, + # 'image_sizes' isn't included in the standard format, # needed for different image sizes annotation_dict['image_sizes'] = [image_sizes.get(p, size) for p in range(len(data))] diff --git a/datumaro/plugins/ndr.py b/datumaro/plugins/ndr.py index df82e17935..b92945bbad 100644 --- a/datumaro/plugins/ndr.py +++ b/datumaro/plugins/ndr.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020 Intel Corporation +# Copyright (C) 2020-2021 Intel Corporation # # SPDX-License-Identifier: MIT @@ -173,7 +173,7 @@ def _remove(self): (item.id, len(img.shape))) if self.algorithm == Algorithm.gradient: - # Caculate gradient + # Calculate gradient img = self._cgrad_feature(img) else : raise NotImplementedError() @@ -267,7 +267,7 @@ def _keep_cut(self, num_cut, all_key, fidx, # of the collision(number of same hash key) # [x1, x2, y1, y2, y3, y4, z1, z2, z3]. x, y and z for hash key # i.e. there are 4 elements which have hash key y. - # then the occurence will be [2, 4, 3] and reverse of them + # then the occurrence will be [2, 4, 3] and reverse of them # will be [1/2, 1/4, 1/3] # Normalizing them by dividing with sum, we get [6/13, 3/13, 4/13] # Then the key x will be sampled with probability 6/13 diff --git a/datumaro/plugins/splitter.py b/datumaro/plugins/splitter.py index 786828b3c5..5d414e1333 100644 --- a/datumaro/plugins/splitter.py +++ b/datumaro/plugins/splitter.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020 Intel Corporation +# Copyright (C) 2020-2021 Intel Corporation # # SPDX-License-Identifier: MIT @@ -31,7 +31,7 @@ class Split(Transform, CliPlugin): Each image can have multiple object annotations - (bbox, mask, polygon). Since an image shouldn't be included in multiple subsets at the same time, and image annotations - shoudln't be split, in general, dataset annotations are unlikely + shouldn't be split, in general, dataset annotations are unlikely to be split exactly in the specified ratio. |n This split tries to split dataset images as close as possible to the specified ratio, keeping the initial class distribution.|n @@ -684,7 +684,7 @@ class _InstanceSpecificSplit(_TaskSpecificSplit): each image can have multiple object annotations - (instance bounding boxes, masks, polygons). Since an image shouldn't be included in multiple subsets at the same time, and image annotations - shoudln't be split, in general, dataset annotations are unlikely to be split + shouldn't be split, in general, dataset annotations are unlikely to be split exactly in the specified ratio. |n This split tries to split dataset images as close as possible to the specified ratio, keeping the initial class distribution.|n diff --git a/docs/cli_design.mm b/docs/cli_design.mm index 0ff17cb299..9e2eddaceb 100644 --- a/docs/cli_design.mm +++ b/docs/cli_design.mm @@ -9,7 +9,7 @@ - + diff --git a/docs/developer_guide.md b/docs/developer_guide.md index 2bfab0e5b8..e8eff1bcf8 100644 --- a/docs/developer_guide.md +++ b/docs/developer_guide.md @@ -72,7 +72,7 @@ class colors for masks, class attributes. This information is stored in `dataset.categories`, which is a mapping from `AnnotationType` to a corresponding `...Categories` class. Each annotation type can have its `Categories`. Typically, there will be a `LabelCategories` object. -Annotations and other categories adress dataset labels +Annotations and other categories address dataset labels by their indices in this object. The main operation for a dataset is iteration over its elements. diff --git a/docs/formats/cityscapes_user_manual.md b/docs/formats/cityscapes_user_manual.md index f8e98b71b3..534f91c726 100644 --- a/docs/formats/cityscapes_user_manual.md +++ b/docs/formats/cityscapes_user_manual.md @@ -133,7 +133,7 @@ to get more information about these operations. There are few examples of using Datumaro operations to solve particular problems with Cityscapes dataset: -### Example 1. How to load an original Cityscapes dataset ans convert to Pascal VOC +### Example 1. How to load an original Cityscapes dataset and convert to Pascal VOC ```bash datum create -o project diff --git a/docs/formats/coco_user_manual.md b/docs/formats/coco_user_manual.md index 2f824dd11a..5b2d379016 100644 --- a/docs/formats/coco_user_manual.md +++ b/docs/formats/coco_user_manual.md @@ -181,7 +181,7 @@ to get more information about these operations. There are few examples of using Datumaro operations to solve particular problems with COCO dataset: -### Example 1. How to load an original panoptic COCO dataset ans convert to Pascal VOC +### Example 1. How to load an original panoptic COCO dataset and convert to Pascal VOC ```bash datum create -o project diff --git a/docs/user_manual.md b/docs/user_manual.md index b757c4b1ad..2a83cec341 100644 --- a/docs/user_manual.md +++ b/docs/user_manual.md @@ -1348,7 +1348,7 @@ pip install 'git+https://github.com/openvinotoolkit/open_model_zoo.git#subdirect #### OpenVINO™ This plugin provides support for model inference with [OpenVINO™](https://01.org/openvinotoolkit). -The plugin depends on the OpenVINO™ Tookit, which can be installed by +The plugin depends on the OpenVINO™ Toolkit, which can be installed by following [these instructions](https://docs.openvinotoolkit.org/latest/index.html#packaging_and_deployment) ### Dataset Formats diff --git a/tests/cli/test_voc_format.py b/tests/cli/test_voc_format.py index c1516bcda2..8a686e4f58 100644 --- a/tests/cli/test_voc_format.py +++ b/tests/cli/test_voc_format.py @@ -68,13 +68,13 @@ def test_preparing_dataset_for_train_model(self): run(self, 'filter', '-p', test_dir, '-m', 'i+a', '-e', "/item/annotation[occluded='False']", '-o', result_path) - splitted_path = osp.join(test_dir, 'splitted') - run(self, 'transform', '-p', result_path, '-o', splitted_path, + split_path = osp.join(test_dir, 'split') + run(self, 'transform', '-p', result_path, '-o', split_path, '-t', 'random_split', '--', '-s', 'test:.5', '-s', 'train:.5', '--seed', '1') export_path = osp.join(test_dir, 'dataset') - run(self, 'export', '-p', splitted_path, '-f', 'voc', + run(self, 'export', '-p', split_path, '-f', 'voc', '-o', export_path, '--', '--label-map', 'voc') parsed_dataset = Dataset.import_from(export_path, format='voc') diff --git a/tests/test_dataset.py b/tests/test_dataset.py index 37f83c6f45..cb8a776c02 100644 --- a/tests/test_dataset.py +++ b/tests/test_dataset.py @@ -458,7 +458,7 @@ def __iter__(self): self.assertTrue(iter_called) - def test_can_chain_lazy_tranforms(self): + def test_can_chain_lazy_transforms(self): iter_called = False class TestExtractor(Extractor): def __iter__(self):