捷徑

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

食譜

連結

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 的完整開發者文件

查看文件

教學

取得初學者和進階開發者的深入教學

查看教學

資源

尋找開發資源並獲得問題解答

查看資源