The inference script ties together every component of CYWS-3D — theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ragavsachdeva/CYWS-3D/llms.txt
Use this file to discover all available pages before exploring further.
Model, the CorrespondenceExtractor, and an optional depth predictor — to produce change-detection bounding boxes for a batch of image pairs. Given a config file and a metadata YAML that describes your input images, the script loads weights, runs the full pipeline, applies post-processing (area filtering, NMS, cross-image matching), and saves an annotated side-by-side PNG for each item in the batch.
Running Inference
The simplest invocation uses all defaults and only supplies the required checkpoint path:The CLI is powered by jsonargparse. Every parameter maps directly to a
--param_name value flag. Boolean flags accept true / false (case-insensitive).Parameters
Path to the YAML configuration file that controls model architecture and training settings. The default
config.yml at the repository root is suitable for inference with the released checkpoint.Path to the batch metadata YAML file that describes each image pair. See Input Metadata Format below for the full schema including all six registration strategies.
Path to a
.ckpt checkpoint file. This parameter is required for any real inference run — without it the model uses randomly initialised weights.Discard predicted bounding boxes whose pixel area (in the 224×224 coordinate space) is smaller than this value. Raising this threshold removes small, noisy detections; lowering it retains fine-grained changes.
When
true, the post-processor runs keep_matching_bboxes to retain only bounding boxes that have a plausible cross-image correspondence. Disabling this flag returns all surviving detections regardless of whether the change appears in both views.Maximum number of bounding boxes drawn per image in the output PNG. Boxes are already ranked by confidence after NMS, so only the top-N detections appear in the visualisation. This limit does not affect the raw model output.
Minimum detection score required when
keep_matching_bboxes_only is true. Boxes below this threshold are excluded before the cross-image matching step. Increase this value to reduce false positives at the cost of recall.Output
For every itemi in the batch the script writes a PNG to the working directory:
max_predictions_to_display detections per image after all filtering steps.
The visualisation helper also writes per-pair correspondence images (correspondences_{i}.png) that show the SuperPoint + SuperGlue keypoint matches used to establish the geometric relationship between the two views. These are useful for diagnosing cases where the matching step fails.
Input Metadata Format
The metadata YAML contains a top-levelbatch key whose value is a list of per-pair dictionaries. The registration_strategy field determines which additional keys are required.
Strategy 1 — 3d (full camera poses + intrinsics)
Strategy 2 — 3d without pre-computed depth (auto depth prediction)
When depth maps are absent for a
3d pair, the pipeline automatically runs ZoeDepth (ZoeD_NK) on both images. Depth prediction requires a GPU and adds latency.Strategy 3 — 2d_from_corr (homography from keypoints)
CorrespondenceExtractor (SuperPoint + SuperGlue) runs automatically and estimates a 2-D homography from the matched keypoints.
Strategy 4 — 2d (pre-computed 2-D transform)
Strategy 5 — identity (no registration)
CorrespondenceExtractor is skipped entirely.