快捷方式

fasterrcnn_mobilenet_v3_large_fpn

torchvision.models.detection.fasterrcnn_mobilenet_v3_large_fpn(**, weights: Optional[FasterRCNN_MobileNet_V3_Large_FPN_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, **kwargs: Any) FasterRCNN[原始碼]

構建一個具有 MobileNetV3-Large FPN 主幹的高解析度 Faster R-CNN 模型。

警告

檢測模組處於 Beta 階段,不保證向後相容。

其工作方式與帶有 ResNet-50 FPN 骨幹網路的 Faster R-CNN 類似。更多細節請參見 fasterrcnn_resnet50_fpn()

示例

>>> model = torchvision.models.detection.fasterrcnn_mobilenet_v3_large_fpn(weights=FasterRCNN_MobileNet_V3_Large_FPN_Weights.DEFAULT)
>>> model.eval()
>>> x = [torch.rand(3, 300, 400), torch.rand(3, 500, 400)]
>>> predictions = model(x)
引數:
  • weights (FasterRCNN_MobileNet_V3_Large_FPN_Weights, 可選) – 要使用的預訓練權重。有關更多詳細資訊和可能的值,請參閱下面的 FasterRCNN_MobileNet_V3_Large_FPN_Weights。預設情況下,不使用預訓練權重。

  • progress (bool, optional) – 如果為 True,則在 stderr 上顯示下載進度條。預設為 True。

  • num_classes (int, 可選) – 模型的輸出類別數(包括背景)

  • weights_backbone (MobileNet_V3_Large_Weights, optional) – 骨幹網路的預訓練權重。

  • trainable_backbone_layers (int, optional) – 從最後一個塊開始的可訓練(未凍結)層數。有效值為 0 到 6,其中 6 表示所有主幹層都可訓練。如果傳入 None(預設值),則此值設定為 3。

  • **kwargs – 傳遞給 torchvision.models.detection.faster_rcnn.FasterRCNN 基類的引數。有關此類的更多詳細資訊,請參閱 原始碼

class torchvision.models.detection.FasterRCNN_MobileNet_V3_Large_FPN_Weights(value)[原始碼]

上面的模型構建器接受以下值作為 weights 引數。 FasterRCNN_MobileNet_V3_Large_FPN_Weights.DEFAULT 等同於 FasterRCNN_MobileNet_V3_Large_FPN_Weights.COCO_V1。您也可以使用字串,例如 weights='DEFAULT'weights='COCO_V1'

FasterRCNN_MobileNet_V3_Large_FPN_Weights.COCO_V1:

這些權重是透過遵循與論文中類似的訓練配方生成的。也可作為 FasterRCNN_MobileNet_V3_Large_FPN_Weights.DEFAULT 使用。

box_map (在 COCO-val2017 上)

32.8

類別

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

min_size

height=1, width=1

引數數量

19386354

方案

連結

GFLOPS

4.49

檔案大小

74.2 MB

推理轉換可在 FasterRCNN_MobileNet_V3_Large_FPN_Weights.COCO_V1.transforms 處獲得,並執行以下預處理操作:接受 PIL.Image、批處理的 (B, C, H, W) 和單個 (C, H, W) 影像 torch.Tensor 物件。影像將被縮放到 [0.0, 1.0]

文件

訪問全面的 PyTorch 開發者文件

檢視文件

教程

為初學者和高階開發者提供深入的教程

檢視教程

資源

查詢開發資源並讓您的問題得到解答

檢視資源