fasterrcnn_mobilenet_v3_large_320_fpn¶
- torchvision.models.detection.fasterrcnn_mobilenet_v3_large_320_fpn(*, weights: Optional[FasterRCNN_MobileNet_V3_Large_320_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 [原始碼]¶
低解析度 Faster R-CNN 模型,具有針對行動使用案例調整的 MobileNetV3-Large backbone。
警告
偵測模組處於 Beta 階段,且不保證向後相容性。
其運作方式與具有 ResNet-50 FPN backbone 的 Faster R-CNN 類似。請參閱
fasterrcnn_resnet50_fpn()
以了解更多詳細資訊。範例
>>> model = torchvision.models.detection.fasterrcnn_mobilenet_v3_large_320_fpn(weights=FasterRCNN_MobileNet_V3_Large_320_FPN_Weights.DEFAULT) >>> model.eval() >>> x = [torch.rand(3, 300, 400), torch.rand(3, 500, 400)] >>> predictions = model(x)
- 參數:
weights (
FasterRCNN_MobileNet_V3_Large_320_FPN_Weights
, optional) – 要使用的預訓練權重。請參閱下方FasterRCNN_MobileNet_V3_Large_320_FPN_Weights
以了解更多詳細資訊和可能的值。預設情況下,不使用預訓練權重。progress (bool, optional) – 若為 True,則將下載進度條顯示至 stderr。預設值為 True。
num_classes (int, optional) – 模型的輸出類別數量(包括背景)
weights_backbone (
MobileNet_V3_Large_Weights
, optional) – backbone 的預訓練權重。trainable_backbone_layers (int, optional) – 從最後一個區塊開始可訓練(非凍結)的層數。有效值介於 0 到 6 之間,其中 6 表示所有 backbone 層都可訓練。若傳遞
None
(預設值),則此值設定為 3。**kwargs – 傳遞至
torchvision.models.detection.faster_rcnn.FasterRCNN
基底類別的參數。關於此類別的更多詳細資訊,請參閱 原始碼。
- class torchvision.models.detection.FasterRCNN_MobileNet_V3_Large_320_FPN_Weights(value)[原始碼]¶
上述模型建構器接受以下值作為
weights
參數。FasterRCNN_MobileNet_V3_Large_320_FPN_Weights.DEFAULT
等同於FasterRCNN_MobileNet_V3_Large_320_FPN_Weights.COCO_V1
。您也可以使用字串,例如weights='DEFAULT'
或weights='COCO_V1'
。FasterRCNN_MobileNet_V3_Large_320_FPN_Weights.COCO_V1:
這些權重是透過遵循與論文中類似的訓練配方所產生。也以
FasterRCNN_MobileNet_V3_Large_320_FPN_Weights.DEFAULT
提供。box_map (在 COCO-val2017 上)
22.8
類別
__background__, person, bicycle, … (省略 88 個)
min_size
height=1, width=1
num_params
19386354
配方
GFLOPS
0.72
檔案大小
74.2 MB
推論轉換可在
FasterRCNN_MobileNet_V3_Large_320_FPN_Weights.COCO_V1.transforms
中取得,並執行以下預處理操作:接受PIL.Image
、批次(B, C, H, W)
和單張(C, H, W)
圖像torch.Tensor
物件。圖像會重新縮放至[0.0, 1.0]
。