tensorflow/models · error · ValueError
" " is missing in labels, requried found
Error message
"{}" is missing in labels, requried {} found {} What it means
Post-processing guard in ShapemaskModel: the labels dict is missing 'image_info', which is needed to rescale detection boxes back to original image coordinates. The input pipeline/dataset, not the model, failed to supply the required label field.
Solutions
- Ensure the input parser emits 'image_info' in labels
- Check that the eval dataset was built with the standard parser that includes image_info
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at official/legacy/detection/modeling/shapemask_model.py:283 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/c8a164865ab77720.
Report an issue: GitHub.
Appendix: source
Thrown at official/legacy/detection/modeling/shapemask_model.py:283
return self._keras_model
def post_processing(self, labels, outputs):
required_output_fields = [
'num_detections', 'detection_boxes', 'detection_classes',
'detection_masks', 'detection_scores'
]
for field in required_output_fields:
if field not in outputs:
raise ValueError(
'"{}" is missing in outputs, requried {} found {}'.format(
field, required_output_fields, outputs.keys()))
required_label_fields = ['image_info']
for field in required_label_fields:
if field not in labels:
raise ValueError(
'"{}" is missing in labels, requried {} found {}'.format(
field, required_label_fields, labels.keys()))
predictions = {
'image_info': labels['image_info'],
'num_detections': outputs['num_detections'],
'detection_boxes': outputs['detection_boxes'],
'detection_outer_boxes': outputs['detection_outer_boxes'],
'detection_classes': outputs['detection_classes'],
'detection_scores': outputs['detection_scores'],
'detection_masks': outputs['detection_masks'],
}
if 'groundtruths' in labels:
predictions['source_id'] = labels['groundtruths']['source_id']
labels = labels['groundtruths']
return labels, predictionsView on GitHub (pinned to e006f5f0d5)