未验证 提交 88479828 编写于 作者: S shangliang Xu 提交者: GitHub

add ssd comments test=develop (#2466)

上级 30a40a3a
......@@ -6,8 +6,8 @@
| 骨架网络 | 网络类型 | 每张GPU图片个数 | 学习率策略 |推理时间(fps) | Box AP | 下载 | 配置文件 |
| :-------------- | :------------- | :-----: | :-----: | :------------: | :-----: | :-----------------------------------------------------: | :-----: |
| VGG | SSD | 8 | 240e | ---- | 77.8 | [下载链接](https://paddledet.bj.bcebos.com/models/ssd_vgg16_300_240e_voc.pdparams) | [配置文件](https://github.com/PaddlePaddle/PaddleDetection/tree/master/dygraph/configs/ssd/ssd_vgg16_300_240e_voc.yml) |
| MobileNet v1 | SSD | 32 | 120e | ---- | 73.8 | [下载链接](https://paddledet.bj.bcebos.com/models/ssd_mobilenet_v1_300_120e_voc.pdparams) | [配置文件](https://github.com/PaddlePaddle/PaddleDetection/tree/master/dygraph/configs/ssd/ssd_mobilenet_v1_300_120e_voc.yml) |
| VGG | SSD | 8 | 240e | ---- | 77.8 | [下载链接](https://paddledet.bj.bcebos.com/models/ssd_vgg16_300_240e_voc.pdparams) | [配置文件](https://github.com/PaddlePaddle/PaddleDetection/tree/develop/configs/ssd/ssd_vgg16_300_240e_voc.yml) |
| MobileNet v1 | SSD | 32 | 120e | ---- | 73.8 | [下载链接](https://paddledet.bj.bcebos.com/models/ssd_mobilenet_v1_300_120e_voc.pdparams) | [配置文件](https://github.com/PaddlePaddle/PaddleDetection/tree/develop/configs/ssd/ssd_mobilenet_v1_300_120e_voc.yml) |
**注意:** SSD-VGG使用4GPU在总batch size为32下训练240个epoch。SSD-MobileNetv1使用2GPU在总batch size为64下训练120周期。
......
......@@ -24,6 +24,15 @@ __all__ = ['SSD']
@register
class SSD(BaseArch):
"""
Single Shot MultiBox Detector, see https://arxiv.org/abs/1512.02325
Args:
backbone (nn.Layer): backbone instance
ssd_head (nn.Layer): `SSDHead` instance
post_process (object): `BBoxPostProcess` instance
"""
__category__ = 'architecture'
__inject__ = ['post_process']
......
......@@ -68,6 +68,20 @@ class SepConvLayer(nn.Layer):
@register
class SSDHead(nn.Layer):
"""
SSDHead
Args:
num_classes (int): Number of classes
in_channels (list): Number of channels per input feature
anchor_generator (dict): Configuration of 'AnchorGeneratorSSD' instance
kernel_size (int): Conv kernel size
padding (int): Conv padding
use_sepconv (bool): Use SepConvLayer if true
conv_decay (float): Conv regularization coeff
loss (object): 'SSDLoss' instance
"""
__shared__ = ['num_classes']
__inject__ = ['anchor_generator', 'loss']
......
......@@ -28,6 +28,21 @@ __all__ = ['SSDLoss']
@register
class SSDLoss(nn.Layer):
"""
SSDLoss
Args:
match_type (str): The type of matching method, should be
'bipartite' or 'per_prediction'. None ('bipartite') by default.
overlap_threshold (float32, optional): If `match_type` is 'per_prediction',
this threshold is to determine the extra matching bboxes based
on the maximum distance, 0.5 by default.
neg_pos_ratio (float): The ratio of negative samples / positive samples.
neg_overlap (float): The overlap threshold of negative samples.
loc_loss_weight (float): The weight of loc_loss.
conf_loss_weight (float): The weight of conf_loss.
"""
def __init__(self,
match_type='per_prediction',
overlap_threshold=0.5,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册