(ex_rois, gt_rois, labels)
return np.hstack((labels[:, np.newaxis], targets)).astype(
        np.float32, copy=False
    )
Compute bounding-box regression targets for an image.
Compute bounding-box regression targets for an image.
Compute bounding - box regression targets for an image .
def _compute_targets(ex_rois, gt_rois, labels):
    """Compute bounding-box regression targets for an image."""

    assert ex_rois.shape[0] == gt_rois.shape[0]
    assert ex_rois.shape[1] == 4
    assert gt_rois.shape[1] == 4

    targets = bbox_transform_inv(
        ex_rois, gt_rois, config.network.bbox_reg_weights
    )
    return np.hstack((labels[:, np.newaxis], targets)).astype(
        np.float32, copy=False
    )
def _compute_targets ( ex_rois , gt_rois , labels ) : assert ex_rois . shape [ 0 ] == gt_rois . shape [ 0 ] assert ex_rois . shape [ 1 ] == 4 assert gt_rois . shape [ 1 ] == 4 targets = bbox_transform_inv ( ex_rois , gt_rois , config . network . bbox_reg_weights ) return np . hstack ( ( labels [ : , np . newaxis ] , targets ) ) . astype ( np . float32 , copy = False )