提交 d16c4635 编写于 作者: keineahnung2345's avatar keineahnung2345 提交者: Waleed

Fix comments in DetectionTargetLayer (#962)

* fix comment in DetectionTargetLayer
* fix comment of target_deltas' shape
* make parenthesis compatible
上级 511ad5b9
...@@ -487,7 +487,7 @@ def detection_targets_graph(proposals, gt_class_ids, gt_boxes, gt_masks, config) ...@@ -487,7 +487,7 @@ def detection_targets_graph(proposals, gt_class_ids, gt_boxes, gt_masks, config)
generates target class IDs, bounding box deltas, and masks for each. generates target class IDs, bounding box deltas, and masks for each.
Inputs: Inputs:
proposals: [N, (y1, x1, y2, x2)] in normalized coordinates. Might proposals: [POST_NMS_ROIS_TRAINING, (y1, x1, y2, x2)] in normalized coordinates. Might
be zero padded if there are not enough proposals. be zero padded if there are not enough proposals.
gt_class_ids: [MAX_GT_INSTANCES] int class IDs gt_class_ids: [MAX_GT_INSTANCES] int class IDs
gt_boxes: [MAX_GT_INSTANCES, (y1, x1, y2, x2)] in normalized coordinates. gt_boxes: [MAX_GT_INSTANCES, (y1, x1, y2, x2)] in normalized coordinates.
...@@ -497,9 +497,8 @@ def detection_targets_graph(proposals, gt_class_ids, gt_boxes, gt_masks, config) ...@@ -497,9 +497,8 @@ def detection_targets_graph(proposals, gt_class_ids, gt_boxes, gt_masks, config)
and masks. and masks.
rois: [TRAIN_ROIS_PER_IMAGE, (y1, x1, y2, x2)] in normalized coordinates rois: [TRAIN_ROIS_PER_IMAGE, (y1, x1, y2, x2)] in normalized coordinates
class_ids: [TRAIN_ROIS_PER_IMAGE]. Integer class IDs. Zero padded. class_ids: [TRAIN_ROIS_PER_IMAGE]. Integer class IDs. Zero padded.
deltas: [TRAIN_ROIS_PER_IMAGE, NUM_CLASSES, (dy, dx, log(dh), log(dw))] deltas: [TRAIN_ROIS_PER_IMAGE, (dy, dx, log(dh), log(dw))]
Class-specific bbox refinements. masks: [TRAIN_ROIS_PER_IMAGE, height, width]. Masks cropped to bbox
masks: [TRAIN_ROIS_PER_IMAGE, height, width). Masks cropped to bbox
boundaries and resized to neural network output size. boundaries and resized to neural network output size.
Note: Returned arrays might be zero padded if not enough target ROIs. Note: Returned arrays might be zero padded if not enough target ROIs.
...@@ -534,7 +533,7 @@ def detection_targets_graph(proposals, gt_class_ids, gt_boxes, gt_masks, config) ...@@ -534,7 +533,7 @@ def detection_targets_graph(proposals, gt_class_ids, gt_boxes, gt_masks, config)
# Compute overlaps matrix [proposals, gt_boxes] # Compute overlaps matrix [proposals, gt_boxes]
overlaps = overlaps_graph(proposals, gt_boxes) overlaps = overlaps_graph(proposals, gt_boxes)
# Compute overlaps with crowd boxes [anchors, crowds] # Compute overlaps with crowd boxes [proposals, crowd_boxes]
crowd_overlaps = overlaps_graph(proposals, crowd_boxes) crowd_overlaps = overlaps_graph(proposals, crowd_boxes)
crowd_iou_max = tf.reduce_max(crowd_overlaps, axis=1) crowd_iou_max = tf.reduce_max(crowd_overlaps, axis=1)
no_crowd_bool = (crowd_iou_max < 0.001) no_crowd_bool = (crowd_iou_max < 0.001)
...@@ -637,10 +636,8 @@ class DetectionTargetLayer(KE.Layer): ...@@ -637,10 +636,8 @@ class DetectionTargetLayer(KE.Layer):
rois: [batch, TRAIN_ROIS_PER_IMAGE, (y1, x1, y2, x2)] in normalized rois: [batch, TRAIN_ROIS_PER_IMAGE, (y1, x1, y2, x2)] in normalized
coordinates coordinates
target_class_ids: [batch, TRAIN_ROIS_PER_IMAGE]. Integer class IDs. target_class_ids: [batch, TRAIN_ROIS_PER_IMAGE]. Integer class IDs.
target_deltas: [batch, TRAIN_ROIS_PER_IMAGE, NUM_CLASSES, target_deltas: [batch, TRAIN_ROIS_PER_IMAGE, (dy, dx, log(dh), log(dw)]
(dy, dx, log(dh), log(dw), class_id)] target_mask: [batch, TRAIN_ROIS_PER_IMAGE, height, width]
Class-specific bbox refinements.
target_mask: [batch, TRAIN_ROIS_PER_IMAGE, height, width)
Masks cropped to bbox boundaries and resized to neural Masks cropped to bbox boundaries and resized to neural
network output size. network output size.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册