Skip to content

[Bug] NuImages inference fails with TypeError: MaskRCNN doesn't accept 'pretrained' argument" #3136

@ElAlamiY

Description

@ElAlamiY

Prerequisite

Task

I'm using the official example scripts/configs for the officially supported tasks/models/datasets.

Branch

main branch https://github.com/open-mmlab/mmdetection3d

Environment

Environment

  • MMDetection3D: v1.4.0
  • MMDetection: v3.3.0
  • MMCV: v2.1.0
  • MMEngine: v0.10.7
  • PyTorch: 1.13.1
  • Python: 3.10
  • CUDA: 11.8

Reproduces the problem - code sample

model = dict(
type='MaskRCNN',
pretrained='torchvision://resnet50',
scope='mmdet',
backbone=dict(
type='ResNet',
depth=50,
...
),
...
)

Inside the config

Reproduces the problem - command or script

python tools/test.py
configs/nuimages/mask-rcnn_r50_fpn_1x_nuim.py
mask_rcnn_r50_fpn_1x_nuim_20201008_195238-e99f5182.pth

Reproduces the problem - error message

TypeError: MaskRCNN.init() got an unexpected keyword argument 'pretrained'

Additional information

The expected result is for inference to run. I am using NuImages as Dataset to evaluate the model.
From what I have seen all NuImages models use pretrained key in their config. But when running the test tool, I get the error

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