Module Import alias Import alias Import alias identifier Import alias identifier ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore NameLoad ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str Expr Call AttributeLoad SubscriptLoad NameLoad Index Num attr Num Num Expr Call AttributeLoad SubscriptLoad NameLoad Index Num attr Num Num Expr Call AttributeLoad SubscriptLoad NameLoad Index Num attr Num BinOpMult AttributeLoad NameLoad attr Num Expr Call AttributeLoad SubscriptLoad NameLoad Index Num attr Num BinOpMult AttributeLoad NameLoad attr Num Expr Call AttributeLoad SubscriptLoad NameLoad Index Num attr Num BinOpMult AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore AttributeLoad SubscriptLoad NameLoad Index Num attr Assign NameStore AttributeLoad SubscriptLoad NameLoad Index Num attr Assign NameStore Call AttributeLoad NameLoad attr TupleLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Num keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad Call AttributeLoad NameLoad attr TupleLoad NameLoad SubscriptLoad NameLoad ExtSlice Slice Slice Num Assert Call AttributeLoad NameLoad attr CompareEq SubscriptLoad NameLoad ExtSlice Slice Index Num Num Str Assign NameStore Num Assign NameStore BinOpDiv AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpMult AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign TupleStore NameStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad AttributeLoad NameLoad attr If NameLoad body Print Call AttributeLoad Str attr Call AttributeLoad CompareGt NameLoad Num attr Print Call AttributeLoad Str attr Call AttributeLoad CompareEq NameLoad Num attr AugAssignAdd AttributeStore NameLoad attr Num AugAssignAdd AttributeStore NameLoad attr Call AttributeLoad CompareGt NameLoad Num attr AugAssignAdd AttributeStore NameLoad attr Call AttributeLoad CompareEq NameLoad Num attr Print Call AttributeLoad Str attr BinOpDiv AttributeLoad NameLoad attr AttributeLoad NameLoad attr Print Call AttributeLoad Str attr BinOpDiv AttributeLoad NameLoad attr AttributeLoad NameLoad attr Print Call AttributeLoad Str attr BinOpDiv Call NameLoad AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad SubscriptLoad NameLoad Index Num attr AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad SubscriptLoad NameLoad Index Num attr Ellipsis NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index Num attr AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad SubscriptLoad NameLoad Index Num attr Ellipsis NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index Num attr AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad SubscriptLoad NameLoad Index Num attr Ellipsis NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index Num attr AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad SubscriptLoad NameLoad Index Num attr Ellipsis NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index Num attr AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad SubscriptLoad NameLoad Index Num attr Ellipsis Call AttributeLoad Call AttributeLoad NameLoad attr CompareGt NameLoad Num attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Pass decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Pass decorator_list decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore SubscriptLoad NameLoad ExtSlice Slice Index Num Assign NameStore Call AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr BinOpMult Num NameLoad keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr CompareGt NameLoad Num Index Num For NameStore NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore BinOpMult Num NameLoad Assign NameStore BinOpAdd NameLoad Num Assign SubscriptStore NameLoad ExtSlice Index NameLoad Slice NameLoad NameLoad SubscriptLoad NameLoad ExtSlice Index NameLoad Slice Num Assign SubscriptStore NameLoad ExtSlice Index NameLoad Slice NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assert CompareEq SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num Assert CompareEq SubscriptLoad AttributeLoad NameLoad attr Index Num Num Assert CompareEq SubscriptLoad AttributeLoad NameLoad attr Index Num Num Assign NameStore Call NameLoad NameLoad NameLoad If AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore BinOpDiv BinOpSub NameLoad Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Return Call AttributeLoad Call AttributeLoad NameLoad attr TupleLoad SubscriptLoad NameLoad ExtSlice Slice Index AttributeLoad NameLoad attr NameLoad attr AttributeLoad NameLoad attr keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad ExtSlice Slice Slice Num Num keyword AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad ExtSlice Slice Slice Num keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword Num Assign NameStore Call AttributeLoad NameLoad attr keyword Num Assign NameStore SubscriptLoad NameLoad Index TupleLoad NameLoad Num Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr CompareGtE NameLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr If CompareGt AttributeLoad NameLoad attr Num body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr BinOpBitAnd CompareLt NameLoad AttributeLoad AttributeLoad NameLoad attr attr CompareGtE NameLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num Assign NameStore BinOpSub NameLoad NameLoad Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr If CompareGt AttributeLoad NameLoad attr Num body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign SubscriptStore NameLoad Slice NameLoad Num Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore Call NameLoad SubscriptLoad NameLoad ExtSlice Slice Slice Num Num SubscriptLoad NameLoad ExtSlice Index SubscriptLoad NameLoad Index NameLoad Slice Num NameLoad Assign TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad Return TupleLoad NameLoad NameLoad NameLoad NameLoad decorator_list
N/A N/A caffe N/A yaml N/A numpy np N/A numpy.random npr fast_rcnn.config cfg fast_rcnn.bbox_transform bbox_transform utils.cython_bbox bbox_overlaps N/A DEBUG False ProposalTargetLayer N/A N/A caffe Layer N/A N/A 
    Assign object detection proposals to ground-truth targets. Produces proposal
    classification labels and bounding-box regression targets.
     setup N/A N/A self bottom top N/A N/A N/A layer_params N/A N/A yaml load N/A self param_str_ N/A N/A self _num_classes N/A layer_params N/A num_classes N/A N/A N/A N/A top N/A 0 reshape 1 5 N/A N/A N/A N/A top N/A 1 reshape 1 1 N/A N/A N/A N/A top N/A 2 reshape 1 N/A N/A self _num_classes 4 N/A N/A N/A N/A top N/A 3 reshape 1 N/A N/A self _num_classes 4 N/A N/A N/A N/A top N/A 4 reshape 1 N/A N/A self _num_classes 4 N/A forward N/A N/A self bottom top N/A N/A N/A all_rois N/A N/A bottom N/A 0 data N/A gt_boxes N/A N/A bottom N/A 1 data N/A zeros N/A N/A np zeros N/A N/A N/A gt_boxes shape N/A 0 1 dtype N/A gt_boxes dtype N/A all_rois N/A N/A np vstack N/A all_rois N/A N/A np hstack N/A zeros N/A gt_boxes N/A N/A N/A -1 N/A N/A N/A np all N/A N/A all_rois N/A N/A N/A 0 0 Only single item batches are supported N/A num_images 1 N/A rois_per_image N/A N/A N/A cfg TRAIN BATCH_SIZE num_images N/A fg_rois_per_image N/A N/A np round N/A N/A N/A cfg TRAIN FG_FRACTION rois_per_image N/A N/A labels rois bbox_targets bbox_inside_weights N/A _sample_rois all_rois gt_boxes fg_rois_per_image rois_per_image N/A self _num_classes N/A DEBUG N/A N/A N/A N/A num fg: {} format N/A N/A N/A labels 0 sum N/A N/A N/A num bg: {} format N/A N/A N/A labels 0 sum N/A N/A self _count 1 N/A N/A self _fg_num N/A N/A N/A labels 0 sum N/A N/A self _bg_num N/A N/A N/A labels 0 sum N/A N/A N/A num fg avg: {} format N/A N/A self _fg_num N/A self _count N/A N/A N/A num bg avg: {} format N/A N/A self _bg_num N/A self _count N/A N/A N/A ratio: {:.3f} format N/A N/A float N/A self _fg_num N/A float N/A self _bg_num N/A N/A N/A N/A top N/A 0 reshape N/A rois shape N/A N/A N/A N/A top N/A 0 data N/A rois N/A N/A N/A N/A top N/A 1 reshape N/A labels shape N/A N/A N/A N/A top N/A 1 data N/A labels N/A N/A N/A N/A top N/A 2 reshape N/A bbox_targets shape N/A N/A N/A N/A top N/A 2 data N/A bbox_targets N/A N/A N/A N/A top N/A 3 reshape N/A bbox_inside_weights shape N/A N/A N/A N/A top N/A 3 data N/A bbox_inside_weights N/A N/A N/A N/A top N/A 4 reshape N/A bbox_inside_weights shape N/A N/A N/A N/A top N/A 4 data N/A N/A N/A N/A N/A np array N/A bbox_inside_weights 0 astype N/A np float32 N/A backward N/A N/A self top propagate_down bottom N/A N/A N/A This layer does not propagate gradients. N/A N/A reshape N/A N/A self bottom top N/A N/A N/A Reshaping happens during the call to forward. N/A N/A N/A _get_bbox_regression_labels N/A N/A bbox_target_data num_classes N/A N/A N/A Bounding-box regression targets (bbox_target_data) are stored in a
    compact form N x (class, tx, ty, tw, th)

    This function expands those targets into the 4-of-4*K representation used
    by the network (i.e. only one class has non-zero targets).

    Returns:
        bbox_target (ndarray): N x 4K blob of regression targets
        bbox_inside_weights (ndarray): N x 4K blob of loss weights
     N/A clss N/A bbox_target_data N/A N/A N/A 0 N/A bbox_targets N/A N/A np zeros N/A N/A clss size N/A 4 num_classes dtype N/A np float32 N/A bbox_inside_weights N/A N/A np zeros N/A bbox_targets shape dtype N/A np float32 N/A inds N/A N/A N/A np where N/A clss 0 N/A 0 N/A ind inds N/A N/A cls N/A clss N/A ind N/A start N/A 4 cls N/A end N/A start 4 N/A N/A bbox_targets N/A N/A ind N/A start end N/A bbox_target_data N/A N/A ind N/A 1 N/A N/A bbox_inside_weights N/A N/A ind N/A start end N/A N/A cfg TRAIN BBOX_INSIDE_WEIGHTS N/A N/A bbox_targets bbox_inside_weights N/A _compute_targets N/A N/A ex_rois gt_rois labels N/A N/A N/A Compute bounding-box regression targets for an image. N/A N/A N/A N/A ex_rois shape N/A 0 N/A N/A gt_rois shape N/A 0 N/A N/A N/A N/A ex_rois shape N/A 1 4 N/A N/A N/A N/A gt_rois shape N/A 1 4 N/A targets N/A bbox_transform ex_rois gt_rois N/A N/A N/A cfg TRAIN BBOX_NORMALIZE_TARGETS_PRECOMPUTED N/A N/A targets N/A N/A targets N/A N/A np array N/A N/A cfg TRAIN BBOX_NORMALIZE_MEANS N/A N/A np array N/A N/A cfg TRAIN BBOX_NORMALIZE_STDS N/A N/A N/A N/A N/A np hstack N/A N/A labels N/A N/A N/A N/A np newaxis targets astype N/A np float32 copy False N/A _sample_rois N/A N/A all_rois gt_boxes fg_rois_per_image rois_per_image num_classes N/A N/A N/A Generate a random sample of RoIs comprising foreground and background
    examples.
     N/A overlaps N/A bbox_overlaps N/A N/A np ascontiguousarray N/A all_rois N/A N/A N/A 1 5 dtype N/A np float N/A N/A np ascontiguousarray N/A gt_boxes N/A N/A N/A 4 dtype N/A np float N/A gt_assignment N/A N/A overlaps argmax axis 1 N/A max_overlaps N/A N/A overlaps max axis 1 N/A labels N/A gt_boxes N/A N/A gt_assignment 4 N/A fg_inds N/A N/A N/A np where N/A max_overlaps N/A N/A cfg TRAIN FG_THRESH N/A 0 N/A fg_rois_per_this_image N/A min fg_rois_per_image N/A fg_inds size N/A N/A N/A fg_inds size 0 N/A N/A fg_inds N/A N/A npr choice fg_inds size fg_rois_per_this_image replace False N/A bg_inds N/A N/A N/A np where N/A N/A max_overlaps N/A N/A cfg TRAIN BG_THRESH_HI N/A max_overlaps N/A N/A cfg TRAIN BG_THRESH_LO N/A 0 N/A bg_rois_per_this_image N/A rois_per_image fg_rois_per_this_image N/A bg_rois_per_this_image N/A min bg_rois_per_this_image N/A bg_inds size N/A N/A N/A bg_inds size 0 N/A N/A bg_inds N/A N/A npr choice bg_inds size bg_rois_per_this_image replace False N/A keep_inds N/A N/A np append fg_inds bg_inds N/A labels N/A labels N/A keep_inds N/A N/A labels N/A fg_rois_per_this_image 0 N/A rois N/A all_rois N/A keep_inds N/A bbox_target_data N/A _compute_targets N/A rois N/A N/A N/A 1 5 N/A gt_boxes N/A N/A N/A gt_assignment N/A keep_inds N/A 4 labels N/A N/A bbox_targets bbox_inside_weights N/A _get_bbox_regression_labels bbox_target_data num_classes N/A N/A labels rois bbox_targets bbox_inside_weights N/A