快捷方式

ssdlite320_mobilenet_v3_large

torchvision.models.detection.ssdlite320_mobilenet_v3_large(*, weights: Optional[SSDLite320_MobileNet_V3_Large_Weights] = None, progress: bool = True, num_classes: Optional[int] = None, weights_backbone: Optional[MobileNet_V3_Large_Weights] = MobileNet_V3_Large_Weights.IMAGENET1K_V1, trainable_backbone_layers: Optional[int] = None, norm_layer: Optional[Callable[[...], Module]] = None, **kwargs: Any) SSD[source]

输入大小为 320x320 和 MobileNetV3 Large 主干网络的 SSDlite 模型架构,如 Searching for MobileNetV3MobileNetV2: Inverted Residuals and Linear Bottlenecks 中所述。

警告

检测模块处于 Beta 阶段,不保证向后兼容性。

有关更多详细信息,请参阅 ssd300_vgg16()

示例

>>> model = torchvision.models.detection.ssdlite320_mobilenet_v3_large(weights=SSDLite320_MobileNet_V3_Large_Weights.DEFAULT)
>>> model.eval()
>>> x = [torch.rand(3, 320, 320), torch.rand(3, 500, 400)]
>>> predictions = model(x)
参数:
  • weights (SSDLite320_MobileNet_V3_Large_Weights, optional) – 要使用的预训练权重。有关更多详细信息和可能的值,请参阅下面的 SSDLite320_MobileNet_V3_Large_Weights。默认情况下,不使用预训练权重。

  • progress (bool, optional) – 如果为 True,则在 stderr 上显示下载进度条。默认为 True。

  • num_classes (int, optional) – 模型的输出类数(包括背景)。

  • weights_backbone (MobileNet_V3_Large_Weights, optional) – 主干网络的预训练权重。

  • trainable_backbone_layers (int, optional) – 从最后一个块开始的可训练(非冻结)层数。有效值为 0 到 6 之间,其中 6 表示所有主干网络层均可训练。如果传递 None(默认值),则此值设置为 6。

  • norm_layer (callable, optional) – 指定要使用的归一化层的模块。

  • **kwargs – 传递给 torchvision.models.detection.ssd.SSD 基类的参数。有关此类别的更多详细信息,请参阅 源代码

class torchvision.models.detection.SSDLite320_MobileNet_V3_Large_Weights(value)[source]

上面的模型构建器接受以下值作为 weights 参数。SSDLite320_MobileNet_V3_Large_Weights.DEFAULT 等同于 SSDLite320_MobileNet_V3_Large_Weights.COCO_V1。您还可以使用字符串,例如 weights='DEFAULT'weights='COCO_V1'

SSDLite320_MobileNet_V3_Large_Weights.COCO_V1:

这些权重是通过遵循与论文中类似的训练方法生成的。也可作为 SSDLite320_MobileNet_V3_Large_Weights.DEFAULT 使用。

box_map (在 COCO-val2017 上)

21.3

num_params

3440060

类别

__background__, person, bicycle, … (省略 88 个)

min_size

height=1, width=1

recipe

link

GFLOPS

0.58

文件大小

13.4 MB

推理转换可在 SSDLite320_MobileNet_V3_Large_Weights.COCO_V1.transforms 中找到,并执行以下预处理操作:接受 PIL.Image、批量 (B, C, H, W) 和单个 (C, H, W) 图像 torch.Tensor 对象。图像被重新缩放到 [0.0, 1.0]

文档

访问 PyTorch 的全面开发者文档

查看文档

教程

获取面向初学者和高级开发者的深度教程

查看教程

资源

查找开发资源并获得问题解答

查看资源