cvnets.matcher_det package

Submodules

cvnets.matcher_det.base_matcher module

class cvnets.matcher_det.base_matcher.BaseMatcher(opts, *args, **kwargs)[source]

Bases: object

Base class for matching anchor boxes and labels for the task of object detection

__init__(opts, *args, **kwargs) None[source]
classmethod add_arguments(parser: ArgumentParser)[source]

Add class-specific arguments

cvnets.matcher_det.ssd_matcher module

class cvnets.matcher_det.ssd_matcher.SSDMatcher(opts, bg_class_id: int | None = 0, *args, **kwargs)[source]

Bases: BaseMatcher

This class assigns labels to anchors via SSD matching process

Parameters:
  • opts – command line arguments

  • bg_class_id – Background class index

Shape:
  • Input:
    • gt_boxes: Ground-truth boxes in corner form (xyxy format). Shape is \((N, 4)\) where \(N\) is the number of boxes

    • gt_labels: Ground-truth box labels. Shape is \((N)\)

    • anchors: Anchor boxes in center form (c_x, c_y, w, h). Shape is \((M, 4)\) where \(M\) is the number of anchors

  • Output:
    • matched_boxes of shape \((M, 4)\)

    • matched_box_labels of shape \((M)\)

__init__(opts, bg_class_id: int | None = 0, *args, **kwargs) None[source]
classmethod add_arguments(parser: ArgumentParser) ArgumentParser[source]

Add SSD Matcher specific arguments

convert_to_boxes(pred_locations: Tensor, anchors: Tensor) Tensor[source]

Decodes boxes from predicted locations and anchors.

cvnets.matcher_det.ssd_matcher.check_variable(val, args_str: str)[source]

Module contents

cvnets.matcher_det.arguments_box_matcher(parser: ArgumentParser)[source]
cvnets.matcher_det.build_matcher(opts, *args, **kwargs)[source]