[Typo] Change indexes to indices (#2747)

## Modification

I just replaced the `indexes` variable name with `indices` for naming
consistency.
This commit is contained in:
Junhwa Song 2023-03-15 00:56:40 +09:00 committed by GitHub
parent 6ba4696648
commit 447a398c24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 9 deletions

View File

@ -106,11 +106,11 @@ class MultiImageMixDataset:
continue
if hasattr(transform, 'get_indices'):
indexes = transform.get_indices(self.dataset)
if not isinstance(indexes, collections.abc.Sequence):
indexes = [indexes]
indices = transform.get_indices(self.dataset)
if not isinstance(indices, collections.abc.Sequence):
indices = [indices]
mix_results = [
copy.deepcopy(self.dataset[index]) for index in indexes
copy.deepcopy(self.dataset[index]) for index in indices
]
results['mix_results'] = mix_results

View File

@ -1029,17 +1029,17 @@ class RandomMosaic(BaseTransform):
return results
def get_indices(self, dataset: MultiImageMixDataset) -> list:
"""Call function to collect indexes.
"""Call function to collect indices.
Args:
dataset (:obj:`MultiImageMixDataset`): The dataset.
Returns:
list: indexes.
list: indices.
"""
indexes = [random.randint(0, len(dataset)) for _ in range(3)]
return indexes
indices = [random.randint(0, len(dataset)) for _ in range(3)]
return indices
@cache_randomness
def generate_mosaic_center(self):

View File

@ -106,7 +106,7 @@ def mapillary_colormap2label(colormap: np.ndarray) -> list:
Returns:
list: values are mask labels,
indexes are palette's convert results.
indices are palette's convert results.
"""
colormap2label = np.zeros(256**3, dtype=np.longlong)
for i, colormap_ in enumerate(colormap):