Skip to content
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

Merged
merged 7 commits into from
Jun 26, 2020
Merged

Add doc #3125

merged 7 commits into from
Jun 26, 2020

Conversation

yhcao6
Copy link
Collaborator

@yhcao6 yhcao6 commented Jun 25, 2020

No description provided.

mmdet/core/fp16/utils.py Outdated Show resolved Hide resolved
mmdet/core/fp16/hooks.py Outdated Show resolved Hide resolved
mmdet/core/fp16/hooks.py Outdated Show resolved Hide resolved
mmdet/core/fp16/hooks.py Outdated Show resolved Hide resolved
mmdet/core/fp16/hooks.py Outdated Show resolved Hide resolved
mmdet/core/fp16/hooks.py Outdated Show resolved Hide resolved
mmdet/core/fp16/hooks.py Outdated Show resolved Hide resolved
@daavoo daavoo mentioned this pull request Jun 26, 2020
Returns:
BitmapMasks: the rescaled masks
"""
"""See `BaseInstanceMasks.rescale()`."""
Copy link
Member

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).
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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.
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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.
Copy link
Member

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.
Copy link
Member

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
Copy link
Member

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.
Copy link
Member

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.
Copy link
Member

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).
Copy link
Member

@hellock hellock Jun 26, 2020

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)


Args:
feats (tuple[Tensor]): Features from the upstream network, each has
shape (N, C, H, W).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong description.

@hellock hellock merged commit f4463f5 into open-mmlab:master Jun 26, 2020
mike112223 pushed a commit to mike112223/mmdetection that referenced this pull request Aug 25, 2020
* add doc

* fix some typos

* fix some doc

* fix property doc

* update doc

* complete free anchor doc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants