opendatalab/MinerU · error · NotImplementedError
mode[{model_name}_model] is not implemented!
Error message
mode[{model_name}_model] is not implemented! What it means
Raised by the MobileNetV3 detection backbone when model_name (the 'mode' config key) is not 'large' or 'small'. The backbone only contains layer tables for those two variants; any other mode string raises NotImplementedError at construction.
Source
Thrown at mineru/model/utils/pytorchocr/modeling/backbones/det_mobilenet_v3.py:199
cls_ch_squeeze = 960
elif model_name == "small":
cfg = [
# k, exp, c, se, nl, s,
[3, 16, 16, True, "relu", 2],
[3, 72, 24, False, "relu", 2],
[3, 88, 24, False, "relu", 1],
[5, 96, 40, True, "hard_swish", 2],
[5, 240, 40, True, "hard_swish", 1],
[5, 240, 40, True, "hard_swish", 1],
[5, 120, 48, True, "hard_swish", 1],
[5, 144, 48, True, "hard_swish", 1],
[5, 288, 96, True, "hard_swish", 2],
[5, 576, 96, True, "hard_swish", 1],
[5, 576, 96, True, "hard_swish", 1],
]
cls_ch_squeeze = 576
else:
raise NotImplementedError(
"mode[" + model_name + "_model] is not implemented!"
)
supported_scale = [0.35, 0.5, 0.75, 1.0, 1.25]
assert (
scale in supported_scale
), "supported scale are {} but input scale is {}".format(supported_scale, scale)
inplanes = 16
# conv1
self.conv = ConvBNLayer(
in_channels=in_channels,
out_channels=make_divisible(inplanes * scale),
kernel_size=3,
stride=2,
padding=1,
groups=1,
if_act=True,
act="hard_swish",View on GitHub (pinned to 4fe4bde114)
Solutions
- Use model_name: 'large' or 'small' in the MobileNetV3 backbone config.
- Pick a different supported backbone if you need another capacity point.
- Check exact case: the comparison is case-sensitive.
Example fix
# before Backbone: name: MobileNetV3 model_name: medium scale: 0.5 # after Backbone: name: MobileNetV3 model_name: small scale: 0.5
Defensive patterns
Strategy: validation
Validate before calling
model_name = backbone_cfg.get("model_name")
assert model_name in {"large", "small"}, f"MobileNetV3 det supports large/small, got {model_name!r}" Prevention
- Validate backbone config enums before model construction
- Keep model YAMLs paired with the weights they shipped with
When it happens
Trigger: Building DetModel with backbone config {name: MobileNetV3, model_name: 'tiny'|'medium'|'xlarge'} or a misspelled value like 'Large'.
Common situations: Configs ported from torchvision MobileNetV3 (which has more width variants); case mismatches; configs edited to try unsupported scales.
Related errors
- mode[{model_name}_model] is not implemented!
- Unsupported activation: {name}
- PPLCNetV4 {mode} model_size must be one of {list(config_dict
- The mixer must be one of [Global, Local, Conv]
- {name} is not supported in MultiHead yet
AI-assisted analysis of opendatalab/MinerU@4fe4bde114 (2026-08-14).
Data as JSON: /api/errors/fe0d48d7a4db0b2f.
Report an issue: GitHub.