-
Notifications
You must be signed in to change notification settings - Fork 9.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add doc #3125
Add doc #3125
Conversation
mmdet/core/mask/structures.py
Outdated
Returns: | ||
BitmapMasks: the rescaled masks | ||
""" | ||
"""See `BaseInstanceMasks.rescale()`.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:func:`BaseInstanceMasks.rescale()`
|
||
Args: | ||
feats (Tensor): Features of a single scale level with shape | ||
(N, C, H, W). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong args.
image in [tl_x, tl_y, br_x, br_y] format. | ||
gt_labels (list[Tensor]): class indices corresponding to each box | ||
img_metas (list[dict]): Size / scale info for each image | ||
gt_bboxes_ignore (None | list[Tensor]): specify which bounding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
list[Tensor] | None
img_metas (list[dict]): Size / scale info for each image | ||
cfg (mmcv.Config): Test / postprocessing configuration, | ||
if None, test_cfg would be used | ||
rescale (bool): If True, return boxes in original image space |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default: False.
level with shape (N, num_anchors * 1, H, W) | ||
img_metas (list[dict]): Size / scale info for each image | ||
cfg (mmcv.Config): Test / postprocessing configuration, | ||
if None, test_cfg would be used |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default: None.
@@ -252,6 +321,28 @@ def get_bboxes(self, | |||
img_metas, | |||
cfg=None, | |||
rescale=False): | |||
"""Transform network output for a batch into labeled boxes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
labeled boxes -> bbox predictions.
rescale (bool): If True, return boxes in original image space. | ||
|
||
Returns: | ||
Tensor: Labeled boxes in shape (n, 5), where the first 4 columns |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong type.
The first item is an (n, 5) tensor, where the first 4 columns | ||
are bounding box positions (tl_x, tl_y, br_x, br_y) and the | ||
5-th column is a score between 0 and 1. The second item is a | ||
(n,) tensor where each item is the class index of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class index -> predicted class label
image with shape (N, 4). | ||
bbox_weights (Tensor): BBox weights of all anchors in the | ||
image with shape (N, 4) | ||
pos_inds (Tensor): Inds of postive anchor with shape |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inds -> Indices
level with shape (N, num_points * 4, H, W). | ||
centernesses (list[Tensor]): Centerss for each scale level with | ||
shape (N, num_points * 1, H, W). | ||
gt_bboxes (list[Tensor]): each item are the truth boxes for each |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gt_bboxes (list[Tensor]): Ground truth bboxes for each image with shape (num_gts, 4) in [tl_x, tl_y, br_x, br_y] format.
gt_bboxes (list[Tensor]): each item are the truth boxes for each | ||
image in [tl_x, tl_y, br_x, br_y] format. | ||
gt_labels (list[Tensor]): class indices corresponding to each box | ||
img_metas (list[dict]): Size / scale info for each image |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meta information of each image, e.g., image size, scaling factor, etc.
Returns: | ||
tuple: | ||
concat_lvl_labels: Labels of each level | ||
concat_lvl_bbox_targets: BBox targets of each level |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specify the types.
Args: | ||
points (list[Tensor]): Points of each fpn level. | ||
gt_bboxes_list (list[Tensor]): Ground truth bboxes of each image. | ||
gt_labels_list (list[Tensor]): Ground truth labels of each box. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Illustrate the tensor shapes.
bbox_thr: The threshold of the saturated linear function. It is | ||
usually the same with the IoU threshold used in NMS. | ||
gamma (float): Gamma parameter in focal loss. | ||
alpha: Alpha parameter in focal loss. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type
"""Compute negative bag loss. | ||
|
||
Args: | ||
cls_prob (Tensor): Cls prob, in shape |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid abbreviation in docstrings.
"""Forward feature map of a single scale level. | ||
|
||
Args: | ||
x: Feature map of a single scale level. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type
|
||
Returns: | ||
tuple: scores for each class, bbox predictions | ||
predictions of input feature map. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type and shape
|
||
Args: | ||
x (tuple[Tensor]): Features from the upstream, usually have 5 | ||
scales, each has shape (N, C, H, W). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 5 feature maps have different shapes instead of all (N, C, H, W)
mmdet/models/dense_heads/ssd_head.py
Outdated
|
||
Args: | ||
feats (tuple[Tensor]): Features from the upstream network, each has | ||
shape (N, C, H, W). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong description.
* add doc * fix some typos * fix some doc * fix property doc * update doc * complete free anchor doc
No description provided.