".github/git@developer.sourcefind.cn:OpenDAS/ollama.git" did not exist on "f9d2d8913554d78b1cae47c5eaa9cbbd0ea79273"
Commit 673a54de authored by liyinhao's avatar liyinhao Committed by zhangwenwei
Browse files

Fix docstring problems

parent 701e5032
...@@ -5,7 +5,7 @@ from mmdet3d.core.bbox.iou_calculators.iou3d_calculator import bbox_overlaps_3d ...@@ -5,7 +5,7 @@ from mmdet3d.core.bbox.iou_calculators.iou3d_calculator import bbox_overlaps_3d
def boxes3d_depth_to_lidar(boxes3d, mid_to_bottom=True): def boxes3d_depth_to_lidar(boxes3d, mid_to_bottom=True):
"""Boxes3d Depth to Lidar. """Boxes3d depth to lidar.
Flip X-right,Y-forward,Z-up to X-forward,Y-left,Z-up. Flip X-right,Y-forward,Z-up to X-forward,Y-left,Z-up.
...@@ -93,7 +93,7 @@ def eval_det_cls(pred, gt, iou_thr=None): ...@@ -93,7 +93,7 @@ def eval_det_cls(pred, gt, iou_thr=None):
Args: Args:
pred (dict): {img_id: [(bbox, score)]} where bbox is numpy array. pred (dict): {img_id: [(bbox, score)]} where bbox is numpy array.
gt (dict): {img_id: [bbox]}. gt (dict): {img_id: [bbox]}.
iou_thr (List[float]): a list, iou threshold. iou_thr (list[float]): a list, iou threshold.
Return: Return:
ndarray: numpy array of length nd. ndarray: numpy array of length nd.
...@@ -193,16 +193,16 @@ def eval_det_cls(pred, gt, iou_thr=None): ...@@ -193,16 +193,16 @@ def eval_det_cls(pred, gt, iou_thr=None):
def eval_map_recall(det_infos, gt_infos, ovthresh=None): def eval_map_recall(det_infos, gt_infos, ovthresh=None):
"""Evaluate mAP and Recall. """Evaluate mAP and recall.
Generic functions to compute precision/recall for object detection Generic functions to compute precision/recall for object detection
for multiple classes. for multiple classes.
Args: Args:
det_infos (List[ListList[[tuple]]]): Label, bbox and det_infos (list[list[list[tuple]]]): Label, bbox and
score of the detection result. score of the detection result.
gt_infos (List[List[List]]): Label, bbox of the groundtruth. gt_infos (list[list[list]]): Label, bbox of the groundtruth.
ovthresh (List[float]): iou threshold. ovthresh (list[float]): iou threshold.
Default: None. Default: None.
Return: Return:
...@@ -267,9 +267,9 @@ def indoor_eval(gt_annos, dt_annos, metric, label2cat): ...@@ -267,9 +267,9 @@ def indoor_eval(gt_annos, dt_annos, metric, label2cat):
Evaluate the result of the detection. Evaluate the result of the detection.
Args: Args:
gt_annos (List[List[dict]]): GT annotations. gt_annos (list[list[dict]]): GT annotations.
dt_annos (List[List[List[tuple]]]): Detection annotations. dt_annos (list[list[List[tuple]]]): Detection annotations.
metric (List[float]): AP IoU thresholds. metric (list[float]): AP IoU thresholds.
label2cat (dict): {label: cat}. label2cat (dict): {label: cat}.
Return: Return:
......
...@@ -98,12 +98,12 @@ class IndoorBaseDataset(torch_data.Dataset): ...@@ -98,12 +98,12 @@ class IndoorBaseDataset(torch_data.Dataset):
return class_names return class_names
def _generate_annotations(self, output): def _generate_annotations(self, output):
"""Generate Annotations. """Generate annotations.
Transform results of the model to the form of the evaluation. Transform results of the model to the form of the evaluation.
Args: Args:
output (List): The output of the model. output (list): The output of the model.
""" """
result = [] result = []
bs = len(output) bs = len(output)
...@@ -140,8 +140,8 @@ class IndoorBaseDataset(torch_data.Dataset): ...@@ -140,8 +140,8 @@ class IndoorBaseDataset(torch_data.Dataset):
Evaluation in indoor protocol. Evaluation in indoor protocol.
Args: Args:
results (List): List of result. results (list): List of result.
metric (List[float]): AP IoU thresholds. metric (list[float]): AP IoU thresholds.
""" """
results = self.format_results(results) results = self.format_results(results)
from mmdet3d.core.evaluation import indoor_eval from mmdet3d.core.evaluation import indoor_eval
......
...@@ -5,10 +5,10 @@ from mmdet.datasets.builder import PIPELINES ...@@ -5,10 +5,10 @@ from mmdet.datasets.builder import PIPELINES
@PIPELINES.register_module() @PIPELINES.register_module()
class IndoorFlipData(object): class IndoorFlipData(object):
"""Indoor Flip Data. """Indoor flip data.
Flip point cloud and ground truth boxes. Flip point cloud and ground truth boxes.
The point cloud will ve flipped along the yz plane The point cloud will be flipped along the yz plane
and the xz plane with a certain probability. and the xz plane with a certain probability.
Args: Args:
...@@ -53,19 +53,19 @@ class IndoorFlipData(object): ...@@ -53,19 +53,19 @@ class IndoorFlipData(object):
@PIPELINES.register_module() @PIPELINES.register_module()
class IndoorPointsColorJitter(object): class IndoorPointsColorJitter(object):
"""Indoor Points Color Jitter. """Indoor points color jitter.
Randomly change the brightness and color of the point cloud, and Randomly change the brightness and color of the point cloud, and
drop out the points' colors with a certain range and probability. drop out the points' colors with a certain range and probability.
Args: Args:
color_mean (List[float]): Mean color of the point cloud. color_mean (list[float]): Mean color of the point cloud.
Default: [0.5, 0.5, 0.5]. Default: [0.5, 0.5, 0.5].
bright_range (List[float]): Range of brightness. bright_range (list[float]): Range of brightness.
Default: [0.8, 1.2]. Default: [0.8, 1.2].
color_shift_range (List[float]): Range of color shift. color_shift_range (list[float]): Range of color shift.
Default: [0.95, 1.05]. Default: [0.95, 1.05].
jitter_range (List[float]): Range of jittering. jitter_range (list[float]): Range of jittering.
Default: [-0.025, 0.025]. Default: [-0.025, 0.025].
drop_prob (float): Probability to drop out points' color. drop_prob (float): Probability to drop out points' color.
Default: 0.3 Default: 0.3
...@@ -118,16 +118,16 @@ class IndoorPointsColorJitter(object): ...@@ -118,16 +118,16 @@ class IndoorPointsColorJitter(object):
# TODO: try transform noise. # TODO: try transform noise.
@PIPELINES.register_module() @PIPELINES.register_module()
class IndoorGlobalRotScale(object): class IndoorGlobalRotScale(object):
"""Indoor Global Rotate Scale. """Indoor global rotate and scale.
Augment sunrgbd and scannet data with global rotating and scaling. Augment sunrgbd and scannet data with global rotating and scaling.
Args: Args:
use_height (bool): Whether to use height. use_height (bool): Whether to use height.
Default: True. Default: True.
rot_range (List[float]): Range of rotation. rot_range (list[float]): Range of rotation.
Default: None. Default: None.
scale_range (List[float]): Range of scale. scale_range (list[float]): Range of scale.
Default: None. Default: None.
""" """
...@@ -153,7 +153,7 @@ class IndoorGlobalRotScale(object): ...@@ -153,7 +153,7 @@ class IndoorGlobalRotScale(object):
return rot_mat return rot_mat
def _rotate_aligned_boxes(self, input_boxes, rot_mat): def _rotate_aligned_boxes(self, input_boxes, rot_mat):
"""Rotate Aligned Boxes. """Rotate aligned boxes.
Rotate function for the aligned boxes. Rotate function for the aligned boxes.
......
...@@ -6,12 +6,12 @@ from mmdet.datasets.builder import PIPELINES ...@@ -6,12 +6,12 @@ from mmdet.datasets.builder import PIPELINES
@PIPELINES.register_module() @PIPELINES.register_module()
class IndoorPointsColorNormalize(object): class IndoorPointsColorNormalize(object):
"""Indoor Points Color Normalize """Indoor points color normalize
Normalize color of the points. Normalize color of the points.
Args: Args:
color_mean (List[float]): Mean color of the point cloud. color_mean (list[float]): Mean color of the point cloud.
""" """
def __init__(self, color_mean): def __init__(self, color_mean):
...@@ -33,7 +33,7 @@ class IndoorPointsColorNormalize(object): ...@@ -33,7 +33,7 @@ class IndoorPointsColorNormalize(object):
@PIPELINES.register_module() @PIPELINES.register_module()
class IndoorLoadPointsFromFile(object): class IndoorLoadPointsFromFile(object):
"""Indoor Load Points From File. """Indoor load points from file.
Load sunrgbd and scannet points from file. Load sunrgbd and scannet points from file.
...@@ -41,7 +41,7 @@ class IndoorLoadPointsFromFile(object): ...@@ -41,7 +41,7 @@ class IndoorLoadPointsFromFile(object):
use_height (bool): Whether to use height. use_height (bool): Whether to use height.
load_dim (int): The dimension of the loaded points. load_dim (int): The dimension of the loaded points.
Default: 6. Default: 6.
use_dim (List[int]): Which dimensions of the points to be used. use_dim (list[int]): Which dimensions of the points to be used.
Default: [0, 1, 2]. Default: [0, 1, 2].
""" """
...@@ -78,7 +78,7 @@ class IndoorLoadPointsFromFile(object): ...@@ -78,7 +78,7 @@ class IndoorLoadPointsFromFile(object):
@PIPELINES.register_module() @PIPELINES.register_module()
class IndoorLoadAnnotations3D(object): class IndoorLoadAnnotations3D(object):
"""Indoor Load Annotations3D. """Indoor load annotations3D.
Load instance mask and semantic mask of points. Load instance mask and semantic mask of points.
""" """
......
...@@ -5,7 +5,7 @@ from mmdet.datasets.builder import PIPELINES ...@@ -5,7 +5,7 @@ from mmdet.datasets.builder import PIPELINES
@PIPELINES.register_module() @PIPELINES.register_module()
class IndoorPointSample(object): class IndoorPointSample(object):
"""Point Sample. """Indoor point sample.
Sampling data to a certain number. Sampling data to a certain number.
...@@ -22,7 +22,7 @@ class IndoorPointSample(object): ...@@ -22,7 +22,7 @@ class IndoorPointSample(object):
num_samples, num_samples,
replace=None, replace=None,
return_choices=False): return_choices=False):
"""Points Random Sampling. """Points random sampling.
Sample points to a certain number. Sample points to a certain number.
...@@ -34,7 +34,7 @@ class IndoorPointSample(object): ...@@ -34,7 +34,7 @@ class IndoorPointSample(object):
Returns: Returns:
points (ndarray): 3D Points. points (ndarray): 3D Points.
choices (ndarray): The generated random samples choices (ndarray): The generated random samples.
""" """
if replace is None: if replace is None:
replace = (points.shape[0] < num_samples) replace = (points.shape[0] < num_samples)
......
...@@ -9,7 +9,7 @@ def create_indoor_info_file(data_path, ...@@ -9,7 +9,7 @@ def create_indoor_info_file(data_path,
pkl_prefix='sunrgbd', pkl_prefix='sunrgbd',
save_path=None, save_path=None,
use_v1=False): use_v1=False):
"""Create indoor information file. """Create indoor information file.
Get information of the raw data and save it to the pkl file. Get information of the raw data and save it to the pkl file.
......
...@@ -6,12 +6,12 @@ import numpy as np ...@@ -6,12 +6,12 @@ import numpy as np
class ScanNetData(object): class ScanNetData(object):
"""ScanNet Data """ScanNet data.
Generate scannet infos for scannet_converter Generate scannet infos for scannet_converter.
Args: Args:
root_path (str): Root path of the raw data root_path (str): Root path of the raw data.
split (str): Set split type of the data. Default: 'train'. split (str): Set split type of the data. Default: 'train'.
""" """
...@@ -56,11 +56,11 @@ class ScanNetData(object): ...@@ -56,11 +56,11 @@ class ScanNetData(object):
Args: Args:
num_workers (int): Number of threads to be used. Default: 4. num_workers (int): Number of threads to be used. Default: 4.
has_label (bool): Whether the data has label. Default: True. has_label (bool): Whether the data has label. Default: True.
sample_id_list (List[int]): Index list of the sample. sample_id_list (list[int]): Index list of the sample.
Default: None. Default: None.
Returns: Returns:
infos (List[dict]): Information of the raw data. infos (list[dict]): Information of the raw data.
""" """
def process_single_scene(sample_idx): def process_single_scene(sample_idx):
......
...@@ -7,7 +7,7 @@ import scipy.io as sio ...@@ -7,7 +7,7 @@ import scipy.io as sio
def random_sampling(points, num_points, replace=None, return_choices=False): def random_sampling(points, num_points, replace=None, return_choices=False):
"""Random Sampling. """Random sampling.
Sampling point cloud to a certain number of points. Sampling point cloud to a certain number of points.
...@@ -57,9 +57,9 @@ class SUNRGBDInstance(object): ...@@ -57,9 +57,9 @@ class SUNRGBDInstance(object):
class SUNRGBDData(object): class SUNRGBDData(object):
"""SUNRGBD Data """SUNRGBD data.
Generate scannet infos for sunrgbd_converter Generate scannet infos for sunrgbd_converter.
Args: Args:
root_path (str): Root path of the raw data. root_path (str): Root path of the raw data.
...@@ -130,11 +130,11 @@ class SUNRGBDData(object): ...@@ -130,11 +130,11 @@ class SUNRGBDData(object):
Args: Args:
num_workers (int): Number of threads to be used. Default: 4. num_workers (int): Number of threads to be used. Default: 4.
has_label (bool): Whether the data has label. Default: True. has_label (bool): Whether the data has label. Default: True.
sample_id_list (List[int]): Index list of the sample. sample_id_list (list[int]): Index list of the sample.
Default: None. Default: None.
Returns: Returns:
infos (List[dict]): Information of the raw data. infos (list[dict]): Information of the raw data.
""" """
def process_single_scene(sample_idx): def process_single_scene(sample_idx):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment