diff --git a/efg/data/datasets/nuscenes/nuscenes.py b/efg/data/datasets/nuscenes/nuscenes.py index acec383..11310d1 100644 --- a/efg/data/datasets/nuscenes/nuscenes.py +++ b/efg/data/datasets/nuscenes/nuscenes.py @@ -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) @@ -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 @@ -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. @@ -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")) @@ -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) @@ -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]) @@ -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) @@ -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"]])