dlpy.layers.RegionProposal¶
-
class
dlpy.layers.
RegionProposal
(anchor_ratio, anchor_scale, name=None, act='AUTO', anchor_num_to_sample=256, base_anchor_size=16, coord_type='COCO', do_RPN_only=False, max_label_per_image=200, proposed_roi_num_score=300, proposed_roi_num_train=2000, roi_train_sample_num=128, src_layers=None, **kwargs)¶ Bases: dlpy.layers.Layer
Region proposal layer
Parameters: - name : string, optional
Specifies the name of the layer.
- anchor_ratio : iter-of-float
Specifies the anchor height and width ratios (h/w) used.
- anchor_scale : iter-of-float
Specifies the anchor scales used based on base_anchor_size
- act : string, optional
Specifies the activation function.
Valid Values: AUTO, IDENTITY, LOGISTIC, SOFTMAX
Default: AUTO- anchor_num_to_sample : int, optional
Specifies the number of anchors to sample for training the region proposal network
Default: 256- base_anchor_size : int, optional
Specifies the basic anchor size in width and height (in pixels) in the original input image dimension
Default: 16- coord_type : int, optional
Specifies the coordinates format type in the input label and detection result.
Valid Values: RECT, COCO, YOLO
Default: COCO- do_RPN_only : Boolean, optional
Specifies that in the model, only Region Proposal task is to be done in the model, not including the Fast RCNN task
Default: FALSE- max_label_per_image: int, optional
Specifies the maximum number of labels per training image.
Default: 200- proposed_roi_num_score: int, optional
Specifies the number of ROI (Region of Interest) to propose in the scoring phase
Default: 300- proposed_roi_num_train: int, optional
Specifies the number of ROI (Region of Interest) to propose used for RPN training, and also the pool to sample from for FastRCNN Training in the training phase
Default: 2000- roi_train_sample_num: int, optional
Specifies the number of ROIs(Regions of Interests) to sample after NMS(Non-maximum Suppression) is performed in the training phase.
Default: 128- src_layers : iter-of-Layers, optional
Specifies the layers directed to this layer.
Returns: -
__init__
(anchor_ratio, anchor_scale, name=None, act='AUTO', anchor_num_to_sample=256, base_anchor_size=16, coord_type='COCO', do_RPN_only=False, max_label_per_image=200, proposed_roi_num_score=300, proposed_roi_num_train=2000, roi_train_sample_num=128, src_layers=None, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__(anchor_ratio, anchor_scale[, name, …]) Initialize self. count_instances() format_name([block_num, local_count]) Format the name of the layer get_number_of_instances() to_model_params() Convert the model configuration to CAS action parameters