The fastest way to see CYWS-3D in action is to runDocumentation 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.
inference.py against the demo images that are already included in the repository. The script reads a YAML metadata file that describes each image pair, runs the full 3D registration and change-detection pipeline, and writes annotated output images to disk. The steps below take you from a fresh clone to your first predictions.
Clone the repository and install dependencies
If you have not done so already, clone the repository — including its SuperGluePretrainedNetwork submodule — and follow the Installation guide to create the conda environment and install all dependencies.
Download the pre-trained checkpoint
Download and decompress the model weights into the repository root. The inference script expects a
.ckpt file.Run inference on the demo data
Execute The first run will also invoke ZoeDepth to predict depth for any image pairs that do not supply ground-truth depth files, so it may take a minute or two longer than subsequent runs.
inference.py pointing at the downloaded checkpoint. By default the script reads demo_data/input_metadata.yml, which already contains several example image pairs covering all three registration strategies.Inspect the output images
For every item in the batch, Each
inference.py writes an annotated image to the working directory:prediction_{i}.png corresponds to the i-th entry in the batch list of your metadata file. The image shows both input views side-by-side with predicted change bounding boxes overlaid, ranked by confidence score.Input metadata format
The script’s input is controlled by a YAML file passed via--input_metadata. Each entry in the batch list describes one image pair. The registration_strategy field (3d, 2d, or identity) determines how the two views are aligned before change detection. Optional fields provide ground-truth depth maps, camera intrinsics, and pose information when available.
All paths in
input_metadata.yml are resolved relative to the working directory from which you launch inference.py. Adjust them accordingly if you run the script from a different location.Overriding inference parameters
Allinference.py arguments can be overridden from the command line via jsonargparse. The full set of available flags and their defaults is shown below:
| Flag | Default | Description |
|---|---|---|
--config_file | config.yml | Path to the model configuration file |
--input_metadata | demo_data/input_metadata.yml | Path to the batch metadata YAML |
--load_weights_from | None | Path to the .ckpt checkpoint (required) |
--filter_predictions_with_area_under | 400 | Drop predicted boxes whose pixel area is below this threshold |
--keep_matching_bboxes_only | True | Only retain boxes that have a matching detection in both views |
--max_predictions_to_display | 5 | Maximum number of boxes drawn per image |
--minimum_confidence_threshold | 0.1 | Minimum score for a prediction to be displayed |
Setting
--minimum_confidence_threshold to a lower value will surface more potential changes but may also increase false positives. For high-precision applications, consider raising it to 0.3 or above.