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[source]¶
低解析度 Faster R-CNN 模型,使用 MobileNetV3-Large 主幹網路,針對移動用例進行調優。
警告
檢測模組處於 Beta 階段,不保證向後相容性。
它的工作方式類似於使用 ResNet-50 FPN 主幹網路的 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, 可選) – 要使用的預訓練權重。有關更多詳細資訊和可能的值,請參閱下方的FasterRCNN_MobileNet_V3_Large_320_FPN_Weights。預設情況下不使用預訓練權重。progress (bool, 可選) – 如果為 True,則在標準錯誤輸出中顯示下載進度條。預設為 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基類的引數。有關此類的更多詳細資訊,請參閱原始碼。
- class torchvision.models.detection.FasterRCNN_MobileNet_V3_Large_320_FPN_Weights(value)[source]¶
上面的模型構建器接受以下值作為
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]。