Offline robotics vision format bridge for image timestamps, camera calibration, trajectories, depth metadata and annotation sync.
///|
test "README quick start" {
let csv =
#|sec,nsec,frame_id,path
#|42,0,camera/front,front_000001.png
#|42,33333333,camera/front,front_000002.png
#|
let frames = parse_image_index_csv(csv)
inspect(
image_index_summary(frames),
content="2 frames from 42.000000000 to 42.033333333",
)
}moon check --target all
moon test --target all
moon check --target all --deny-warn --fmt
moon fmt --check
moon info
git diff --exit-codepub(all) struct Annotation {
stamp : Stamp
frame_id : String
label : String
bbox : BoundingBox
confidence : Double
} derive(ToJson, Debug)fn CameraIntrinsics::has_identity_rectification(self : CameraIntrinsics, tolerance : Double) -> Boolfn CameraIntrinsics::normalize_pixel(self : CameraIntrinsics, pixel : PixelPoint) -> NormalizedPoint raise VisionFormatErrorfn CameraIntrinsics::project_normalized(self : CameraIntrinsics, point : NormalizedPoint) -> PixelPoint raise VisionFormatErrorpub(all) struct QualityIssue {
severity : IssueSeverity
source : String
message : String
} derive(Eq, ToJson, Debug)pub(all) struct RuleViolation {
code : QualityRuleCode
source : String
row : Int
detail : String
} derive(ToJson, Debug)pub(all) struct SyncMatch {
image : ImageFrameRef
trajectory : TrajectorySample?
depth : DepthMetadata?
annotations : Array[Annotation]
max_abs_offset_ns : Int64
} derive(ToJson, Debug)pub(all) struct SyncReport {
matches : Array[SyncMatch]
unmatched_images : Array[ImageFrameRef]
unmatched_trajectory : Array[TrajectorySample]
unmatched_depth : Array[DepthMetadata]
unmatched_annotations : Array[Annotation]
} derive(ToJson, Debug)fn annotations_at_stamp(annotations : ArrayView[Annotation], stamp : Stamp, tolerance_ns : Int64) -> Array[Annotation]fn annotations_for_image(image : ImageFrameRef, annotations : ArrayView[Annotation], tolerance_ns : Int64, policy : SyncFramePolicy) -> Array[Annotation]fn annotations_in_region(annotations : ArrayView[Annotation], region : BoundingBox) -> Array[Annotation]fn average_precision_at_iou(predictions : ArrayView[BoundingBox], ground_truth : ArrayView[BoundingBox], threshold : Double) -> Doublefn benchmark_result(name : String, rows : Int, iterations : Int, elapsed_ns : Int64, checksum : Int64) -> BenchmarkResultfn benchmark_sync(images : ArrayView[ImageFrameRef], trajectory : ArrayView[TrajectorySample], depth : ArrayView[DepthMetadata], annotations : ArrayView[Annotation], tolerance_ns : Int64, iterations : Int) -> BenchmarkResultfn box_recall_at_iou(predictions : ArrayView[BoundingBox], ground_truth : ArrayView[BoundingBox], threshold : Double) -> Doublefn camera_is_well_conditioned(camera : CameraIntrinsics, epsilon : Double) -> Bool raise VisionFormatErrorfn camera_normalized_round_trip_error(camera : CameraIntrinsics, point : NormalizedPoint) -> Double raise VisionFormatErrorfn csv_numeric_column(rows : ArrayView[Array[String]], index : Int) -> Array[Double] raise VisionFormatErrorfn distort_normalized(point : NormalizedPoint, coefficients : DistortionCoefficients) -> DistortedPointfn filter_annotations_by_confidence(annotations : ArrayView[Annotation], min_confidence : Double) -> Array[Annotation]fn filter_annotations_by_label(annotations : ArrayView[Annotation], label : String) -> Array[Annotation]fn filter_images_by_extension(frames : ArrayView[ImageFrameRef], extension : String) -> Array[ImageFrameRef]fn greedy_non_max_suppression(annotations : ArrayView[Annotation], iou_threshold : Double) -> Array[Annotation]fn image_depth_is_compatible(image : ImageFrameRef, sample : DepthMetadata, tolerance_ns : Int64, policy : SyncFramePolicy) -> Boolfn image_index_is_complete(frames : ArrayView[ImageFrameRef], expected_period : Int64, tolerance : Int64) -> Boolfn image_trajectory_is_compatible(image : ImageFrameRef, sample : TrajectorySample, tolerance_ns : Int64, policy : SyncFramePolicy) -> Boolfn inspect_stream_quality(images : ArrayView[ImageFrameRef], camera : CameraIntrinsics?, trajectory : ArrayView[TrajectorySample], depth : ArrayView[DepthMetadata], annotations : ArrayView[Annotation]) -> DatasetQualityReportfn interpolate_trajectory(samples : ArrayView[TrajectorySample], stamp : Stamp) -> TrajectorySample?fn manifest_from_paths(name : String, root : String, image_index : String, camera_info? : String, trajectory? : String, depth_metadata? : String, annotations? : String) -> DatasetManifest raise ManifestErrorfn mean_absolute_error(actual : ArrayView[Double], predicted : ArrayView[Double]) -> Double raise VisionFormatErrorfn merge_sorted_images(left : ArrayView[ImageFrameRef], right : ArrayView[ImageFrameRef]) -> Array[ImageFrameRef]fn nearest_trajectory_for_image(image : ImageFrameRef, samples : ArrayView[TrajectorySample], tolerance_ns : Int64, policy : SyncFramePolicy) -> TrajectorySample?fn parse_manifest_csv(name : String, root : String, text : String) -> DatasetManifest raise ManifestErrorfn precision_recall_f1(true_positive : Int, false_positive : Int, false_negative : Int) -> (Double, Double, Double)fn project_distorted(camera : CameraIntrinsics, point : NormalizedPoint) -> PixelPoint raise VisionFormatErrorfn resample_trajectory(samples : ArrayView[TrajectorySample], start : Stamp, end : Stamp, step_ns : Int64) -> Array[TrajectorySample]fn root_mean_square_error(actual : ArrayView[Double], predicted : ArrayView[Double]) -> Double raise VisionFormatErrorfn split_annotations(annotations : ArrayView[Annotation], seed : Int, validation_percent : Int, test_percent : Int) -> DatasetSplit[Annotation]fn split_images(frames : ArrayView[ImageFrameRef], seed : Int, validation_percent : Int, test_percent : Int) -> DatasetSplit[ImageFrameRef]fn split_index(index : Int, seed : Int, validation_percent : Int, test_percent : Int) -> Intfn[T] split_items(items : ArrayView[T], seed : Int, validation_percent : Int, test_percent : Int) -> DatasetSplit[T]fn split_trajectory(samples : ArrayView[TrajectorySample], seed : Int, validation_percent : Int, test_percent : Int) -> DatasetSplit[TrajectorySample]fn stationary_samples(samples : ArrayView[TrajectorySample], maximum_speed : Double) -> Array[TrajectorySample]fn summarize_trajectory(samples : ArrayView[TrajectorySample]) -> TrajectorySummary raise VisionFormatErrorfn synchronize(images : ArrayView[ImageFrameRef], trajectory : ArrayView[TrajectorySample], depth : ArrayView[DepthMetadata], annotations : ArrayView[Annotation], tolerance_ns~ : Int64) -> SyncReportfn trajectory_bounds(samples : ArrayView[TrajectorySample]) -> (Double, Double, Double, Double) raise VisionFormatErrorfn translate_trajectory(samples : ArrayView[TrajectorySample], dx : Double, dy : Double) -> Array[TrajectorySample]fn undistort_normalized(point : DistortedPoint, coefficients : DistortionCoefficients, iterations : Int) -> NormalizedPointfn unproject_distorted(camera : CameraIntrinsics, pixel : PixelPoint, iterations : Int) -> NormalizedPoint raise VisionFormatErrorfn validate_annotation(annotation : Annotation, image_width : Int, image_height : Int) -> Unit raise VisionFormatErrorfn validate_annotation_stream(annotations : ArrayView[Annotation], image_width : Int, image_height : Int, thresholds : QualityThresholds) -> Array[RuleViolation]fn validate_camera(camera : CameraIntrinsics?, thresholds : QualityThresholds) -> Array[RuleViolation]fn validate_depth_stream(samples : ArrayView[DepthMetadata], thresholds : QualityThresholds) -> Array[RuleViolation]fn validate_image_stream(frames : ArrayView[ImageFrameRef], thresholds : QualityThresholds) -> Array[RuleViolation]fn validate_trajectory_stream(samples : ArrayView[TrajectorySample], thresholds : QualityThresholds) -> Array[RuleViolation]Install
Download zipOffline robotics vision format bridge for image timestamps, camera calibration, trajectories, depth metadata and annotation sync.