Skip to content

Commit

Permalink
fixup tabs to spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
poodarchu committed Oct 24, 2023
1 parent b4baf00 commit f3320d4
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions efg/data/datasets/nuscenes/nuscenes.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ def drop_arrays_by_name(gt_names, used_classes):
Drop indices of ground truth arrays that are not used in class. This is useful for dropping arrays that are used in classification or regression algorithms
Args:
gt_names: List of ground truth names
used_classes: List of classes used in classification or regression algorithms
gt_names: List of ground truth names
used_classes: List of classes used in classification or regression algorithms
Returns:
np. array of indices of ground truth arrays that are not used in class ( s ) and are
np. array of indices of ground truth arrays that are not used in class ( s ) and are
"""
inds = [i for i, x in enumerate(gt_names) if x not in used_classes]
inds = np.array(inds, dtype=np.int64)
Expand All @@ -40,7 +40,7 @@ def __init__(self, config):
Initialize the class. This is called by __init__ and should not be called directly. The purpose of this method is to set the attributes that depend on the config passed in
Args:
config: Configuration object that contains the
config: Configuration object that contains the
"""
super(nuScenesDetectionDataset, self).__init__(config)
self.config = config
Expand Down Expand Up @@ -87,7 +87,7 @@ def _get_metadata(self):
Returns:
A dictionary that can be used to create the data set's metadata ( class_names mapped_class_names etc
A dictionary that can be used to create the data set's metadata ( class_names mapped_class_names etc
"""
mapped_class_names = []
# Add classes to the mapped class names.
Expand Down Expand Up @@ -115,7 +115,7 @@ def load_infos(self):
Returns:
list of dicts with information about
list of dicts with information about
"""
_nusc_infos_all = pickle.load(PathManager.open(self.info_path, "rb"))

Expand Down Expand Up @@ -168,7 +168,7 @@ def __len__(self):
Returns:
The number of datasets in the dataset_dicts dictionary or None if there are no datasets in the dataset
The number of datasets in the dataset_dicts dictionary or None if there are no datasets in the dataset
"""
return len(self.dataset_dicts)

Expand All @@ -177,10 +177,10 @@ def __getitem__(self, idx):
Return data for a given index. This is a wrapper around self. __getitem__ that works in a way that does not have to be called directly.
Args:
idx: index of the dataset to return. Must be in range 0.. nsweeps - 1
idx: index of the dataset to return. Must be in range 0.. nsweeps - 1
Returns:
tuple of ( lidar_points sweep_times
tuple of ( lidar_points sweep_times
"""
info = deepcopy(self.dataset_dicts[idx])

Expand Down Expand Up @@ -260,7 +260,7 @@ def _filter_gt_by_classes(self, info):
Filter groundtruth annotations by class. This is a helper method for : meth : ` _annotate_gts `.
Args:
info: dict - like object containing annotation information to filter
info: dict - like object containing annotation information to filter
"""
target = info["annotations"]
keep = (target["gt_names"][:, None] == self.class_names).any(axis=1)
Expand All @@ -271,7 +271,7 @@ def _add_class_labels_to_annos(self, info):
Add labels to annotations. This is used to make sure that the class labels are in the correct order
Args:
info: dict - like object containing
info: dict - like object containing
"""
info["annotations"]["labels"] = (
np.array([self.class_names.index(name) + 1 for name in info["annotations"]["gt_names"]])
Expand Down

0 comments on commit f3320d4

Please sign in to comment.