tensorflow/models · error · ValueError
`outer_boxes_scale` should be a value >= 1.0.
Error message
`outer_boxes_scale` should be a value >= 1.0.
What it means
Error "`outer_boxes_scale` should be a value >= 1.0." thrown in tensorflow/models.
Source
Thrown at official/vision/modeling/maskrcnn_model.py:127
self.rpn_head = rpn_head
if not isinstance(detection_head, (list, tuple)):
self.detection_head = [detection_head]
else:
self.detection_head = detection_head
self.roi_generator = roi_generator
if not isinstance(roi_sampler, (list, tuple)):
self.roi_sampler = [roi_sampler]
else:
self.roi_sampler = roi_sampler
if len(self.roi_sampler) > 1 and not class_agnostic_bbox_pred:
raise ValueError(
'`class_agnostic_bbox_pred` needs to be True if multiple detection heads are specified.'
)
self.roi_aligner = roi_aligner
self.detection_generator = detection_generator
self._include_mask = mask_head is not None
if outer_boxes_scale < 1.0:
raise ValueError('`outer_boxes_scale` should be a value >= 1.0.')
self.outer_boxes_scale = outer_boxes_scale
self.mask_head = mask_head
if self._include_mask and mask_sampler is None:
raise ValueError('`mask_sampler` is not provided in Mask R-CNN.')
self.mask_sampler = mask_sampler
if self._include_mask and mask_roi_aligner is None:
raise ValueError('`mask_roi_aligner` is not provided in Mask R-CNN.')
self.mask_roi_aligner = mask_roi_aligner
# Weights for the regression losses for each FRCNN layer.
# TODO(jiageng): Make the weights configurable.
self._cascade_layer_to_weights = [
[10.0, 10.0, 5.0, 5.0],
[20.0, 20.0, 10.0, 10.0],
[30.0, 30.0, 15.0, 15.0],
]
def call( # pytype: disable=signature-mismatch # overriding-parameter-count-checks
self,View on GitHub (pinned to e006f5f0d5)
Solutions
- Set outer_boxes_scale to a value >= 1.0.
- Remove outer_boxes_scale to use the default.
When it happens
Trigger: Thrown at official/vision/modeling/maskrcnn_model.py:127 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tensorflow/models@e006f5f0d5 (2026-08-24).
Data as JSON: /api/errors/4dae937baebf3a2b.
Report an issue: GitHub.