All CYWS-3D training and inference runs are driven by a single YAML configuration file. The file is passed toDocumentation 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 via --config_file and loaded at startup using get_easy_dict_from_yaml_file(), which returns a dot-accessible namespace. Every field that controls model architecture, optimiser behaviour, and data loading lives in this one file — there are no hard-coded defaults scattered across the codebase.
Full config.yml
Top-level fields
Indices of the DINOv2 ViT transformer blocks whose output activations are hooked for feature extraction. The default
[2, 11] captures an early low-level layer and the final semantic layer of a 12-block ViT-S/8 backbone. The number of entries here implicitly determines how many skip connections the encoder produces.Number of image pairs per training step. Each sample in the batch may use a different registration strategy (
"3d", "2d", or "identity"), so the effective GPU memory footprint varies with the mix of input geometry.Number of parallel worker processes spawned by
torch.utils.data.DataLoader for data loading and augmentation. Reduce this value if you encounter shared-memory errors in constrained environments.Base learning rate passed to the AdamW optimiser. The same rate is applied to both the encoder (DINOv2 features) and the decoder unless overridden by a per-parameter-group schedule.
L2 weight-decay coefficient for the AdamW optimiser. Applied uniformly to all parameters.
When
True, input images are normalised using the standard ImageNet mean [0.485, 0.456, 0.406] and standard deviation [0.229, 0.224, 0.225] before being passed to the DINOv2 encoder. This matches the pre-training distribution of the backbone and should remain True unless you are fine-tuning from scratch on a domain with a very different pixel distribution.encoder
Settings for the DINOv2 ViT encoder that produces the dense feature maps fed to the registration module and decoder.Pixel stride used when converting the ViT sequence tokens back to a spatial feature map. A stride of
4 with a patch size of 8 produces a feature map at 1/4 the input resolution. This value must evenly divide encoder.patch.ViT patch size in pixels. Matches the DINOv2-S/8 backbone patch size. Each patch is flattened into a single sequence token by the transformer.
Controls whether the CLS token is concatenated into the spatial feature map during the sequence-to-spatial conversion step. When
False (default) the CLS token is discarded, keeping the feature map dimensions consistent with the decoder’s expected input size.Channel dimension of the features produced by the DINOv2 ViT-S/8 backbone. This value propagates directly into the first entry of
decoder.encoder_channels and the first downsampling_blocks input channel count.decoder
Settings for the UNet-style decoder that takes registered feature maps and predicts per-pixel change masks together with bounding box proposals.Defines the channel progression through the series of
DownSamplingBlock modules that compress the encoder output before the UNet skip connections are reintroduced. Each inner list [in_ch, out_ch] specifies one block. The four blocks here progressively reduce 768 → 512 and then maintain 512 channels through three further blocks.The
encoder_channels argument passed to UnetDecoder. Each entry specifies the number of channels contributed by the corresponding encoder skip connection at that decoder stage. The leading 0 indicates that the deepest stage receives no skip connection from the encoder.Output channel sizes for each successive
UnetDecoder upsampling stage. The five values correspond to the five resolution levels at which the decoder produces feature maps, culminating in a 64-channel map at the original input resolution before the final prediction head.The lengths of
decoder.downsampling_blocks, decoder.encoder_channels, and decoder.decoder_channels are coupled. If you add or remove a stage in one list you must make corresponding changes to all three — and to the vit_feature_layers list if the number of skip connections changes.Usage
Pass the config file path toinference.py at the command line: