ssds.modeling.layers¶
ssds.modeling.layers.box¶
-
ssds.modeling.layers.box.
configure_ratio_scale
(num_featmaps, ratios, scales)[source]¶ Get the apect ratio and scale for the default anchor boxes
From v.15, ssds.pytorch does not consider the enlarged 1:1 anchor box in the original ssd or tf version
-
ssds.modeling.layers.box.
decode
(all_cls_head, all_box_head, stride=1, threshold=0.05, top_n=1000, anchors=None, rescore=True)[source]¶ Box Decoding and Filtering
-
ssds.modeling.layers.box.
delta2box
(deltas, anchors, size, stride)[source]¶ Convert deltas from anchors to boxes
-
ssds.modeling.layers.box.
extract_targets
(targets, anchors, classes, stride, size, match=[0.5, 0.4], center_sampling_radius=0, is_centerness=False)[source]¶ snap the targets to anchors
-
ssds.modeling.layers.box.
generate_anchors
(stride, ratio_vals, scales_vals)[source]¶ Generate anchors coordinates from scales/ratios
-
ssds.modeling.layers.box.
get_sample_region
(boxes, stride, anchor_points, radius=1.5)[source]¶ This code is from https://github.com/yqyao/FCOS_PLUS/blob/0d20ba34ccc316650d8c30febb2eb40cb6eaae37/ maskrcnn_benchmark/modeling/rpn/fcos/loss.py#L42
-
ssds.modeling.layers.box.
nms
(all_scores, all_boxes, all_classes, nms=0.5, ndetections=100, using_diou=True)[source]¶ Non Maximum Suppression
ssds.modeling.layers.decoder¶
-
class
ssds.modeling.layers.decoder.
Decoder
(conf_threshold, nms_threshold, top_n, top_n_per_level, rescore, use_diou)[source]¶ Bases:
object
class Decoder contains the decoder func and nms func
- decoder
decoder is used to decode the boxes from loc and conf feature map, check
ssds.modeling.layers.box.decode()
for more details.
- nms
nms is used to filter the decoded boxes by its confidence and box location, check
ssds.modeling.layers.box.nms()
for more details.