Deterministic synthetic vision fixtures, annotations, and benchmarks for MoonBit.
moon check --target wasm-gc --deny-warn
moon test --target wasm-gc
moon run --target wasm-gc cmd/mainmoon run --target native cmd/bench///|
test "build a checkerboard fixture" {
let image = checkerboard(Size::new(width=8, height=8), 2)
inspect(image.width, content="8")
inspect(image.get(0, 0).value, content="0")
inspect(image.get(2, 0).value, content="255")
}| File | Responsibility |
|---|---|
| types.mbt | geometry, colors, sizes, and numeric helpers |
| image.mbt / export.mbt | image buffers and text exporters |
| draw.mbt / patterns.mbt | drawing and procedural scenes |
| effects.mbt / transform.mbt | noise, blur, morphology, and transforms |
| filters.mbt | kernels, border modes, convolution, median and adaptive filters |
| annotation.mbt / geometry_extra.mbt | annotations, masks, boxes, and flow |
| manifest.mbt / dataset_ops.mbt | manifests, splits, and dataset operations |
| formats.mbt / camera.mbt | COCO-style records, mask RLE, projection, distortion |
| flow_ops.mbt / sampling.mbt | flow fields, warps, seeded sampling and fixtures |
| augmentation.mbt / evaluation.mbt | reproducible augmentation and quality metrics |
| components.mbt / resampling.mbt | connected components, holes, pyramids, matching |
| geometry_ops.mbt / calibration.mbt | polygons, affine/projective maps, calibration |
| features.mbt / pipeline.mbt | gradients, corners, descriptors, vision pipelines |
| tracking.mbt / flow_analysis.mbt | IoU tracking and optical-flow diagnostics |
| color_ops.mbt / rendering.mbt | RGB/HSV helpers and annotation overlays |
| synthetic_variants.mbt / evaluation_reports.mbt | variant pairs and batch reports |
| dataset_index.mbt / integrity.mbt / benchmarking.mbt | indexing, audits, workloads |
| dataset_splits.mbt | cross-validation, temporal splits, set operations |
| analytics.mbt | image statistics and comparison metrics |
| suite.mbt | reusable recipes and rendering |
| cmd/main / cmd/bench | preview and benchmark executables |
suite=8
pixels=149987
boxes=5
checksum=22085168
mean=127moon fmt --check
moon check --target wasm-gc --deny-warn
moon check --target native --deny-warn
moon test --target wasm-gc --deny-warn
moon test --target native --deny-warn
moon info
git diff --exit-codemoon check --target wasm-gc --deny-warn
moon test --target wasm-gc
moon run --target wasm-gc cmd/main
moon run --target native cmd/benchsuite=8
pixels=149987
boxes=5
checksum=22085168
mean=127| Area | Modules |
|---|---|
| Primitives and export | types.mbt, image.mbt, export.mbt |
| Patterns and transforms | patterns.mbt, draw.mbt, effects.mbt, transform.mbt |
| Annotations and formats | annotation.mbt, formats.mbt, manifest.mbt |
| Filters and statistics | filters.mbt, analytics.mbt, advanced_stats.mbt |
| Camera and flow | camera.mbt, calibration.mbt, flow_ops.mbt, flow_analysis.mbt |
| Geometry and features | geometry_extra.mbt, geometry_ops.mbt, features.mbt |
| Dataset operations | dataset_ops.mbt, dataset_index.mbt, dataset_splits.mbt |
| Pipelines and evaluation | pipeline.mbt, evaluation.mbt, evaluation_reports.mbt, tracking.mbt |
| Rendering and variants | rendering.mbt, color_ops.mbt, augmentation.mbt, synthetic_variants.mbt |
| Integrity and workload | validation.mbt, integrity.mbt, benchmarking.mbt |
pub struct AssetIndex {
manifest_name : String
entries : Array[AssetIndexEntry]
shard_count : Int
} derive(Eq, Debug)fn AugmentationConfig::with_contrast(self : AugmentationConfig, numerator : Int, denominator : Int) -> AugmentationConfigfn AugmentationConfig::with_seed(seed : UInt, brightness? : Int, noise_magnitude? : Int, blur_radius? : Int, rotate_quarter_turns? : Int, flip_horizontal? : Bool) -> AugmentationConfigpub struct BatchPipelineResult {
results : Array[PipelineResult]
total_pixels : Int
total_components : Int
} derive(Eq, Debug)pub struct BenchmarkSnapshot {
name : String
counters : WorkloadCounters
stable : Bool
} derive(Eq, Debug)fn BinaryMetrics::new(true_positive~ : Int, false_positive~ : Int, false_negative~ : Int, true_negative~ : Int) -> BinaryMetricsfn CalibrationEstimate::new(transform~ : Affine2D, observations~ : Int, error_x1000~ : Int, valid~ : Bool) -> CalibrationEstimatefn CalibrationObservation::new(object~ : Point, image~ : Point, weight? : Int) -> CalibrationObservationpub struct CalibrationSet {
name : String
observations : Array[CalibrationObservation]
} derive(Eq, Debug)pub struct CocoDataset {
description : String
images : Array[CocoImageRecord]
annotations : Array[CocoAnnotationRecord]
categories : Array[CocoCategory]
} derive(Eq, Debug)fn CocoImageRecord::new(id~ : Int, file_name~ : String, width~ : Int, height~ : Int) -> CocoImageRecordfn DatasetSplit::to_manifest(self : DatasetSplit, name : String, version : String) -> DatasetManifestpub struct EvaluationReport {
images : Int
classes : Array[ClassMetrics]
mask : BinaryMetrics
mean_image_iou_per_1000 : Int
} derive(Eq, Debug)fn EvaluationReport::add_detection_image(self : EvaluationReport, expected : Array[Box2D], actual : Array[Box2D], threshold_per_1000 : Int) -> Unitfn EvaluationReport::add_mask_image(self : EvaluationReport, expected : Mask, actual : Mask, positive : Int) -> Unitpub struct GradientField {
width : Int
height : Int
pixels : Array[GradientPixel]
} derive(Eq, Debug)fn GrayImage::mean_filter(self : GrayImage, width : Int, height : Int, border? : BorderMode) -> GrayImagefn GrayImage::normalized_convolve(self : GrayImage, kernel : Kernel, border? : BorderMode) -> GrayImagefn InstanceAnnotation::new(id~ : Int, label~ : Label, bbox~ : Box2D, keypoints? : Array[Keypoint]) -> InstanceAnnotationfn OverlayStyle::new(box_color? : Rgb, mask_color? : Rgb, keypoint_color? : Rgb, line_width? : Int, mask_alpha_per_1000? : Int) -> OverlayStylepub struct PipelineConfig {
threshold : Int
radius : Int
minimum_component_area : Int
stages : Array[PipelineStage]
} derive(Eq, Debug)fn PipelineConfig::new(threshold? : Int, radius? : Int, minimum_component_area? : Int) -> PipelineConfigfn PipelineResult::new(image~ : GrayImage, traces~ : Array[PipelineTrace], components~ : Array[Component]) -> PipelineResultpub struct PipelineTrace {
stage : PipelineStage
width : Int
height : Int
checksum : UInt
mean : Int
} derive(Eq, Debug)fn Projective2D::new(h11~ : Int, h12~ : Int, h13~ : Int, h21~ : Int, h22~ : Int, h23~ : Int, h31~ : Int, h32~ : Int, denominator? : Int) -> Projective2Dfn RadialDistortion::new(k1_per_100k~ : Int, k2_per_100k~ : Int, center~ : Point, radius~ : Int) -> RadialDistortionpub struct SamplingConfig {
count : Int
seed : UInt
strategy : SamplingStrategy
margin : Int
} derive(Eq, Debug)fn SamplingConfig::new(count~ : Int, seed~ : UInt, strategy? : SamplingStrategy, margin? : Int) -> SamplingConfigfn SceneOutput::new(plan~ : ScenePlan, image~ : GrayImage, mask? : Mask, boxes? : Array[Box2D], flow? : Array[FlowVector]) -> SceneOutputpub struct SyntheticPair {
plan : VariantPlan
reference : GrayImage
variant : GrayImage
flow : Array[FlowVector]
} derive(Eq, Debug)fn SyntheticPair::new(plan~ : VariantPlan, reference~ : GrayImage, variant~ : GrayImage, flow? : Array[FlowVector]) -> SyntheticPairpub struct Track {
id : Int
label : Label
state : TrackState
observations : Array[TrackObservation]
missed_frames : Int
} derive(Eq, Debug)fn TrackObservation::new(frame~ : Int, detection~ : Box2D, score_per_1000? : Int) -> TrackObservationpub struct TrackSummary {
id : Int
label_id : Int
age : Int
state : TrackState
center : Point
velocity : Point
} derive(Eq, Debug)fn TrackerConfig::new(iou_threshold_per_1000? : Int, max_missed_frames? : Int, confirmation_frames? : Int) -> TrackerConfigpub struct VariantPlan {
name : String
kind : VariantKind
seed : UInt
amount : Int
} derive(Eq, Debug)fn VariantPlan::new(name~ : String, kind~ : VariantKind, seed~ : UInt, amount? : Int) -> VariantPlanpub struct VariantQuality {
name : String
kind : VariantKind
mae : Int
mse : Int
flow_error : Int
} derive(Eq, Debug)fn augmentation_grid(seeds : Array[UInt], brightness_values : Array[Int]) -> Array[AugmentationConfig]fn balanced_split(manifest : DatasetManifest, train_per_1000 : Int, validation_per_1000 : Int) -> DatasetSplitfn connected_components(mask : Mask, foreground : Int, connectivity? : Connectivity) -> Array[Component]fn describe_keypoints(image : GrayImage, points : Array[Point], radius : Int) -> Array[PatchDescriptor]fn detect_corners(image : GrayImage, threshold : Int, radius? : Int, border? : Int) -> Array[CornerFeature]fn evaluate_detections(expected : Array[Box2D], actual : Array[Box2D], threshold_per_1000 : Int) -> DetectionMetricsfn evaluate_scene_batch(expected : Array[SceneOutput], actual : Array[SceneOutput]) -> EvaluationReportfn flow_consistency(expected : Array[FlowVector], actual : Array[FlowVector], tolerance : Int) -> Intfn keypoints_to_annotations(points : Array[Point], label : Label, radius : Int) -> Array[InstanceAnnotation]fn overlay_keypoints(base : RgbImage, points : Array[Point], radius : Int, style : OverlayStyle) -> RgbImagefn remove_small_components(mask : Mask, foreground : Int, minimum_area : Int, connectivity? : Connectivity) -> Maskfn sampling_manifest(size : Size, configs : Array[SamplingConfig], prefix : String) -> DatasetManifestfn split_manifest(manifest : DatasetManifest, train_per_1000 : Int, validation_per_1000 : Int) -> DatasetSplitfn validate_calibration_grid(points : Array[Point], cols : Int, rows : Int, minimum_spacing : Int) -> ValidationReportfn variant_manifest(reference : GrayImage, plans : Array[VariantPlan], prefix : String) -> DatasetManifestInstall
Download zipDeterministic synthetic vision fixtures, annotations, and benchmarks for MoonBit.