In this article
Label the realized shapes and preserve placement failures instead of trusting requested counts.
The generated-data scenario
A synthetic defect prototype asks random_shapes for a desired object inventory and writes that requested count as the image label. In a crowded canvas, placement attempts can fail. The image can then contain fewer generated shapes than the sidecar claims. The investigation asks whether a count label describes the realized sample or only the generator request that preceded it.
The generation mechanism
scikit-image documents that random_shapes can retry failed placement and skip shapes when they do not fit, producing fewer shapes than requested. Its outputs include the image and labels identifying placed shape categories and bounding boxes. The requested bounds are generation settings, not an unconditional certificate of completed placement. A successful returned image therefore needs reconciliation with the actual output inventory.
Define the dataset contract
Define requested placements, realized placements, visible instances and the intended target count separately. If overlap is permitted, decide whether the task counts generated shapes or visually discernible objects. Keep configuration and returned label inventory with each image. Do not replace missing attempts with invented boxes simply to satisfy a requested count; that converts a generation limitation into false supervision.
A step-by-step protocol
Prepare a permissive placement fixture and a crowded fixture with deliberately constrained room. Run the actual generation path and retain returned labels. Compare requested and realized counts, then inspect the rendered sample against the intended counting rule. Include the exporter and student loader in the review, verifying that a cached requested-count field does not override the observed inventory during release assembly.
Evidence required for acceptance
Acceptance requires count labels derived from the declared realized-object definition and a visible record of unmet placement requests. Review object categories and bounding boxes as well as total count. If generation is retried until a target count is reached, retain that selection rule because accepted scenes can differ from the initial recipe distribution. Completed-image totals alone cannot explain per-scene object coverage.
Failure cases and limits
Random geometric shapes are a diagnostic generator, not evidence of realistic industrial defects or their prevalence. Their categories and bounding boxes do not automatically provide pixel masks or physical damage severity. This proposed protocol establishes honest scene-inventory labels. It reports no measured defect-detection gain and does not claim that a synthetic requested distribution represents operational inspection conditions.
Primary references and related reading
Label the realized shapes and preserve placement failures instead of trusting requested counts. scikit-image random-shape placement attempts and returned labels; scikit-image generated shape examples.
The proposed investigation of skimage random shapes requested realized count is a proposed dataset-contract review; no production dataset was generated or evaluated. Related reading: CVAT mask exports: verify holes, layering and instance topology after rasterization; COCO: preserve image and annotation identities.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.