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[source]¶
構建一個帶有 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, 可選) – 如果為 True,則在 stderr 中顯示下載進度條。預設為 True。
num_classes (int, 可選) – 模型的輸出類別數(包括背景類)
weights_backbone (
MobileNet_V3_Large_Weights, 可選) – 主幹網路的預訓練權重。trainable_backbone_layers (int, 可選) – 從最後一個塊開始的可訓練(未凍結)層數。有效值為 0 到 6 之間,其中 6 表示所有主幹網路層都可訓練。如果傳入
None(預設值),則該值設定為 3。**kwargs – 傳遞給
torchvision.models.detection.faster_rcnn.FasterRCNN基類的引數。有關此類的更多詳細資訊,請參閱原始碼。
- 類 torchvision.models.detection.FasterRCNN_MobileNet_V3_Large_FPN_Weights(value)[source]¶
上面的模型構建器接受以下值作為
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 個)
最小尺寸
高度=1, 寬度=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]。