SSD class
dlf.models.ssd.SSD(
num_classes,
arch="vgg_ssd_300",
input_shape=(300, 300, 3),
weight_decay=0.0005,
optimizer=None,
loss=None,
model_weights=None,
summary=False,
ratios=None,
scales=None,
class_score_threshold=0.6,
nms_threshold=0.45,
max_boxes=200,
**kwargs
)
A implementation for an Single Shot Detector (SSD)
Aliases
- ssd
- SSD
Architectures implemented
- vgg_ssd_300: Original Paper implmentation of SSD 300 with VGG as backend
- vgg_ssd_512: Original Paper implmentation of SSD 512 with VGG as backend
Args
- num_classes:
- arch: str. SSD architecture. Defaults to 'vgg_ssd_300'.
- input_shape: tuple(int, int , int). Input shape of this network. Defaults to (300, 300, 3).
- weight_decay: float. Weight decay. Defaults to 5e-4.
- optimizer: list of dict, optional. Name of optimizer used for training.
- loss: list of dict, optional. Not Implemented Yet! List of loss objects to build for this model. Defaults to None.
- model_weights: str, optional. Path to the pretrained model weights. Defaults to None.
- summary: bool, optional. If true a summary of the model will be printed to stdout. Defaults to False.
- ratios: list of list of float, optional. List of anchor box ratios for SSD. Defaults to None.
- scales: list of float. List of scalings for anchor boxes. Defaults to None.
- class_score_threshold: float, optional. Class confidence threshold . Defaults to 0.6.
- nms_threshold: float. Min IoU for non-maximum suppression. Defaults to 0.45.
- max_boxes: int, optional. Max number of Boxes. Defaults to 200.
Returns
A Keras model instance.
YAML Configuration
model:
ssd:
num_classes: &num_classes 7
input_shape:
- 512
- 512
- 3
summary: True
optimizer:
- Adam:
learning_rate: 0.001
class_score_threshold: 0.6
nms_threshold: 0.45
max_boxes: 200
arch: vgg_ssd_512
References
- Single Shot Detector https://arxiv.org/abs/1512.02325