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[原始碼]¶
SSDLite 模型架構,輸入尺寸為 320x320,使用 MobileNetV3 Large 作為骨幹網路,如 Searching for MobileNetV3 和 MobileNetV2: 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)[原始碼]¶
上面的模型構建器接受以下值作為
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
引數數量
3440060
類別
__background__, person, bicycle, … (省略 88 個)
min_size
height=1, width=1
方案
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]。