LabelGranularityScenario
Data scenarios · Implementation: mlsysim/engine/scenario_definitions/data.py.
Construct this scenario with keyword inputs. The fields below show the types and defaults declared by this class.
Label entries for one image: a per-pixel mask against boxes boxes of coords_per_box.
Notes
Equation: mask entries = width * height; box entries = boxes * coordinates per box.
Assumptions: Images are rectangular and each pixel or coordinate contributes one label entry.
Excludes: Different bit widths, compressed encodings, object-class metadata, and annotation time.
References
Derivation: mask entries = width * height; box entries = boxes * coordinates per box. The individual properties state units and intermediate accounting; this class introduces no fitted coefficient.
Examples
The named scenario supplies illustrative inputs; the output is calculated.
>>> from mlsysim import Scenarios
>>> case = Scenarios.FullHdMaskVersusBoxes
>>> round(float(case.mask_entries), 3)
2073600.0Attributes
| Name | Description |
|---|---|
| box_entries | Coordinate-entry count for all boxes, boxes times coordinates per box. |
| boxes | |
| coords_per_box | |
| image_height | |
| image_width | |
| mask_entries | Per-pixel label-entry count, image width times height; no encoding compression is |
| mask_to_box_ratio | Per-pixel entry count divided by box-coordinate entry count, not a measured labor |
image_width
Type: int.
Declared default: required.
image_height
Type: int.
Declared default: required.
boxes
Type: int.
Declared default: required.
coords_per_box
Type: int.
Declared default: required.
mask_entries
engine.scenario_types.LabelGranularityScenario.mask_entries
Per-pixel label-entry count, image width times height; no encoding compression is assumed.
Equation: return image_width * image_height.
box_entries
engine.scenario_types.LabelGranularityScenario.box_entries
Coordinate-entry count for all boxes, boxes times coordinates per box.
Equation: return boxes * coords_per_box.
mask_to_box_ratio
engine.scenario_types.LabelGranularityScenario.mask_to_box_ratio
Per-pixel entry count divided by box-coordinate entry count, not a measured labor ratio.
Equation: return mask_entries / box_entries.