Skip to content

Add Faster RCNN Configuration using EfficientNet backbone #27

@TNodeCode

Description

@TNodeCode

Describe the feature

The following configuration file uses an EfficientNet backbone from the mmpretrain library (which must be installed in the Python environment to make this work).

Motivation
In my experiments EfficientNet backbones often achieve higher mAP50 scores on my datasets than using ResNet backbones.

The configuration

location: configs/faster_rcnn/faster-rcnn_enxl_fpn_1x_coco.py

_base_ = [
    '../_base_/models/faster-rcnn_r50_fpn.py',
    '../_base_/datasets/coco_detection.py',
    '../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py'
]

_base_.model.backbone=dict(
    type='mmpretrain.EfficientNetV2', # Using EfficientNetV2 from mmpretrain
    arch='xl',
    frozen_stages=1,
    out_indices=(2,3,5,8), 
    init_cfg=dict(
        type='Pretrained',
        checkpoint='https://download.openmmlab.com/mmclassification/v0/efficientnetv2/efficientnetv2-xl_in21k-pre-3rdparty_in1k_20221220-583ac18b.pth',
        prefix='backbone.')
)
_base_.model.neck=dict(
    type='FPN',
    in_channels=[64, 96, 256, 1280],
    out_channels=256,
    num_outs=5
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions