vismatch 1.1.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- vismatch/TEMPLATE.py +101 -0
- vismatch/__init__.py +475 -0
- vismatch/assets/example_pairs/false_positive/chartres.jpg +0 -0
- vismatch/assets/example_pairs/false_positive/notre_dame.jpg +0 -0
- vismatch/assets/example_pairs/fresco/fsm.jpg +0 -0
- vismatch/assets/example_pairs/fresco/sist_chapel.jpg +0 -0
- vismatch/assets/example_pairs/indoor/gcs_close.jpg +0 -0
- vismatch/assets/example_pairs/indoor/gcs_far.jpg +0 -0
- vismatch/assets/example_pairs/outdoor/montmartre_close.jpg +0 -0
- vismatch/assets/example_pairs/outdoor/montmartre_far.jpg +0 -0
- vismatch/assets/example_pairs/sat2iss/photo_from_iss.jpg +0 -0
- vismatch/assets/example_pairs/sat2iss/satellite_img.jpg +0 -0
- vismatch/assets/example_pairs/sphereglue/barbershop-00000000.jpg +0 -0
- vismatch/assets/example_pairs/sphereglue/barbershop-00000001.jpg +0 -0
- vismatch/assets/example_pairs/thermal/thermal.jpg +0 -0
- vismatch/assets/example_pairs/thermal/visible.jpg +0 -0
- vismatch/assets/example_test/original.jpg +0 -0
- vismatch/assets/example_test/warped.jpg +0 -0
- vismatch/base_matcher.py +242 -0
- vismatch/im_models/__init__.py +0 -0
- vismatch/im_models/aff_steerers.py +143 -0
- vismatch/im_models/aspanformer.py +74 -0
- vismatch/im_models/dedode.py +150 -0
- vismatch/im_models/duster.py +104 -0
- vismatch/im_models/edm.py +64 -0
- vismatch/im_models/efficient_loftr.py +60 -0
- vismatch/im_models/gim.py +187 -0
- vismatch/im_models/handcrafted.py +81 -0
- vismatch/im_models/keypt2subpx.py +154 -0
- vismatch/im_models/kornia.py +72 -0
- vismatch/im_models/liftfeat.py +44 -0
- vismatch/im_models/lightglue.py +75 -0
- vismatch/im_models/lisrd.py +98 -0
- vismatch/im_models/loftr.py +23 -0
- vismatch/im_models/master.py +107 -0
- vismatch/im_models/matchanything.py +221 -0
- vismatch/im_models/matchformer.py +61 -0
- vismatch/im_models/matching_toolbox.py +238 -0
- vismatch/im_models/minima.py +164 -0
- vismatch/im_models/omniglue.py +91 -0
- vismatch/im_models/rdd.py +250 -0
- vismatch/im_models/ripe.py +55 -0
- vismatch/im_models/roma.py +92 -0
- vismatch/im_models/romav2.py +62 -0
- vismatch/im_models/se2loftr.py +71 -0
- vismatch/im_models/silk.py +405 -0
- vismatch/im_models/sphereglue.py +97 -0
- vismatch/im_models/steerers.py +140 -0
- vismatch/im_models/topicfm.py +93 -0
- vismatch/im_models/ufm.py +57 -0
- vismatch/im_models/xfeat.py +78 -0
- vismatch/im_models/xfeat_steerers.py +151 -0
- vismatch/im_models/xoftr.py +71 -0
- vismatch/third_party/DeDoDe/DeDoDe/__init__.py +2 -0
- vismatch/third_party/DeDoDe/DeDoDe/benchmarks/__init__.py +4 -0
- vismatch/third_party/DeDoDe/DeDoDe/benchmarks/mega_pose_est.py +114 -0
- vismatch/third_party/DeDoDe/DeDoDe/benchmarks/mega_pose_est_mnn.py +119 -0
- vismatch/third_party/DeDoDe/DeDoDe/benchmarks/nll_benchmark.py +57 -0
- vismatch/third_party/DeDoDe/DeDoDe/benchmarks/num_inliers.py +76 -0
- vismatch/third_party/DeDoDe/DeDoDe/checkpoint.py +59 -0
- vismatch/third_party/DeDoDe/DeDoDe/datasets/__init__.py +0 -0
- vismatch/third_party/DeDoDe/DeDoDe/datasets/megadepth.py +269 -0
- vismatch/third_party/DeDoDe/DeDoDe/decoder.py +90 -0
- vismatch/third_party/DeDoDe/DeDoDe/descriptors/__init__.py +0 -0
- vismatch/third_party/DeDoDe/DeDoDe/descriptors/dedode_descriptor.py +50 -0
- vismatch/third_party/DeDoDe/DeDoDe/descriptors/descriptor_loss.py +68 -0
- vismatch/third_party/DeDoDe/DeDoDe/detectors/__init__.py +0 -0
- vismatch/third_party/DeDoDe/DeDoDe/detectors/dedode_detector.py +76 -0
- vismatch/third_party/DeDoDe/DeDoDe/detectors/keypoint_loss.py +185 -0
- vismatch/third_party/DeDoDe/DeDoDe/encoder.py +87 -0
- vismatch/third_party/DeDoDe/DeDoDe/matchers/__init__.py +0 -0
- vismatch/third_party/DeDoDe/DeDoDe/matchers/dual_softmax_matcher.py +38 -0
- vismatch/third_party/DeDoDe/DeDoDe/model_zoo/__init__.py +3 -0
- vismatch/third_party/DeDoDe/DeDoDe/model_zoo/dedode_models.py +249 -0
- vismatch/third_party/DeDoDe/DeDoDe/train.py +76 -0
- vismatch/third_party/DeDoDe/DeDoDe/transformer/__init__.py +8 -0
- vismatch/third_party/DeDoDe/DeDoDe/transformer/dinov2.py +359 -0
- vismatch/third_party/DeDoDe/DeDoDe/transformer/layers/__init__.py +12 -0
- vismatch/third_party/DeDoDe/DeDoDe/transformer/layers/attention.py +81 -0
- vismatch/third_party/DeDoDe/DeDoDe/transformer/layers/block.py +252 -0
- vismatch/third_party/DeDoDe/DeDoDe/transformer/layers/dino_head.py +59 -0
- vismatch/third_party/DeDoDe/DeDoDe/transformer/layers/drop_path.py +35 -0
- vismatch/third_party/DeDoDe/DeDoDe/transformer/layers/layer_scale.py +28 -0
- vismatch/third_party/DeDoDe/DeDoDe/transformer/layers/mlp.py +41 -0
- vismatch/third_party/DeDoDe/DeDoDe/transformer/layers/patch_embed.py +89 -0
- vismatch/third_party/DeDoDe/DeDoDe/transformer/layers/swiglu_ffn.py +63 -0
- vismatch/third_party/DeDoDe/DeDoDe/utils.py +717 -0
- vismatch/third_party/DeDoDe/data_prep/prep_keypoints.py +103 -0
- vismatch/third_party/DeDoDe/demo/demo_kpts.py +24 -0
- vismatch/third_party/DeDoDe/demo/demo_match.py +46 -0
- vismatch/third_party/DeDoDe/demo/demo_match_dedode_G.py +45 -0
- vismatch/third_party/DeDoDe/demo/demo_scoremap.py +23 -0
- vismatch/third_party/DeDoDe/experiments/dedode_descriptor-B.py +135 -0
- vismatch/third_party/DeDoDe/experiments/dedode_descriptor-G.py +145 -0
- vismatch/third_party/DeDoDe/experiments/dedode_detector.py +126 -0
- vismatch/third_party/DeDoDe/experiments/eval/eval_dedode_descriptor-B.py +38 -0
- vismatch/third_party/DeDoDe/experiments/eval/eval_dedode_descriptor-G.py +38 -0
- vismatch/third_party/DeDoDe/setup.py +11 -0
- vismatch/third_party/EDM/configs/data/__init__.py +0 -0
- vismatch/third_party/EDM/configs/data/base.py +37 -0
- vismatch/third_party/EDM/configs/data/megadepth_test_1500.py +23 -0
- vismatch/third_party/EDM/configs/data/megadepth_trainval_832.py +32 -0
- vismatch/third_party/EDM/configs/data/scannet_test_1500.py +24 -0
- vismatch/third_party/EDM/configs/data/scannet_trainval.py +31 -0
- vismatch/third_party/EDM/configs/edm/indoor/edm_base.py +15 -0
- vismatch/third_party/EDM/configs/edm/outdoor/edm_base.py +17 -0
- vismatch/third_party/EDM/deploy/export_onnx.py +69 -0
- vismatch/third_party/EDM/deploy/run_onnx.py +138 -0
- vismatch/third_party/EDM/runtime_single_pair.py +73 -0
- vismatch/third_party/EDM/src/__init__.py +0 -0
- vismatch/third_party/EDM/src/config/default.py +184 -0
- vismatch/third_party/EDM/src/datasets/megadepth.py +164 -0
- vismatch/third_party/EDM/src/datasets/sampler.py +95 -0
- vismatch/third_party/EDM/src/datasets/scannet.py +147 -0
- vismatch/third_party/EDM/src/edm/__init__.py +2 -0
- vismatch/third_party/EDM/src/edm/backbone/resnet.py +116 -0
- vismatch/third_party/EDM/src/edm/edm.py +204 -0
- vismatch/third_party/EDM/src/edm/head/coarse_matching.py +158 -0
- vismatch/third_party/EDM/src/edm/head/fine_matching.py +383 -0
- vismatch/third_party/EDM/src/edm/neck/__init__.py +1 -0
- vismatch/third_party/EDM/src/edm/neck/loftr_module/__init__.py +1 -0
- vismatch/third_party/EDM/src/edm/neck/loftr_module/transformer.py +418 -0
- vismatch/third_party/EDM/src/edm/neck/neck.py +156 -0
- vismatch/third_party/EDM/src/edm/utils/geometry.py +58 -0
- vismatch/third_party/EDM/src/edm/utils/supervision.py +255 -0
- vismatch/third_party/EDM/src/lightning/data.py +450 -0
- vismatch/third_party/EDM/src/lightning/lightning_edm.py +379 -0
- vismatch/third_party/EDM/src/losses/edm_loss.py +206 -0
- vismatch/third_party/EDM/src/optimizers/__init__.py +57 -0
- vismatch/third_party/EDM/src/utils/augment.py +65 -0
- vismatch/third_party/EDM/src/utils/comm.py +271 -0
- vismatch/third_party/EDM/src/utils/dataloader.py +24 -0
- vismatch/third_party/EDM/src/utils/dataset.py +192 -0
- vismatch/third_party/EDM/src/utils/metrics.py +299 -0
- vismatch/third_party/EDM/src/utils/misc.py +113 -0
- vismatch/third_party/EDM/src/utils/plotting.py +186 -0
- vismatch/third_party/EDM/src/utils/profiler.py +40 -0
- vismatch/third_party/EDM/src/utils/warppers.py +428 -0
- vismatch/third_party/EDM/src/utils/warppers_utils.py +172 -0
- vismatch/third_party/EDM/test.py +132 -0
- vismatch/third_party/EDM/train.py +156 -0
- vismatch/third_party/EfficientLoFTR/configs/data/__init__.py +0 -0
- vismatch/third_party/EfficientLoFTR/configs/data/base.py +35 -0
- vismatch/third_party/EfficientLoFTR/configs/data/megadepth_test_1500.py +13 -0
- vismatch/third_party/EfficientLoFTR/configs/data/megadepth_trainval_832.py +24 -0
- vismatch/third_party/EfficientLoFTR/configs/data/scannet_test_1500.py +16 -0
- vismatch/third_party/EfficientLoFTR/configs/loftr/eloftr_full.py +36 -0
- vismatch/third_party/EfficientLoFTR/configs/loftr/eloftr_optimized.py +37 -0
- vismatch/third_party/EfficientLoFTR/src/__init__.py +0 -0
- vismatch/third_party/EfficientLoFTR/src/config/default.py +182 -0
- vismatch/third_party/EfficientLoFTR/src/datasets/megadepth.py +133 -0
- vismatch/third_party/EfficientLoFTR/src/datasets/sampler.py +77 -0
- vismatch/third_party/EfficientLoFTR/src/datasets/scannet.py +129 -0
- vismatch/third_party/EfficientLoFTR/src/lightning/data.py +357 -0
- vismatch/third_party/EfficientLoFTR/src/lightning/lightning_loftr.py +272 -0
- vismatch/third_party/EfficientLoFTR/src/loftr/__init__.py +4 -0
- vismatch/third_party/EfficientLoFTR/src/loftr/backbone/__init__.py +11 -0
- vismatch/third_party/EfficientLoFTR/src/loftr/backbone/backbone.py +37 -0
- vismatch/third_party/EfficientLoFTR/src/loftr/backbone/repvgg.py +224 -0
- vismatch/third_party/EfficientLoFTR/src/loftr/loftr.py +124 -0
- vismatch/third_party/EfficientLoFTR/src/loftr/loftr_module/__init__.py +2 -0
- vismatch/third_party/EfficientLoFTR/src/loftr/loftr_module/fine_preprocess.py +112 -0
- vismatch/third_party/EfficientLoFTR/src/loftr/loftr_module/linear_attention.py +103 -0
- vismatch/third_party/EfficientLoFTR/src/loftr/loftr_module/transformer.py +164 -0
- vismatch/third_party/EfficientLoFTR/src/loftr/utils/coarse_matching.py +241 -0
- vismatch/third_party/EfficientLoFTR/src/loftr/utils/fine_matching.py +156 -0
- vismatch/third_party/EfficientLoFTR/src/loftr/utils/full_config.py +50 -0
- vismatch/third_party/EfficientLoFTR/src/loftr/utils/geometry.py +54 -0
- vismatch/third_party/EfficientLoFTR/src/loftr/utils/opt_config.py +50 -0
- vismatch/third_party/EfficientLoFTR/src/loftr/utils/position_encoding.py +50 -0
- vismatch/third_party/EfficientLoFTR/src/loftr/utils/supervision.py +275 -0
- vismatch/third_party/EfficientLoFTR/src/losses/loftr_loss.py +229 -0
- vismatch/third_party/EfficientLoFTR/src/optimizers/__init__.py +42 -0
- vismatch/third_party/EfficientLoFTR/src/utils/augment.py +55 -0
- vismatch/third_party/EfficientLoFTR/src/utils/comm.py +265 -0
- vismatch/third_party/EfficientLoFTR/src/utils/dataloader.py +23 -0
- vismatch/third_party/EfficientLoFTR/src/utils/dataset.py +186 -0
- vismatch/third_party/EfficientLoFTR/src/utils/metrics.py +264 -0
- vismatch/third_party/EfficientLoFTR/src/utils/misc.py +106 -0
- vismatch/third_party/EfficientLoFTR/src/utils/plotting.py +154 -0
- vismatch/third_party/EfficientLoFTR/src/utils/profiler.py +39 -0
- vismatch/third_party/EfficientLoFTR/src/utils/warppers.py +426 -0
- vismatch/third_party/EfficientLoFTR/src/utils/warppers_utils.py +171 -0
- vismatch/third_party/EfficientLoFTR/test.py +143 -0
- vismatch/third_party/EfficientLoFTR/train.py +154 -0
- vismatch/third_party/LISRD/lisrd/__init__.py +0 -0
- vismatch/third_party/LISRD/lisrd/datasets/__init__.py +7 -0
- vismatch/third_party/LISRD/lisrd/datasets/base_dataset.py +38 -0
- vismatch/third_party/LISRD/lisrd/datasets/coco.py +148 -0
- vismatch/third_party/LISRD/lisrd/datasets/flashes.py +170 -0
- vismatch/third_party/LISRD/lisrd/datasets/hpatches.py +135 -0
- vismatch/third_party/LISRD/lisrd/datasets/mixed_dataset.py +53 -0
- vismatch/third_party/LISRD/lisrd/datasets/rdnim.py +117 -0
- vismatch/third_party/LISRD/lisrd/datasets/utils/data_augmentation.py +168 -0
- vismatch/third_party/LISRD/lisrd/datasets/utils/data_reader.py +48 -0
- vismatch/third_party/LISRD/lisrd/datasets/utils/homographies.py +215 -0
- vismatch/third_party/LISRD/lisrd/datasets/vidit.py +152 -0
- vismatch/third_party/LISRD/lisrd/evaluation/__init__.py +0 -0
- vismatch/third_party/LISRD/lisrd/evaluation/descriptor_evaluation.py +142 -0
- vismatch/third_party/LISRD/lisrd/experiment.py +129 -0
- vismatch/third_party/LISRD/lisrd/export_features.py +148 -0
- vismatch/third_party/LISRD/lisrd/models/__init__.py +7 -0
- vismatch/third_party/LISRD/lisrd/models/backbones/__init__.py +0 -0
- vismatch/third_party/LISRD/lisrd/models/backbones/net_vlad.py +62 -0
- vismatch/third_party/LISRD/lisrd/models/backbones/vgg.py +46 -0
- vismatch/third_party/LISRD/lisrd/models/base_model.py +336 -0
- vismatch/third_party/LISRD/lisrd/models/keypoint_detectors.py +34 -0
- vismatch/third_party/LISRD/lisrd/models/lisrd.py +328 -0
- vismatch/third_party/LISRD/lisrd/models/lisrd_sift.py +289 -0
- vismatch/third_party/LISRD/lisrd/third_party/super_point_magic_leap/demo_superpoint.py +734 -0
- vismatch/third_party/LISRD/lisrd/utils/geometry_utils.py +123 -0
- vismatch/third_party/LISRD/lisrd/utils/losses.py +191 -0
- vismatch/third_party/LISRD/lisrd/utils/metrics.py +66 -0
- vismatch/third_party/LISRD/lisrd/utils/pytorch_utils.py +14 -0
- vismatch/third_party/LISRD/lisrd/utils/stdout_capturing.py +81 -0
- vismatch/third_party/LISRD/notebooks/utils.py +103 -0
- vismatch/third_party/LISRD/setup.py +4 -0
- vismatch/third_party/LiftFeat/dataset/__init__.py +0 -0
- vismatch/third_party/LiftFeat/dataset/coco_augmentor.py +298 -0
- vismatch/third_party/LiftFeat/dataset/coco_wrapper.py +175 -0
- vismatch/third_party/LiftFeat/dataset/dataset_utils.py +183 -0
- vismatch/third_party/LiftFeat/dataset/megadepth.py +177 -0
- vismatch/third_party/LiftFeat/dataset/megadepth_wrapper.py +167 -0
- vismatch/third_party/LiftFeat/demo.py +116 -0
- vismatch/third_party/LiftFeat/evaluation/HPatch_evaluation.py +182 -0
- vismatch/third_party/LiftFeat/evaluation/MegaDepth1500_evaluation.py +105 -0
- vismatch/third_party/LiftFeat/evaluation/eval_utils.py +127 -0
- vismatch/third_party/LiftFeat/loss/loss.py +291 -0
- vismatch/third_party/LiftFeat/models/interpolator.py +34 -0
- vismatch/third_party/LiftFeat/models/liftfeat_wrapper.py +172 -0
- vismatch/third_party/LiftFeat/models/model.py +419 -0
- vismatch/third_party/LiftFeat/tools/demo_match_video.py +145 -0
- vismatch/third_party/LiftFeat/tools/demo_vo.py +163 -0
- vismatch/third_party/LiftFeat/train.py +369 -0
- vismatch/third_party/LiftFeat/utils/VisualOdometry.py +339 -0
- vismatch/third_party/LiftFeat/utils/__init__.py +0 -0
- vismatch/third_party/LiftFeat/utils/alike_wrapper.py +45 -0
- vismatch/third_party/LiftFeat/utils/config.py +16 -0
- vismatch/third_party/LiftFeat/utils/depth_anything_wrapper.py +150 -0
- vismatch/third_party/LiftFeat/utils/featurebooster.py +247 -0
- vismatch/third_party/LiftFeat/utils/post_process.py +21 -0
- vismatch/third_party/LightGlue/benchmark.py +255 -0
- vismatch/third_party/LightGlue/lightglue/__init__.py +7 -0
- vismatch/third_party/LightGlue/lightglue/aliked.py +760 -0
- vismatch/third_party/LightGlue/lightglue/disk.py +55 -0
- vismatch/third_party/LightGlue/lightglue/dog_hardnet.py +41 -0
- vismatch/third_party/LightGlue/lightglue/lightglue.py +662 -0
- vismatch/third_party/LightGlue/lightglue/sift.py +216 -0
- vismatch/third_party/LightGlue/lightglue/superpoint.py +227 -0
- vismatch/third_party/LightGlue/lightglue/utils.py +165 -0
- vismatch/third_party/LightGlue/lightglue/viz2d.py +203 -0
- vismatch/third_party/MINIMA/demo.py +201 -0
- vismatch/third_party/MINIMA/src/__init__.py +0 -0
- vismatch/third_party/MINIMA/src/config/default.py +203 -0
- vismatch/third_party/MINIMA/src/config/default_for_megadepth_dense.py +203 -0
- vismatch/third_party/MINIMA/src/config/default_for_megadepth_sparse.py +203 -0
- vismatch/third_party/MINIMA/src/utils/__init__.py +0 -0
- vismatch/third_party/MINIMA/src/utils/culculate_auc.py +28 -0
- vismatch/third_party/MINIMA/src/utils/data_io.py +156 -0
- vismatch/third_party/MINIMA/src/utils/data_io_loftr.py +152 -0
- vismatch/third_party/MINIMA/src/utils/data_io_roma.py +186 -0
- vismatch/third_party/MINIMA/src/utils/data_io_sp_lg.py +158 -0
- vismatch/third_party/MINIMA/src/utils/load_model.py +164 -0
- vismatch/third_party/MINIMA/src/utils/metrics.py +214 -0
- vismatch/third_party/MINIMA/src/utils/misc.py +101 -0
- vismatch/third_party/MINIMA/src/utils/plotting.py +291 -0
- vismatch/third_party/MINIMA/src/utils/sample_h.py +142 -0
- vismatch/third_party/MINIMA/test_relative_homo_depth.py +683 -0
- vismatch/third_party/MINIMA/test_relative_homo_event.py +722 -0
- vismatch/third_party/MINIMA/test_relative_homo_mmim.py +669 -0
- vismatch/third_party/MINIMA/test_relative_pose_infrared.py +500 -0
- vismatch/third_party/MINIMA/test_relative_pose_mega_1500.py +487 -0
- vismatch/third_party/MINIMA/test_relative_pose_mega_1500_syn.py +516 -0
- vismatch/third_party/MINIMA/third_party/LightGlue/benchmark.py +255 -0
- vismatch/third_party/MINIMA/third_party/LightGlue/lightglue/__init__.py +7 -0
- vismatch/third_party/MINIMA/third_party/LightGlue/lightglue/aliked.py +758 -0
- vismatch/third_party/MINIMA/third_party/LightGlue/lightglue/disk.py +55 -0
- vismatch/third_party/MINIMA/third_party/LightGlue/lightglue/dog_hardnet.py +41 -0
- vismatch/third_party/MINIMA/third_party/LightGlue/lightglue/lightglue.py +655 -0
- vismatch/third_party/MINIMA/third_party/LightGlue/lightglue/sift.py +216 -0
- vismatch/third_party/MINIMA/third_party/LightGlue/lightglue/superpoint.py +227 -0
- vismatch/third_party/MINIMA/third_party/LightGlue/lightglue/utils.py +165 -0
- vismatch/third_party/MINIMA/third_party/LightGlue/lightglue/viz2d.py +184 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/configs/data/__init__.py +0 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/configs/data/base.py +35 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/configs/data/megadepth_test_1500.py +11 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/configs/data/megadepth_trainval_640.py +22 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/configs/data/megadepth_trainval_840.py +22 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/configs/data/scannet_test_1500.py +11 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/configs/data/scannet_trainval.py +17 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/configs/loftr/indoor/buggy_pos_enc/loftr_ds.py +6 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/configs/loftr/indoor/buggy_pos_enc/loftr_ds_dense.py +8 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/configs/loftr/indoor/buggy_pos_enc/loftr_ot.py +6 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/configs/loftr/indoor/buggy_pos_enc/loftr_ot_dense.py +8 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/configs/loftr/indoor/loftr_ds.py +5 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/configs/loftr/indoor/loftr_ds_dense.py +7 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/configs/loftr/indoor/loftr_ot.py +5 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/configs/loftr/indoor/loftr_ot_dense.py +7 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/configs/loftr/indoor/scannet/loftr_ds_eval.py +16 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/configs/loftr/indoor/scannet/loftr_ds_eval_new.py +18 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/configs/loftr/outdoor/buggy_pos_enc/loftr_ds.py +16 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/configs/loftr/outdoor/buggy_pos_enc/loftr_ds_dense.py +17 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/configs/loftr/outdoor/buggy_pos_enc/loftr_ot.py +16 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/configs/loftr/outdoor/buggy_pos_enc/loftr_ot_dense.py +17 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/configs/loftr/outdoor/loftr_ds.py +15 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/configs/loftr/outdoor/loftr_ds_dense.py +16 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/configs/loftr/outdoor/loftr_ot.py +15 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/configs/loftr/outdoor/loftr_ot_dense.py +16 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/demo/demo_loftr.py +240 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/src/__init__.py +0 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/src/config/default.py +171 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/src/datasets/megadepth.py +127 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/src/datasets/sampler.py +77 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/src/datasets/scannet.py +114 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/src/lightning/data.py +320 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/src/lightning/lightning_loftr.py +249 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/src/loftr/__init__.py +2 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/src/loftr/backbone/__init__.py +11 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/src/loftr/backbone/resnet_fpn.py +199 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/src/loftr/loftr.py +81 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/src/loftr/loftr_module/__init__.py +2 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/src/loftr/loftr_module/fine_preprocess.py +59 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/src/loftr/loftr_module/linear_attention.py +81 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/src/loftr/loftr_module/transformer.py +101 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/src/loftr/utils/coarse_matching.py +261 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/src/loftr/utils/cvpr_ds_config.py +50 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/src/loftr/utils/fine_matching.py +74 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/src/loftr/utils/geometry.py +54 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/src/loftr/utils/position_encoding.py +42 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/src/loftr/utils/supervision.py +151 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/src/losses/loftr_loss.py +192 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/src/optimizers/__init__.py +42 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/src/utils/augment.py +55 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/src/utils/comm.py +265 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/src/utils/dataloader.py +23 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/src/utils/dataset.py +185 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/src/utils/metrics.py +193 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/src/utils/misc.py +101 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/src/utils/plotting.py +154 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/src/utils/profiler.py +39 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/test.py +68 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/third_party/SuperGluePretrainedNetwork/demo_superglue.py +259 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/third_party/SuperGluePretrainedNetwork/match_pairs.py +425 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/third_party/SuperGluePretrainedNetwork/models/__init__.py +0 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/third_party/SuperGluePretrainedNetwork/models/matching.py +84 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/third_party/SuperGluePretrainedNetwork/models/superglue.py +283 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/third_party/SuperGluePretrainedNetwork/models/superpoint.py +202 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/third_party/SuperGluePretrainedNetwork/models/utils.py +555 -0
- vismatch/third_party/MINIMA/third_party/LoFTR/train.py +123 -0
- vismatch/third_party/MINIMA/third_party/RoMa/demo/demo_3D_effect.py +47 -0
- vismatch/third_party/MINIMA/third_party/RoMa/demo/demo_fundamental.py +34 -0
- vismatch/third_party/MINIMA/third_party/RoMa/demo/demo_match.py +50 -0
- vismatch/third_party/MINIMA/third_party/RoMa/demo/demo_match_opencv_sift.py +43 -0
- vismatch/third_party/MINIMA/third_party/RoMa/demo/demo_match_tiny.py +77 -0
- vismatch/third_party/MINIMA/third_party/RoMa/experiments/eval_roma_outdoor.py +57 -0
- vismatch/third_party/MINIMA/third_party/RoMa/experiments/eval_tiny_roma_v1_outdoor.py +84 -0
- vismatch/third_party/MINIMA/third_party/RoMa/experiments/roma_indoor.py +320 -0
- vismatch/third_party/MINIMA/third_party/RoMa/experiments/train_roma_outdoor.py +307 -0
- vismatch/third_party/MINIMA/third_party/RoMa/experiments/train_tiny_roma_v1_outdoor.py +498 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/__init__.py +8 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/benchmarks/__init__.py +6 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/benchmarks/hpatches_sequences_homog_benchmark.py +113 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/benchmarks/megadepth_dense_benchmark.py +106 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/benchmarks/megadepth_pose_estimation_benchmark.py +118 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/benchmarks/megadepth_pose_estimation_benchmark_poselib.py +119 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/benchmarks/scannet_benchmark.py +143 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/checkpointing/__init__.py +1 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/checkpointing/checkpoint.py +60 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/datasets/__init__.py +2 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/datasets/megadepth.py +232 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/datasets/scannet.py +160 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/losses/__init__.py +1 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/losses/robust_loss.py +161 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/losses/robust_loss_tiny_roma.py +160 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/models/__init__.py +1 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/models/encoders.py +122 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/models/matcher.py +766 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/models/model_zoo/__init__.py +73 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/models/model_zoo/roma_models.py +170 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/models/tiny.py +304 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/models/transformer/__init__.py +48 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/models/transformer/dinov2.py +359 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/models/transformer/layers/__init__.py +12 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/models/transformer/layers/attention.py +81 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/models/transformer/layers/block.py +252 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/models/transformer/layers/dino_head.py +59 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/models/transformer/layers/drop_path.py +35 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/models/transformer/layers/layer_scale.py +28 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/models/transformer/layers/mlp.py +41 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/models/transformer/layers/patch_embed.py +89 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/models/transformer/layers/swiglu_ffn.py +63 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/train/__init__.py +1 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/train/train.py +102 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/utils/__init__.py +16 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/utils/kde.py +13 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/utils/local_correlation.py +48 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/utils/transforms.py +118 -0
- vismatch/third_party/MINIMA/third_party/RoMa/romatch/utils/utils.py +662 -0
- vismatch/third_party/MINIMA/third_party/RoMa/setup.py +9 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/configs/data/__init__.py +0 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/configs/data/base.py +35 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/configs/data/megadepth_trainval_840.py +22 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/configs/data/megadepth_vistir_trainval_640.py +23 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/configs/data/pretrain.py +8 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/configs/xoftr/outdoor/visible_thermal.py +17 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/configs/xoftr/pretrain/pretrain.py +12 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/pretrain.py +125 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/src/__init__.py +0 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/src/config/default.py +203 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/src/datasets/megadepth.py +143 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/src/datasets/pretrain_dataset.py +156 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/src/datasets/sampler.py +77 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/src/datasets/scannet.py +114 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/src/datasets/vistir.py +109 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/src/lightning/data.py +346 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/src/lightning/data_pretrain.py +125 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/src/lightning/lightning_xoftr.py +334 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/src/lightning/lightning_xoftr_pretrain.py +171 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/src/losses/xoftr_loss.py +170 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/src/losses/xoftr_loss_pretrain.py +37 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/src/optimizers/__init__.py +42 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/src/utils/augment.py +113 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/src/utils/comm.py +265 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/src/utils/data_io.py +144 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/src/utils/dataloader.py +23 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/src/utils/dataset.py +279 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/src/utils/metrics.py +211 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/src/utils/misc.py +101 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/src/utils/plotting.py +227 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/src/utils/pretrain_utils.py +83 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/src/utils/profiler.py +39 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/src/xoftr/__init__.py +2 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/src/xoftr/backbone/__init__.py +1 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/src/xoftr/backbone/resnet.py +95 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/src/xoftr/utils/geometry.py +107 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/src/xoftr/utils/position_encoding.py +36 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/src/xoftr/utils/supervision.py +290 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/src/xoftr/xoftr.py +94 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/src/xoftr/xoftr_module/__init__.py +4 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/src/xoftr/xoftr_module/coarse_matching.py +305 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/src/xoftr/xoftr_module/fine_matching.py +170 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/src/xoftr/xoftr_module/fine_process.py +321 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/src/xoftr/xoftr_module/linear_attention.py +81 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/src/xoftr/xoftr_module/transformer.py +101 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/src/xoftr/xoftr_pretrain.py +209 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/test.py +68 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/test_relative_pose.py +330 -0
- vismatch/third_party/MINIMA/third_party/XoFTR/train.py +126 -0
- vismatch/third_party/MatchAnything/app.py +27 -0
- vismatch/third_party/MatchAnything/imcui/__init__.py +0 -0
- vismatch/third_party/MatchAnything/imcui/api/__init__.py +47 -0
- vismatch/third_party/MatchAnything/imcui/api/client.py +232 -0
- vismatch/third_party/MatchAnything/imcui/api/core.py +308 -0
- vismatch/third_party/MatchAnything/imcui/api/server.py +170 -0
- vismatch/third_party/MatchAnything/imcui/hloc/__init__.py +65 -0
- vismatch/third_party/MatchAnything/imcui/hloc/colmap_from_nvm.py +216 -0
- vismatch/third_party/MatchAnything/imcui/hloc/extract_features.py +607 -0
- vismatch/third_party/MatchAnything/imcui/hloc/extractors/__init__.py +0 -0
- vismatch/third_party/MatchAnything/imcui/hloc/extractors/alike.py +61 -0
- vismatch/third_party/MatchAnything/imcui/hloc/extractors/aliked.py +32 -0
- vismatch/third_party/MatchAnything/imcui/hloc/extractors/cosplace.py +44 -0
- vismatch/third_party/MatchAnything/imcui/hloc/extractors/d2net.py +60 -0
- vismatch/third_party/MatchAnything/imcui/hloc/extractors/darkfeat.py +44 -0
- vismatch/third_party/MatchAnything/imcui/hloc/extractors/dedode.py +86 -0
- vismatch/third_party/MatchAnything/imcui/hloc/extractors/dir.py +78 -0
- vismatch/third_party/MatchAnything/imcui/hloc/extractors/disk.py +35 -0
- vismatch/third_party/MatchAnything/imcui/hloc/extractors/dog.py +135 -0
- vismatch/third_party/MatchAnything/imcui/hloc/extractors/eigenplaces.py +57 -0
- vismatch/third_party/MatchAnything/imcui/hloc/extractors/example.py +56 -0
- vismatch/third_party/MatchAnything/imcui/hloc/extractors/fire.py +72 -0
- vismatch/third_party/MatchAnything/imcui/hloc/extractors/fire_local.py +84 -0
- vismatch/third_party/MatchAnything/imcui/hloc/extractors/lanet.py +63 -0
- vismatch/third_party/MatchAnything/imcui/hloc/extractors/netvlad.py +146 -0
- vismatch/third_party/MatchAnything/imcui/hloc/extractors/openibl.py +26 -0
- vismatch/third_party/MatchAnything/imcui/hloc/extractors/r2d2.py +73 -0
- vismatch/third_party/MatchAnything/imcui/hloc/extractors/rekd.py +60 -0
- vismatch/third_party/MatchAnything/imcui/hloc/extractors/rord.py +59 -0
- vismatch/third_party/MatchAnything/imcui/hloc/extractors/sfd2.py +44 -0
- vismatch/third_party/MatchAnything/imcui/hloc/extractors/sift.py +216 -0
- vismatch/third_party/MatchAnything/imcui/hloc/extractors/superpoint.py +51 -0
- vismatch/third_party/MatchAnything/imcui/hloc/extractors/xfeat.py +33 -0
- vismatch/third_party/MatchAnything/imcui/hloc/localize_inloc.py +179 -0
- vismatch/third_party/MatchAnything/imcui/hloc/localize_sfm.py +243 -0
- vismatch/third_party/MatchAnything/imcui/hloc/match_dense.py +1158 -0
- vismatch/third_party/MatchAnything/imcui/hloc/match_features.py +459 -0
- vismatch/third_party/MatchAnything/imcui/hloc/matchers/__init__.py +3 -0
- vismatch/third_party/MatchAnything/imcui/hloc/matchers/adalam.py +68 -0
- vismatch/third_party/MatchAnything/imcui/hloc/matchers/aspanformer.py +66 -0
- vismatch/third_party/MatchAnything/imcui/hloc/matchers/cotr.py +77 -0
- vismatch/third_party/MatchAnything/imcui/hloc/matchers/dkm.py +53 -0
- vismatch/third_party/MatchAnything/imcui/hloc/matchers/dual_softmax.py +71 -0
- vismatch/third_party/MatchAnything/imcui/hloc/matchers/duster.py +109 -0
- vismatch/third_party/MatchAnything/imcui/hloc/matchers/eloftr.py +97 -0
- vismatch/third_party/MatchAnything/imcui/hloc/matchers/gim.py +200 -0
- vismatch/third_party/MatchAnything/imcui/hloc/matchers/gluestick.py +99 -0
- vismatch/third_party/MatchAnything/imcui/hloc/matchers/imp.py +50 -0
- vismatch/third_party/MatchAnything/imcui/hloc/matchers/lightglue.py +67 -0
- vismatch/third_party/MatchAnything/imcui/hloc/matchers/loftr.py +58 -0
- vismatch/third_party/MatchAnything/imcui/hloc/matchers/mast3r.py +96 -0
- vismatch/third_party/MatchAnything/imcui/hloc/matchers/matchanything.py +191 -0
- vismatch/third_party/MatchAnything/imcui/hloc/matchers/mickey.py +50 -0
- vismatch/third_party/MatchAnything/imcui/hloc/matchers/nearest_neighbor.py +66 -0
- vismatch/third_party/MatchAnything/imcui/hloc/matchers/omniglue.py +80 -0
- vismatch/third_party/MatchAnything/imcui/hloc/matchers/roma.py +80 -0
- vismatch/third_party/MatchAnything/imcui/hloc/matchers/sgmnet.py +106 -0
- vismatch/third_party/MatchAnything/imcui/hloc/matchers/sold2.py +144 -0
- vismatch/third_party/MatchAnything/imcui/hloc/matchers/superglue.py +33 -0
- vismatch/third_party/MatchAnything/imcui/hloc/matchers/topicfm.py +60 -0
- vismatch/third_party/MatchAnything/imcui/hloc/matchers/xfeat_dense.py +54 -0
- vismatch/third_party/MatchAnything/imcui/hloc/matchers/xfeat_lightglue.py +48 -0
- vismatch/third_party/MatchAnything/imcui/hloc/matchers/xoftr.py +90 -0
- vismatch/third_party/MatchAnything/imcui/hloc/pairs_from_covisibility.py +60 -0
- vismatch/third_party/MatchAnything/imcui/hloc/pairs_from_exhaustive.py +64 -0
- vismatch/third_party/MatchAnything/imcui/hloc/pairs_from_poses.py +68 -0
- vismatch/third_party/MatchAnything/imcui/hloc/pairs_from_retrieval.py +133 -0
- vismatch/third_party/MatchAnything/imcui/hloc/pipelines/4Seasons/__init__.py +0 -0
- vismatch/third_party/MatchAnything/imcui/hloc/pipelines/4Seasons/localize.py +89 -0
- vismatch/third_party/MatchAnything/imcui/hloc/pipelines/4Seasons/prepare_reference.py +51 -0
- vismatch/third_party/MatchAnything/imcui/hloc/pipelines/4Seasons/utils.py +231 -0
- vismatch/third_party/MatchAnything/imcui/hloc/pipelines/7Scenes/__init__.py +0 -0
- vismatch/third_party/MatchAnything/imcui/hloc/pipelines/7Scenes/create_gt_sfm.py +134 -0
- vismatch/third_party/MatchAnything/imcui/hloc/pipelines/7Scenes/pipeline.py +139 -0
- vismatch/third_party/MatchAnything/imcui/hloc/pipelines/7Scenes/utils.py +34 -0
- vismatch/third_party/MatchAnything/imcui/hloc/pipelines/Aachen/__init__.py +0 -0
- vismatch/third_party/MatchAnything/imcui/hloc/pipelines/Aachen/pipeline.py +109 -0
- vismatch/third_party/MatchAnything/imcui/hloc/pipelines/Aachen_v1_1/__init__.py +0 -0
- vismatch/third_party/MatchAnything/imcui/hloc/pipelines/Aachen_v1_1/pipeline.py +104 -0
- vismatch/third_party/MatchAnything/imcui/hloc/pipelines/Aachen_v1_1/pipeline_loftr.py +104 -0
- vismatch/third_party/MatchAnything/imcui/hloc/pipelines/CMU/__init__.py +0 -0
- vismatch/third_party/MatchAnything/imcui/hloc/pipelines/CMU/pipeline.py +133 -0
- vismatch/third_party/MatchAnything/imcui/hloc/pipelines/Cambridge/__init__.py +0 -0
- vismatch/third_party/MatchAnything/imcui/hloc/pipelines/Cambridge/pipeline.py +140 -0
- vismatch/third_party/MatchAnything/imcui/hloc/pipelines/Cambridge/utils.py +145 -0
- vismatch/third_party/MatchAnything/imcui/hloc/pipelines/RobotCar/__init__.py +0 -0
- vismatch/third_party/MatchAnything/imcui/hloc/pipelines/RobotCar/colmap_from_nvm.py +176 -0
- vismatch/third_party/MatchAnything/imcui/hloc/pipelines/RobotCar/pipeline.py +143 -0
- vismatch/third_party/MatchAnything/imcui/hloc/pipelines/__init__.py +0 -0
- vismatch/third_party/MatchAnything/imcui/hloc/reconstruction.py +194 -0
- vismatch/third_party/MatchAnything/imcui/hloc/triangulation.py +311 -0
- vismatch/third_party/MatchAnything/imcui/hloc/utils/__init__.py +12 -0
- vismatch/third_party/MatchAnything/imcui/hloc/utils/base_model.py +56 -0
- vismatch/third_party/MatchAnything/imcui/hloc/utils/database.py +412 -0
- vismatch/third_party/MatchAnything/imcui/hloc/utils/geometry.py +16 -0
- vismatch/third_party/MatchAnything/imcui/hloc/utils/io.py +77 -0
- vismatch/third_party/MatchAnything/imcui/hloc/utils/parsers.py +59 -0
- vismatch/third_party/MatchAnything/imcui/hloc/utils/read_write_model.py +588 -0
- vismatch/third_party/MatchAnything/imcui/hloc/utils/viz.py +146 -0
- vismatch/third_party/MatchAnything/imcui/hloc/utils/viz_3d.py +203 -0
- vismatch/third_party/MatchAnything/imcui/hloc/visualization.py +178 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/configs/models/eloftr_model.py +128 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/configs/models/roma_model.py +27 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/notebooks/notebooks_utils/__init__.py +1 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/notebooks/notebooks_utils/plotting.py +344 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/__init__.py +0 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/config/default.py +344 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/datasets/common_data_pair.py +214 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/lightning/lightning_loftr.py +343 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/loftr/__init__.py +1 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/loftr/backbone/__init__.py +61 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/loftr/backbone/repvgg.py +319 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/loftr/backbone/resnet_fpn.py +1094 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/loftr/backbone/s2dnet.py +131 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/loftr/loftr.py +273 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/loftr/loftr_module/__init__.py +2 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/loftr/loftr_module/fine_preprocess.py +350 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/loftr/loftr_module/linear_attention.py +217 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/loftr/loftr_module/transformer.py +1768 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/loftr/loftr_module/transformer_utils.py +76 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/loftr/utils/coarse_matching.py +266 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/loftr/utils/fine_matching.py +493 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/loftr/utils/geometry.py +298 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/loftr/utils/position_encoding.py +131 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/loftr/utils/supervision.py +475 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/optimizers/__init__.py +50 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/utils/__init__.py +0 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/utils/augment.py +55 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/utils/colmap/__init__.py +0 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/utils/colmap/database.py +417 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/utils/colmap/eval_helper.py +232 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/utils/colmap/read_write_model.py +509 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/utils/colmap.py +530 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/utils/comm.py +265 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/utils/dataloader.py +23 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/utils/dataset.py +518 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/utils/easydict.py +148 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/utils/geometry.py +366 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/utils/homography_utils.py +366 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/utils/metrics.py +445 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/utils/misc.py +101 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/utils/plotting.py +248 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/utils/profiler.py +39 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/utils/ray_utils.py +134 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/utils/sample_homo.py +58 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/src/utils/utils.py +600 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/demo/demo_3D_effect.py +46 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/demo/demo_fundamental.py +32 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/demo/demo_fundamental_model_warpper.py +34 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/demo/demo_match.py +50 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/demo/demo_match_opencv_sift.py +43 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/demo_single_pair.py +329 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/experiments/roma_indoor.py +320 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/experiments/roma_outdoor.py +327 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/notebooks/notebooks_utils/__init__.py +1 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/notebooks/notebooks_utils/plotting.py +331 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/__init__.py +8 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/benchmarks/__init__.py +4 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/benchmarks/hpatches_sequences_homog_benchmark.py +113 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/benchmarks/megadepth_dense_benchmark.py +106 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/benchmarks/megadepth_pose_estimation_benchmark.py +140 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/benchmarks/scannet_benchmark.py +143 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/checkpointing/__init__.py +1 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/checkpointing/checkpoint.py +60 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/datasets/__init__.py +2 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/datasets/megadepth.py +230 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/datasets/scannet.py +160 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/losses/__init__.py +1 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/losses/robust_loss.py +157 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/matchanything_roma_model.py +104 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/__init__.py +1 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/croco/blocks.py +241 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/croco/criterion.py +37 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/croco/croco.py +253 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/croco/croco_downstream.py +122 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/croco/curope/__init__.py +4 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/croco/curope/curope2d.py +40 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/croco/curope/setup.py +34 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/croco/dpt_block.py +450 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/croco/head_downstream.py +58 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/croco/masking.py +25 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/croco/pos_embed.py +159 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/dust3r/__init__.py +2 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/dust3r/cloud_opt/__init__.py +29 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/dust3r/cloud_opt/base_opt.py +375 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/dust3r/cloud_opt/commons.py +90 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/dust3r/cloud_opt/init_im_poses.py +312 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/dust3r/cloud_opt/optimizer.py +230 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/dust3r/cloud_opt/pair_viewer.py +125 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/dust3r/datasets/__init__.py +42 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/dust3r/datasets/base/__init__.py +2 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/dust3r/datasets/base/base_stereo_view_dataset.py +220 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/dust3r/datasets/base/batched_sampler.py +74 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/dust3r/datasets/base/easy_dataset.py +157 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/dust3r/datasets/co3d.py +146 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/dust3r/datasets/utils/__init__.py +2 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/dust3r/datasets/utils/cropping.py +119 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/dust3r/datasets/utils/transforms.py +11 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/dust3r/heads/__init__.py +19 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/dust3r/heads/dpt_head.py +114 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/dust3r/heads/linear_head.py +41 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/dust3r/heads/postprocess.py +58 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/dust3r/image_pairs.py +83 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/dust3r/inference.py +165 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/dust3r/losses.py +297 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/dust3r/model.py +167 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/dust3r/optim_factory.py +14 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/dust3r/patch_embed.py +70 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/dust3r/post_process.py +60 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/dust3r/utils/__init__.py +2 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/dust3r/utils/device.py +76 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/dust3r/utils/geometry.py +361 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/dust3r/utils/image.py +104 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/dust3r/utils/misc.py +121 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/dust3r/utils/path_to_croco.py +19 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/dust3r/viz.py +320 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/encoders.py +137 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/matcher.py +937 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/model_zoo/__init__.py +53 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/model_zoo/roma_models.py +162 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/transformer/__init__.py +47 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/transformer/dinov2.py +359 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/transformer/layers/__init__.py +12 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/transformer/layers/attention.py +81 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/transformer/layers/block.py +252 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/transformer/layers/dino_head.py +59 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/transformer/layers/drop_path.py +35 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/transformer/layers/layer_scale.py +28 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/transformer/layers/mlp.py +41 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/transformer/layers/patch_embed.py +89 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/models/transformer/layers/swiglu_ffn.py +63 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/roma_adpat_model.py +32 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/train/__init__.py +1 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/train/train.py +102 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/utils/__init__.py +18 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/utils/kde.py +8 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/utils/local_correlation.py +44 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/utils/transforms.py +118 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/roma/utils/utils.py +661 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/third_party/ROMA/setup.py +9 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/tools/__init__.py +0 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/tools/evaluate_datasets.py +239 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/tools/tools_utils/data_io.py +94 -0
- vismatch/third_party/MatchAnything/imcui/third_party/MatchAnything/tools/tools_utils/plot.py +77 -0
- vismatch/third_party/MatchAnything/imcui/ui/__init__.py +5 -0
- vismatch/third_party/MatchAnything/imcui/ui/app_class.py +824 -0
- vismatch/third_party/MatchAnything/imcui/ui/sfm.py +164 -0
- vismatch/third_party/MatchAnything/imcui/ui/utils.py +1085 -0
- vismatch/third_party/MatchAnything/imcui/ui/viz.py +511 -0
- vismatch/third_party/MatchAnything/tests/test_basic.py +111 -0
- vismatch/third_party/MatchFormer/config/data/__init__.py +0 -0
- vismatch/third_party/MatchFormer/config/data/base.py +35 -0
- vismatch/third_party/MatchFormer/config/data/megadepth_test_1500.py +11 -0
- vismatch/third_party/MatchFormer/config/data/scannet_test_1500.py +11 -0
- vismatch/third_party/MatchFormer/config/defaultmf.py +88 -0
- vismatch/third_party/MatchFormer/model/backbone/__init__.py +17 -0
- vismatch/third_party/MatchFormer/model/backbone/coarse_matching.py +228 -0
- vismatch/third_party/MatchFormer/model/backbone/fine_matching.py +74 -0
- vismatch/third_party/MatchFormer/model/backbone/fine_preprocess.py +59 -0
- vismatch/third_party/MatchFormer/model/backbone/match_LA_large.py +254 -0
- vismatch/third_party/MatchFormer/model/backbone/match_LA_lite.py +254 -0
- vismatch/third_party/MatchFormer/model/backbone/match_SEA_large.py +291 -0
- vismatch/third_party/MatchFormer/model/backbone/match_SEA_lite.py +291 -0
- vismatch/third_party/MatchFormer/model/data.py +320 -0
- vismatch/third_party/MatchFormer/model/datasets/dataset.py +231 -0
- vismatch/third_party/MatchFormer/model/datasets/megadepth.py +126 -0
- vismatch/third_party/MatchFormer/model/datasets/sampler.py +77 -0
- vismatch/third_party/MatchFormer/model/datasets/scannet.py +113 -0
- vismatch/third_party/MatchFormer/model/lightning_loftr.py +102 -0
- vismatch/third_party/MatchFormer/model/matchformer.py +54 -0
- vismatch/third_party/MatchFormer/model/utils/augment.py +55 -0
- vismatch/third_party/MatchFormer/model/utils/comm.py +265 -0
- vismatch/third_party/MatchFormer/model/utils/dataloader.py +23 -0
- vismatch/third_party/MatchFormer/model/utils/metrics.py +193 -0
- vismatch/third_party/MatchFormer/model/utils/misc.py +101 -0
- vismatch/third_party/MatchFormer/model/utils/profiler.py +39 -0
- vismatch/third_party/MatchFormer/test.py +55 -0
- vismatch/third_party/RIPE/app.py +272 -0
- vismatch/third_party/RIPE/demo.py +51 -0
- vismatch/third_party/RIPE/ripe/__init__.py +1 -0
- vismatch/third_party/RIPE/ripe/benchmarks/imw_2020.py +320 -0
- vismatch/third_party/RIPE/ripe/data/__init__.py +0 -0
- vismatch/third_party/RIPE/ripe/data/data_transforms.py +204 -0
- vismatch/third_party/RIPE/ripe/data/datasets/__init__.py +0 -0
- vismatch/third_party/RIPE/ripe/data/datasets/acdc.py +154 -0
- vismatch/third_party/RIPE/ripe/data/datasets/dataset_combinator.py +88 -0
- vismatch/third_party/RIPE/ripe/data/datasets/disk_imw.py +160 -0
- vismatch/third_party/RIPE/ripe/data/datasets/disk_megadepth.py +157 -0
- vismatch/third_party/RIPE/ripe/data/datasets/tokyo247.py +134 -0
- vismatch/third_party/RIPE/ripe/data/datasets/tokyo_query_v3.py +78 -0
- vismatch/third_party/RIPE/ripe/losses/__init__.py +0 -0
- vismatch/third_party/RIPE/ripe/losses/contrastive_loss.py +88 -0
- vismatch/third_party/RIPE/ripe/matcher/__init__.py +0 -0
- vismatch/third_party/RIPE/ripe/matcher/concurrent_matcher.py +97 -0
- vismatch/third_party/RIPE/ripe/matcher/pose_estimator_poselib.py +31 -0
- vismatch/third_party/RIPE/ripe/model_zoo/__init__.py +1 -0
- vismatch/third_party/RIPE/ripe/model_zoo/vgg_hyper.py +39 -0
- vismatch/third_party/RIPE/ripe/models/__init__.py +0 -0
- vismatch/third_party/RIPE/ripe/models/backbones/__init__.py +0 -0
- vismatch/third_party/RIPE/ripe/models/backbones/backbone_base.py +61 -0
- vismatch/third_party/RIPE/ripe/models/backbones/vgg.py +99 -0
- vismatch/third_party/RIPE/ripe/models/backbones/vgg_utils.py +143 -0
- vismatch/third_party/RIPE/ripe/models/ripe.py +303 -0
- vismatch/third_party/RIPE/ripe/models/upsampler/hypercolumn_features.py +54 -0
- vismatch/third_party/RIPE/ripe/models/upsampler/interpolate_sparse2d.py +37 -0
- vismatch/third_party/RIPE/ripe/scheduler/__init__.py +0 -0
- vismatch/third_party/RIPE/ripe/scheduler/constant.py +6 -0
- vismatch/third_party/RIPE/ripe/scheduler/expDecay.py +26 -0
- vismatch/third_party/RIPE/ripe/scheduler/linearLR.py +37 -0
- vismatch/third_party/RIPE/ripe/scheduler/linear_with_plateaus.py +44 -0
- vismatch/third_party/RIPE/ripe/train.py +410 -0
- vismatch/third_party/RIPE/ripe/utils/__init__.py +2 -0
- vismatch/third_party/RIPE/ripe/utils/image_utils.py +62 -0
- vismatch/third_party/RIPE/ripe/utils/pose_error.py +62 -0
- vismatch/third_party/RIPE/ripe/utils/pylogger.py +32 -0
- vismatch/third_party/RIPE/ripe/utils/utils.py +192 -0
- vismatch/third_party/RIPE/ripe/utils/wandb_utils.py +16 -0
- vismatch/third_party/RoMa/demo/demo_3D_effect.py +47 -0
- vismatch/third_party/RoMa/demo/demo_fundamental.py +34 -0
- vismatch/third_party/RoMa/demo/demo_match.py +50 -0
- vismatch/third_party/RoMa/demo/demo_match_opencv_sift.py +43 -0
- vismatch/third_party/RoMa/demo/demo_match_tiny.py +77 -0
- vismatch/third_party/RoMa/experiments/eval_roma_outdoor.py +57 -0
- vismatch/third_party/RoMa/experiments/eval_tiny_roma_v1_outdoor.py +84 -0
- vismatch/third_party/RoMa/experiments/roma_indoor.py +320 -0
- vismatch/third_party/RoMa/experiments/train_roma_outdoor.py +307 -0
- vismatch/third_party/RoMa/experiments/train_tiny_roma_v1_outdoor.py +498 -0
- vismatch/third_party/RoMa/romatch/__init__.py +8 -0
- vismatch/third_party/RoMa/romatch/benchmarks/__init__.py +6 -0
- vismatch/third_party/RoMa/romatch/benchmarks/hpatches_sequences_homog_benchmark.py +113 -0
- vismatch/third_party/RoMa/romatch/benchmarks/megadepth_dense_benchmark.py +106 -0
- vismatch/third_party/RoMa/romatch/benchmarks/megadepth_pose_estimation_benchmark.py +118 -0
- vismatch/third_party/RoMa/romatch/benchmarks/megadepth_pose_estimation_benchmark_poselib.py +119 -0
- vismatch/third_party/RoMa/romatch/benchmarks/scannet_benchmark.py +143 -0
- vismatch/third_party/RoMa/romatch/checkpointing/__init__.py +1 -0
- vismatch/third_party/RoMa/romatch/checkpointing/checkpoint.py +60 -0
- vismatch/third_party/RoMa/romatch/datasets/__init__.py +2 -0
- vismatch/third_party/RoMa/romatch/datasets/megadepth.py +232 -0
- vismatch/third_party/RoMa/romatch/datasets/scannet.py +160 -0
- vismatch/third_party/RoMa/romatch/losses/__init__.py +1 -0
- vismatch/third_party/RoMa/romatch/losses/robust_loss.py +161 -0
- vismatch/third_party/RoMa/romatch/losses/robust_loss_tiny_roma.py +160 -0
- vismatch/third_party/RoMa/romatch/models/__init__.py +1 -0
- vismatch/third_party/RoMa/romatch/models/encoders.py +122 -0
- vismatch/third_party/RoMa/romatch/models/matcher.py +748 -0
- vismatch/third_party/RoMa/romatch/models/model_zoo/__init__.py +73 -0
- vismatch/third_party/RoMa/romatch/models/model_zoo/roma_models.py +170 -0
- vismatch/third_party/RoMa/romatch/models/tiny.py +304 -0
- vismatch/third_party/RoMa/romatch/models/transformer/__init__.py +48 -0
- vismatch/third_party/RoMa/romatch/models/transformer/dinov2.py +359 -0
- vismatch/third_party/RoMa/romatch/models/transformer/layers/__init__.py +12 -0
- vismatch/third_party/RoMa/romatch/models/transformer/layers/attention.py +81 -0
- vismatch/third_party/RoMa/romatch/models/transformer/layers/block.py +252 -0
- vismatch/third_party/RoMa/romatch/models/transformer/layers/dino_head.py +59 -0
- vismatch/third_party/RoMa/romatch/models/transformer/layers/drop_path.py +35 -0
- vismatch/third_party/RoMa/romatch/models/transformer/layers/layer_scale.py +28 -0
- vismatch/third_party/RoMa/romatch/models/transformer/layers/mlp.py +41 -0
- vismatch/third_party/RoMa/romatch/models/transformer/layers/patch_embed.py +89 -0
- vismatch/third_party/RoMa/romatch/models/transformer/layers/swiglu_ffn.py +63 -0
- vismatch/third_party/RoMa/romatch/train/__init__.py +1 -0
- vismatch/third_party/RoMa/romatch/train/train.py +102 -0
- vismatch/third_party/RoMa/romatch/utils/__init__.py +16 -0
- vismatch/third_party/RoMa/romatch/utils/kde.py +13 -0
- vismatch/third_party/RoMa/romatch/utils/local_correlation.py +48 -0
- vismatch/third_party/RoMa/romatch/utils/transforms.py +118 -0
- vismatch/third_party/RoMa/romatch/utils/utils.py +654 -0
- vismatch/third_party/RoMa/setup.py +9 -0
- vismatch/third_party/RoMaV2/demo/demo_covariance.py +52 -0
- vismatch/third_party/RoMaV2/demo/demo_match.py +55 -0
- vismatch/third_party/RoMaV2/src/romav2/__init__.py +8 -0
- vismatch/third_party/RoMaV2/src/romav2/benchmarks/__init__.py +4 -0
- vismatch/third_party/RoMaV2/src/romav2/benchmarks/mega1500.py +115 -0
- vismatch/third_party/RoMaV2/src/romav2/benchmarks/satast.py +463 -0
- vismatch/third_party/RoMaV2/src/romav2/benchmarks/scannet1500.py +125 -0
- vismatch/third_party/RoMaV2/src/romav2/benchmarks/wxbs.py +104 -0
- vismatch/third_party/RoMaV2/src/romav2/device.py +9 -0
- vismatch/third_party/RoMaV2/src/romav2/dpt.py +516 -0
- vismatch/third_party/RoMaV2/src/romav2/features.py +190 -0
- vismatch/third_party/RoMaV2/src/romav2/geometry.py +261 -0
- vismatch/third_party/RoMaV2/src/romav2/io.py +24 -0
- vismatch/third_party/RoMaV2/src/romav2/local_correlation.py +152 -0
- vismatch/third_party/RoMaV2/src/romav2/logging.py +97 -0
- vismatch/third_party/RoMaV2/src/romav2/matcher.py +207 -0
- vismatch/third_party/RoMaV2/src/romav2/normalizers.py +17 -0
- vismatch/third_party/RoMaV2/src/romav2/refiner.py +277 -0
- vismatch/third_party/RoMaV2/src/romav2/romav2.py +533 -0
- vismatch/third_party/RoMaV2/src/romav2/types.py +75 -0
- vismatch/third_party/RoMaV2/src/romav2/vis.py +36 -0
- vismatch/third_party/RoMaV2/src/romav2/vit/__init__.py +304 -0
- vismatch/third_party/RoMaV2/src/romav2/vit/attention.py +181 -0
- vismatch/third_party/RoMaV2/src/romav2/vit/block.py +293 -0
- vismatch/third_party/RoMaV2/src/romav2/vit/ffn_layers.py +83 -0
- vismatch/third_party/RoMaV2/src/romav2/vit/layer_scale.py +29 -0
- vismatch/third_party/RoMaV2/src/romav2/vit/patch_embed.py +94 -0
- vismatch/third_party/RoMaV2/src/romav2/vit/rms_norm.py +24 -0
- vismatch/third_party/RoMaV2/src/romav2/vit/rope.py +133 -0
- vismatch/third_party/RoMaV2/src/romav2/vit/rope_mixed.py +111 -0
- vismatch/third_party/RoMaV2/src/romav2/vit/utils.py +48 -0
- vismatch/third_party/RoMaV2/tests/test_bidirectional.py +93 -0
- vismatch/third_party/RoMaV2/tests/test_fps.py +49 -0
- vismatch/third_party/RoMaV2/tests/test_mega1500.py +22 -0
- vismatch/third_party/RoMaV2/tests/test_scannet1500.py +21 -0
- vismatch/third_party/RoMaV2/tests/test_smoke.py +15 -0
- vismatch/third_party/Se2_LoFTR/configs/data/__init__.py +0 -0
- vismatch/third_party/Se2_LoFTR/configs/data/base.py +35 -0
- vismatch/third_party/Se2_LoFTR/configs/data/megadepth_test_1500.py +11 -0
- vismatch/third_party/Se2_LoFTR/configs/data/megadepth_trainval_640.py +22 -0
- vismatch/third_party/Se2_LoFTR/configs/data/megadepth_trainval_840.py +22 -0
- vismatch/third_party/Se2_LoFTR/configs/data/scannet_test_1500.py +11 -0
- vismatch/third_party/Se2_LoFTR/configs/data/scannet_trainval.py +17 -0
- vismatch/third_party/Se2_LoFTR/configs/loftr/indoor/buggy_pos_enc/loftr_ds.py +6 -0
- vismatch/third_party/Se2_LoFTR/configs/loftr/indoor/buggy_pos_enc/loftr_ds_dense.py +8 -0
- vismatch/third_party/Se2_LoFTR/configs/loftr/indoor/buggy_pos_enc/loftr_ot.py +6 -0
- vismatch/third_party/Se2_LoFTR/configs/loftr/indoor/buggy_pos_enc/loftr_ot_dense.py +8 -0
- vismatch/third_party/Se2_LoFTR/configs/loftr/indoor/loftr_ds.py +5 -0
- vismatch/third_party/Se2_LoFTR/configs/loftr/indoor/loftr_ds_dense.py +7 -0
- vismatch/third_party/Se2_LoFTR/configs/loftr/indoor/loftr_ot.py +5 -0
- vismatch/third_party/Se2_LoFTR/configs/loftr/indoor/loftr_ot_dense.py +7 -0
- vismatch/third_party/Se2_LoFTR/configs/loftr/indoor/scannet/loftr_ds_eval.py +16 -0
- vismatch/third_party/Se2_LoFTR/configs/loftr/indoor/scannet/loftr_ds_eval_new.py +18 -0
- vismatch/third_party/Se2_LoFTR/configs/loftr/outdoor/buggy_pos_enc/loftr_ds.py +16 -0
- vismatch/third_party/Se2_LoFTR/configs/loftr/outdoor/buggy_pos_enc/loftr_ds_dense.py +17 -0
- vismatch/third_party/Se2_LoFTR/configs/loftr/outdoor/buggy_pos_enc/loftr_ot.py +16 -0
- vismatch/third_party/Se2_LoFTR/configs/loftr/outdoor/buggy_pos_enc/loftr_ot_dense.py +17 -0
- vismatch/third_party/Se2_LoFTR/configs/loftr/outdoor/loftr_ds.py +17 -0
- vismatch/third_party/Se2_LoFTR/configs/loftr/outdoor/loftr_ds_dense.py +17 -0
- vismatch/third_party/Se2_LoFTR/configs/loftr/outdoor/loftr_ds_e2.py +20 -0
- vismatch/third_party/Se2_LoFTR/configs/loftr/outdoor/loftr_ds_e2_dense.py +23 -0
- vismatch/third_party/Se2_LoFTR/configs/loftr/outdoor/loftr_ds_e2_dense_8rot.py +23 -0
- vismatch/third_party/Se2_LoFTR/configs/loftr/outdoor/loftr_ds_e2_dense_big.py +22 -0
- vismatch/third_party/Se2_LoFTR/configs/loftr/outdoor/loftr_ot.py +17 -0
- vismatch/third_party/Se2_LoFTR/configs/loftr/outdoor/loftr_ot_dense.py +18 -0
- vismatch/third_party/Se2_LoFTR/demo/demo_loftr.py +240 -0
- vismatch/third_party/Se2_LoFTR/src/__init__.py +0 -0
- vismatch/third_party/Se2_LoFTR/src/config/default.py +173 -0
- vismatch/third_party/Se2_LoFTR/src/datasets/megadepth.py +127 -0
- vismatch/third_party/Se2_LoFTR/src/datasets/sampler.py +77 -0
- vismatch/third_party/Se2_LoFTR/src/datasets/scannet.py +114 -0
- vismatch/third_party/Se2_LoFTR/src/lightning/data.py +320 -0
- vismatch/third_party/Se2_LoFTR/src/lightning/lightning_loftr.py +249 -0
- vismatch/third_party/Se2_LoFTR/src/loftr/__init__.py +2 -0
- vismatch/third_party/Se2_LoFTR/src/loftr/backbone/__init__.py +17 -0
- vismatch/third_party/Se2_LoFTR/src/loftr/backbone/resnet_e2.py +170 -0
- vismatch/third_party/Se2_LoFTR/src/loftr/backbone/resnet_fpn.py +199 -0
- vismatch/third_party/Se2_LoFTR/src/loftr/loftr.py +81 -0
- vismatch/third_party/Se2_LoFTR/src/loftr/loftr_module/__init__.py +2 -0
- vismatch/third_party/Se2_LoFTR/src/loftr/loftr_module/fine_preprocess.py +59 -0
- vismatch/third_party/Se2_LoFTR/src/loftr/loftr_module/linear_attention.py +81 -0
- vismatch/third_party/Se2_LoFTR/src/loftr/loftr_module/transformer.py +101 -0
- vismatch/third_party/Se2_LoFTR/src/loftr/utils/coarse_matching.py +261 -0
- vismatch/third_party/Se2_LoFTR/src/loftr/utils/cvpr_ds_config.py +50 -0
- vismatch/third_party/Se2_LoFTR/src/loftr/utils/fine_matching.py +74 -0
- vismatch/third_party/Se2_LoFTR/src/loftr/utils/geometry.py +54 -0
- vismatch/third_party/Se2_LoFTR/src/loftr/utils/position_encoding.py +42 -0
- vismatch/third_party/Se2_LoFTR/src/loftr/utils/supervision.py +151 -0
- vismatch/third_party/Se2_LoFTR/src/losses/loftr_loss.py +192 -0
- vismatch/third_party/Se2_LoFTR/src/optimizers/__init__.py +42 -0
- vismatch/third_party/Se2_LoFTR/src/utils/augment.py +55 -0
- vismatch/third_party/Se2_LoFTR/src/utils/comm.py +265 -0
- vismatch/third_party/Se2_LoFTR/src/utils/dataloader.py +23 -0
- vismatch/third_party/Se2_LoFTR/src/utils/dataset.py +185 -0
- vismatch/third_party/Se2_LoFTR/src/utils/metrics.py +193 -0
- vismatch/third_party/Se2_LoFTR/src/utils/misc.py +104 -0
- vismatch/third_party/Se2_LoFTR/src/utils/plotting.py +154 -0
- vismatch/third_party/Se2_LoFTR/src/utils/profiler.py +39 -0
- vismatch/third_party/Se2_LoFTR/test.py +68 -0
- vismatch/third_party/Se2_LoFTR/train.py +123 -0
- vismatch/third_party/SphereGlue/demo_SphereGlue.py +141 -0
- vismatch/third_party/SphereGlue/model/sphereglue.py +230 -0
- vismatch/third_party/SphereGlue/utils/Utils.py +191 -0
- vismatch/third_party/SphereGlue/utils/demo_mydataset.py +119 -0
- vismatch/third_party/Steerers/rotation_steerers/matchers/dual_softmax_matcher.py +44 -0
- vismatch/third_party/Steerers/rotation_steerers/matchers/max_matches.py +205 -0
- vismatch/third_party/Steerers/rotation_steerers/matchers/max_similarity.py +115 -0
- vismatch/third_party/Steerers/rotation_steerers/steerers.py +37 -0
- vismatch/third_party/Steerers/setup.py +14 -0
- vismatch/third_party/TopicFM/configs/megadepth_test.py +17 -0
- vismatch/third_party/TopicFM/configs/megadepth_test_topicfmfast.py +17 -0
- vismatch/third_party/TopicFM/configs/megadepth_test_topicfmplus.py +20 -0
- vismatch/third_party/TopicFM/configs/megadepth_train.py +36 -0
- vismatch/third_party/TopicFM/configs/megadepth_train_topicfmfast.py +34 -0
- vismatch/third_party/TopicFM/configs/megadepth_train_topicfmplus.py +37 -0
- vismatch/third_party/TopicFM/configs/scannet_test.py +15 -0
- vismatch/third_party/TopicFM/configs/scannet_test_topicfmfast.py +15 -0
- vismatch/third_party/TopicFM/configs/scannet_test_topicfmplus.py +19 -0
- vismatch/third_party/TopicFM/src/__init__.py +11 -0
- vismatch/third_party/TopicFM/src/config/default.py +174 -0
- vismatch/third_party/TopicFM/src/datasets/aachen.py +29 -0
- vismatch/third_party/TopicFM/src/datasets/custom_dataloader.py +126 -0
- vismatch/third_party/TopicFM/src/datasets/inloc.py +29 -0
- vismatch/third_party/TopicFM/src/datasets/megadepth.py +170 -0
- vismatch/third_party/TopicFM/src/datasets/sampler.py +77 -0
- vismatch/third_party/TopicFM/src/datasets/scannet.py +115 -0
- vismatch/third_party/TopicFM/src/lightning_trainer/data.py +292 -0
- vismatch/third_party/TopicFM/src/lightning_trainer/trainer.py +244 -0
- vismatch/third_party/TopicFM/src/losses/loss.py +228 -0
- vismatch/third_party/TopicFM/src/models/__init__.py +1 -0
- vismatch/third_party/TopicFM/src/models/backbone/__init__.py +12 -0
- vismatch/third_party/TopicFM/src/models/backbone/convnext.py +165 -0
- vismatch/third_party/TopicFM/src/models/backbone/fpn.py +114 -0
- vismatch/third_party/TopicFM/src/models/modules/__init__.py +2 -0
- vismatch/third_party/TopicFM/src/models/modules/encoder.py +266 -0
- vismatch/third_party/TopicFM/src/models/modules/fine_preprocess.py +59 -0
- vismatch/third_party/TopicFM/src/models/modules/linear_attention.py +84 -0
- vismatch/third_party/TopicFM/src/models/topic_fm.py +100 -0
- vismatch/third_party/TopicFM/src/models/utils/coarse_matching.py +213 -0
- vismatch/third_party/TopicFM/src/models/utils/fine_matching.py +172 -0
- vismatch/third_party/TopicFM/src/models/utils/geometry.py +54 -0
- vismatch/third_party/TopicFM/src/models/utils/supervision.py +167 -0
- vismatch/third_party/TopicFM/src/optimizers/__init__.py +42 -0
- vismatch/third_party/TopicFM/src/utils/augment.py +55 -0
- vismatch/third_party/TopicFM/src/utils/comm.py +265 -0
- vismatch/third_party/TopicFM/src/utils/dataloader.py +23 -0
- vismatch/third_party/TopicFM/src/utils/dataset.py +206 -0
- vismatch/third_party/TopicFM/src/utils/metrics.py +193 -0
- vismatch/third_party/TopicFM/src/utils/misc.py +101 -0
- vismatch/third_party/TopicFM/src/utils/plotting.py +313 -0
- vismatch/third_party/TopicFM/src/utils/profiler.py +39 -0
- vismatch/third_party/TopicFM/test.py +70 -0
- vismatch/third_party/TopicFM/third_party/__init__.py +0 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/configs/aspan/indoor/aspan_test.py +7 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/configs/aspan/indoor/aspan_train.py +8 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/configs/aspan/outdoor/aspan_test.py +18 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/configs/aspan/outdoor/aspan_train.py +17 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/configs/data/__init__.py +0 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/configs/data/base.py +35 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/configs/data/megadepth_test_1500.py +13 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/configs/data/megadepth_trainval_832.py +22 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/configs/data/scannet_test_1500.py +11 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/configs/data/scannet_trainval.py +17 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/demo/demo.py +63 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/demo/demo_utils.py +44 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/src/ASpanFormer/__init__.py +2 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/src/ASpanFormer/aspan_module/__init__.py +3 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/src/ASpanFormer/aspan_module/attention.py +198 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/src/ASpanFormer/aspan_module/fine_preprocess.py +59 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/src/ASpanFormer/aspan_module/loftr.py +112 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/src/ASpanFormer/aspan_module/transformer.py +244 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/src/ASpanFormer/aspanformer.py +133 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/src/ASpanFormer/backbone/__init__.py +11 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/src/ASpanFormer/backbone/resnet_fpn.py +199 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/src/ASpanFormer/utils/coarse_matching.py +331 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/src/ASpanFormer/utils/cvpr_ds_config.py +50 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/src/ASpanFormer/utils/fine_matching.py +74 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/src/ASpanFormer/utils/geometry.py +54 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/src/ASpanFormer/utils/position_encoding.py +61 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/src/ASpanFormer/utils/supervision.py +151 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/src/__init__.py +0 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/src/config/default.py +180 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/src/datasets/__init__.py +3 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/src/datasets/megadepth.py +127 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/src/datasets/sampler.py +77 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/src/datasets/scannet.py +113 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/src/lightning/data.py +326 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/src/lightning/lightning_aspanformer.py +276 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/src/losses/aspan_loss.py +231 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/src/optimizers/__init__.py +42 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/src/utils/augment.py +55 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/src/utils/comm.py +265 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/src/utils/dataloader.py +23 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/src/utils/dataset.py +222 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/src/utils/metrics.py +260 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/src/utils/misc.py +139 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/src/utils/plotting.py +219 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/src/utils/profiler.py +39 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/test.py +69 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/tools/SensorData.py +125 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/tools/extract.py +47 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/tools/preprocess_scene.py +242 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/tools/reader.py +39 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/tools/undistort_mega.py +69 -0
- vismatch/third_party/TopicFM/third_party/aspanformer/train.py +134 -0
- vismatch/third_party/TopicFM/third_party/loftr/configs/data/__init__.py +0 -0
- vismatch/third_party/TopicFM/third_party/loftr/configs/data/base.py +35 -0
- vismatch/third_party/TopicFM/third_party/loftr/configs/data/megadepth_test_1500.py +11 -0
- vismatch/third_party/TopicFM/third_party/loftr/configs/data/megadepth_trainval_640.py +22 -0
- vismatch/third_party/TopicFM/third_party/loftr/configs/data/megadepth_trainval_840.py +22 -0
- vismatch/third_party/TopicFM/third_party/loftr/configs/data/scannet_test_1500.py +11 -0
- vismatch/third_party/TopicFM/third_party/loftr/configs/data/scannet_trainval.py +17 -0
- vismatch/third_party/TopicFM/third_party/loftr/configs/loftr/indoor/buggy_pos_enc/loftr_ds.py +6 -0
- vismatch/third_party/TopicFM/third_party/loftr/configs/loftr/indoor/buggy_pos_enc/loftr_ds_dense.py +8 -0
- vismatch/third_party/TopicFM/third_party/loftr/configs/loftr/indoor/buggy_pos_enc/loftr_ot.py +6 -0
- vismatch/third_party/TopicFM/third_party/loftr/configs/loftr/indoor/buggy_pos_enc/loftr_ot_dense.py +8 -0
- vismatch/third_party/TopicFM/third_party/loftr/configs/loftr/indoor/loftr_ds.py +5 -0
- vismatch/third_party/TopicFM/third_party/loftr/configs/loftr/indoor/loftr_ds_dense.py +7 -0
- vismatch/third_party/TopicFM/third_party/loftr/configs/loftr/indoor/loftr_ot.py +5 -0
- vismatch/third_party/TopicFM/third_party/loftr/configs/loftr/indoor/loftr_ot_dense.py +7 -0
- vismatch/third_party/TopicFM/third_party/loftr/configs/loftr/indoor/scannet/loftr_ds_eval.py +16 -0
- vismatch/third_party/TopicFM/third_party/loftr/configs/loftr/indoor/scannet/loftr_ds_eval_new.py +18 -0
- vismatch/third_party/TopicFM/third_party/loftr/configs/loftr/outdoor/buggy_pos_enc/loftr_ds.py +16 -0
- vismatch/third_party/TopicFM/third_party/loftr/configs/loftr/outdoor/buggy_pos_enc/loftr_ds_dense.py +17 -0
- vismatch/third_party/TopicFM/third_party/loftr/configs/loftr/outdoor/buggy_pos_enc/loftr_ot.py +16 -0
- vismatch/third_party/TopicFM/third_party/loftr/configs/loftr/outdoor/buggy_pos_enc/loftr_ot_dense.py +17 -0
- vismatch/third_party/TopicFM/third_party/loftr/configs/loftr/outdoor/loftr_ds.py +15 -0
- vismatch/third_party/TopicFM/third_party/loftr/configs/loftr/outdoor/loftr_ds_dense.py +16 -0
- vismatch/third_party/TopicFM/third_party/loftr/configs/loftr/outdoor/loftr_ot.py +15 -0
- vismatch/third_party/TopicFM/third_party/loftr/configs/loftr/outdoor/loftr_ot_dense.py +16 -0
- vismatch/third_party/TopicFM/third_party/loftr/demo/demo_loftr.py +240 -0
- vismatch/third_party/TopicFM/third_party/loftr/src/__init__.py +0 -0
- vismatch/third_party/TopicFM/third_party/loftr/src/config/default.py +171 -0
- vismatch/third_party/TopicFM/third_party/loftr/src/datasets/megadepth.py +127 -0
- vismatch/third_party/TopicFM/third_party/loftr/src/datasets/sampler.py +77 -0
- vismatch/third_party/TopicFM/third_party/loftr/src/datasets/scannet.py +114 -0
- vismatch/third_party/TopicFM/third_party/loftr/src/lightning/data.py +320 -0
- vismatch/third_party/TopicFM/third_party/loftr/src/lightning/lightning_loftr.py +249 -0
- vismatch/third_party/TopicFM/third_party/loftr/src/loftr/__init__.py +2 -0
- vismatch/third_party/TopicFM/third_party/loftr/src/loftr/backbone/__init__.py +11 -0
- vismatch/third_party/TopicFM/third_party/loftr/src/loftr/backbone/resnet_fpn.py +199 -0
- vismatch/third_party/TopicFM/third_party/loftr/src/loftr/loftr.py +81 -0
- vismatch/third_party/TopicFM/third_party/loftr/src/loftr/loftr_module/__init__.py +2 -0
- vismatch/third_party/TopicFM/third_party/loftr/src/loftr/loftr_module/fine_preprocess.py +59 -0
- vismatch/third_party/TopicFM/third_party/loftr/src/loftr/loftr_module/linear_attention.py +81 -0
- vismatch/third_party/TopicFM/third_party/loftr/src/loftr/loftr_module/transformer.py +101 -0
- vismatch/third_party/TopicFM/third_party/loftr/src/loftr/utils/coarse_matching.py +261 -0
- vismatch/third_party/TopicFM/third_party/loftr/src/loftr/utils/cvpr_ds_config.py +50 -0
- vismatch/third_party/TopicFM/third_party/loftr/src/loftr/utils/fine_matching.py +74 -0
- vismatch/third_party/TopicFM/third_party/loftr/src/loftr/utils/geometry.py +54 -0
- vismatch/third_party/TopicFM/third_party/loftr/src/loftr/utils/position_encoding.py +42 -0
- vismatch/third_party/TopicFM/third_party/loftr/src/loftr/utils/supervision.py +151 -0
- vismatch/third_party/TopicFM/third_party/loftr/src/losses/loftr_loss.py +192 -0
- vismatch/third_party/TopicFM/third_party/loftr/src/optimizers/__init__.py +42 -0
- vismatch/third_party/TopicFM/third_party/loftr/src/utils/augment.py +55 -0
- vismatch/third_party/TopicFM/third_party/loftr/src/utils/comm.py +265 -0
- vismatch/third_party/TopicFM/third_party/loftr/src/utils/dataloader.py +23 -0
- vismatch/third_party/TopicFM/third_party/loftr/src/utils/dataset.py +185 -0
- vismatch/third_party/TopicFM/third_party/loftr/src/utils/metrics.py +193 -0
- vismatch/third_party/TopicFM/third_party/loftr/src/utils/misc.py +101 -0
- vismatch/third_party/TopicFM/third_party/loftr/src/utils/plotting.py +154 -0
- vismatch/third_party/TopicFM/third_party/loftr/src/utils/profiler.py +39 -0
- vismatch/third_party/TopicFM/third_party/loftr/test.py +68 -0
- vismatch/third_party/TopicFM/third_party/loftr/third_party/SuperGluePretrainedNetwork/demo_superglue.py +259 -0
- vismatch/third_party/TopicFM/third_party/loftr/third_party/SuperGluePretrainedNetwork/match_pairs.py +425 -0
- vismatch/third_party/TopicFM/third_party/loftr/third_party/SuperGluePretrainedNetwork/models/__init__.py +0 -0
- vismatch/third_party/TopicFM/third_party/loftr/third_party/SuperGluePretrainedNetwork/models/matching.py +84 -0
- vismatch/third_party/TopicFM/third_party/loftr/third_party/SuperGluePretrainedNetwork/models/superglue.py +283 -0
- vismatch/third_party/TopicFM/third_party/loftr/third_party/SuperGluePretrainedNetwork/models/superpoint.py +202 -0
- vismatch/third_party/TopicFM/third_party/loftr/third_party/SuperGluePretrainedNetwork/models/utils.py +555 -0
- vismatch/third_party/TopicFM/third_party/loftr/train.py +123 -0
- vismatch/third_party/TopicFM/third_party/matchformer/config/data/__init__.py +0 -0
- vismatch/third_party/TopicFM/third_party/matchformer/config/data/base.py +35 -0
- vismatch/third_party/TopicFM/third_party/matchformer/config/data/megadepth_test_1500.py +11 -0
- vismatch/third_party/TopicFM/third_party/matchformer/config/data/scannet_test_1500.py +11 -0
- vismatch/third_party/TopicFM/third_party/matchformer/config/defaultmf.py +88 -0
- vismatch/third_party/TopicFM/third_party/matchformer/model/backbone/__init__.py +17 -0
- vismatch/third_party/TopicFM/third_party/matchformer/model/backbone/coarse_matching.py +228 -0
- vismatch/third_party/TopicFM/third_party/matchformer/model/backbone/fine_matching.py +74 -0
- vismatch/third_party/TopicFM/third_party/matchformer/model/backbone/fine_preprocess.py +59 -0
- vismatch/third_party/TopicFM/third_party/matchformer/model/backbone/match_LA_large.py +254 -0
- vismatch/third_party/TopicFM/third_party/matchformer/model/backbone/match_LA_lite.py +254 -0
- vismatch/third_party/TopicFM/third_party/matchformer/model/backbone/match_SEA_large.py +291 -0
- vismatch/third_party/TopicFM/third_party/matchformer/model/backbone/match_SEA_lite.py +291 -0
- vismatch/third_party/TopicFM/third_party/matchformer/model/data.py +320 -0
- vismatch/third_party/TopicFM/third_party/matchformer/model/datasets/dataset.py +231 -0
- vismatch/third_party/TopicFM/third_party/matchformer/model/datasets/megadepth.py +126 -0
- vismatch/third_party/TopicFM/third_party/matchformer/model/datasets/sampler.py +77 -0
- vismatch/third_party/TopicFM/third_party/matchformer/model/datasets/scannet.py +113 -0
- vismatch/third_party/TopicFM/third_party/matchformer/model/lightning_loftr.py +102 -0
- vismatch/third_party/TopicFM/third_party/matchformer/model/matchformer.py +54 -0
- vismatch/third_party/TopicFM/third_party/matchformer/model/utils/augment.py +55 -0
- vismatch/third_party/TopicFM/third_party/matchformer/model/utils/comm.py +265 -0
- vismatch/third_party/TopicFM/third_party/matchformer/model/utils/dataloader.py +23 -0
- vismatch/third_party/TopicFM/third_party/matchformer/model/utils/metrics.py +193 -0
- vismatch/third_party/TopicFM/third_party/matchformer/model/utils/misc.py +101 -0
- vismatch/third_party/TopicFM/third_party/matchformer/model/utils/profiler.py +39 -0
- vismatch/third_party/TopicFM/third_party/matchformer/test.py +55 -0
- vismatch/third_party/TopicFM/train.py +123 -0
- vismatch/third_party/TopicFM/visualization.py +123 -0
- vismatch/third_party/TopicFM/viz/__init__.py +1 -0
- vismatch/third_party/TopicFM/viz/configs/__init__.py +0 -0
- vismatch/third_party/TopicFM/viz/methods/__init__.py +0 -0
- vismatch/third_party/TopicFM/viz/methods/base.py +70 -0
- vismatch/third_party/TopicFM/viz/methods/topicfmv2.py +208 -0
- vismatch/third_party/UFM/UniCeption/examples/models/cosmos/autoencoding.py +48 -0
- vismatch/third_party/UFM/UniCeption/examples/models/dust3r/convert_dust3r_weights_to_uniception.py +331 -0
- vismatch/third_party/UFM/UniCeption/examples/models/dust3r/dust3r.py +261 -0
- vismatch/third_party/UFM/UniCeption/examples/models/dust3r/profile_dust3r.py +47 -0
- vismatch/third_party/UFM/UniCeption/scripts/check_dependencies.py +48 -0
- vismatch/third_party/UFM/UniCeption/scripts/download_checkpoints.py +50 -0
- vismatch/third_party/UFM/UniCeption/scripts/install_croco_rope.py +61 -0
- vismatch/third_party/UFM/UniCeption/scripts/prepare_offline_install.py +398 -0
- vismatch/third_party/UFM/UniCeption/scripts/validate_installation.py +212 -0
- vismatch/third_party/UFM/UniCeption/setup.py +185 -0
- vismatch/third_party/UFM/UniCeption/tests/models/encoders/conftest.py +26 -0
- vismatch/third_party/UFM/UniCeption/tests/models/encoders/test_encoders.py +202 -0
- vismatch/third_party/UFM/UniCeption/tests/models/encoders/viz_image_encoders.py +294 -0
- vismatch/third_party/UFM/UniCeption/tests/models/info_sharing/viz_mulit_view_cross_attn_transformers.py +337 -0
- vismatch/third_party/UFM/UniCeption/uniception/__init__.py +0 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/__init__.py +0 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/encoders/__init__.py +225 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/encoders/base.py +157 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/encoders/cosmos.py +137 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/encoders/croco.py +457 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/encoders/dense_rep_encoder.py +344 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/encoders/dinov2.py +333 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/encoders/global_rep_encoder.py +115 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/encoders/image_normalizations.py +35 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/encoders/list.py +10 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/encoders/patch_embedder.py +235 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/encoders/radio.py +367 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/encoders/utils.py +86 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/factory/__init__.py +3 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/factory/dust3r.py +332 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/info_sharing/__init__.py +39 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/info_sharing/alternating_attention_transformer.py +973 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/info_sharing/base.py +116 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/info_sharing/cross_attention_transformer.py +612 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/info_sharing/diff_cross_attention_transformer.py +588 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/info_sharing/global_attention_transformer.py +1154 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/libs/__init__.py +0 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/libs/cosmos_tokenizer/__init__.py +14 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/libs/cosmos_tokenizer/image_cli.py +175 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/libs/cosmos_tokenizer/image_lib.py +123 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/libs/cosmos_tokenizer/modules/__init__.py +60 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/libs/cosmos_tokenizer/modules/distributions.py +41 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/libs/cosmos_tokenizer/modules/layers2d.py +326 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/libs/cosmos_tokenizer/modules/layers3d.py +965 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/libs/cosmos_tokenizer/modules/patching.py +310 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/libs/cosmos_tokenizer/modules/quantizers.py +510 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/libs/cosmos_tokenizer/modules/utils.py +115 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/libs/cosmos_tokenizer/networks/__init__.py +39 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/libs/cosmos_tokenizer/networks/configs.py +146 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/libs/cosmos_tokenizer/networks/continuous_image.py +86 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/libs/cosmos_tokenizer/networks/continuous_video.py +98 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/libs/cosmos_tokenizer/networks/discrete_image.py +113 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/libs/cosmos_tokenizer/networks/discrete_video.py +115 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/libs/cosmos_tokenizer/utils.py +402 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/libs/cosmos_tokenizer/video_cli.py +195 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/libs/cosmos_tokenizer/video_lib.py +145 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/libs/croco/__init__.py +0 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/libs/croco/blocks.py +249 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/libs/croco/curope/__init__.py +4 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/libs/croco/curope/curope2d.py +39 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/libs/croco/curope/setup.py +33 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/libs/croco/dpt_block.py +530 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/libs/croco/patch_embed.py +127 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/libs/croco/pos_embed.py +155 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/prediction_heads/__init__.py +18 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/prediction_heads/adaptors.py +1765 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/prediction_heads/base.py +210 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/prediction_heads/cosmos.py +211 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/prediction_heads/dpt.py +676 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/prediction_heads/global_head.py +142 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/prediction_heads/linear.py +95 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/prediction_heads/mlp_feature.py +114 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/prediction_heads/mlp_head.py +114 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/prediction_heads/moge_conv.py +342 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/prediction_heads/pose_head.py +181 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/utils/__init__.py +0 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/utils/config.py +34 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/utils/intermediate_feature_return.py +85 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/utils/positional_encoding.py +23 -0
- vismatch/third_party/UFM/UniCeption/uniception/models/utils/transformer_blocks.py +1072 -0
- vismatch/third_party/UFM/UniCeption/uniception/utils/__init__.py +0 -0
- vismatch/third_party/UFM/UniCeption/uniception/utils/profile.py +13 -0
- vismatch/third_party/UFM/UniCeption/uniception/utils/viz.py +99 -0
- vismatch/third_party/UFM/example_inference.py +138 -0
- vismatch/third_party/UFM/gradio_demo.py +238 -0
- vismatch/third_party/UFM/setup.py +86 -0
- vismatch/third_party/UFM/uniflowmatch/__init__.py +16 -0
- vismatch/third_party/UFM/uniflowmatch/cli.py +217 -0
- vismatch/third_party/UFM/uniflowmatch/models/__init__.py +25 -0
- vismatch/third_party/UFM/uniflowmatch/models/base.py +334 -0
- vismatch/third_party/UFM/uniflowmatch/models/ufm.py +1323 -0
- vismatch/third_party/UFM/uniflowmatch/models/unet_encoder.py +90 -0
- vismatch/third_party/UFM/uniflowmatch/models/utils.py +16 -0
- vismatch/third_party/UFM/uniflowmatch/utils/__init__.py +63 -0
- vismatch/third_party/UFM/uniflowmatch/utils/flow_resizing.py +1091 -0
- vismatch/third_party/UFM/uniflowmatch/utils/geometry.py +612 -0
- vismatch/third_party/UFM/uniflowmatch/utils/viz.py +97 -0
- vismatch/third_party/XoFTR/configs/data/__init__.py +0 -0
- vismatch/third_party/XoFTR/configs/data/base.py +35 -0
- vismatch/third_party/XoFTR/configs/data/megadepth_trainval_840.py +22 -0
- vismatch/third_party/XoFTR/configs/data/megadepth_vistir_trainval_640.py +23 -0
- vismatch/third_party/XoFTR/configs/data/pretrain.py +8 -0
- vismatch/third_party/XoFTR/configs/xoftr/outdoor/visible_thermal.py +17 -0
- vismatch/third_party/XoFTR/configs/xoftr/pretrain/pretrain.py +12 -0
- vismatch/third_party/XoFTR/pretrain.py +125 -0
- vismatch/third_party/XoFTR/src/__init__.py +0 -0
- vismatch/third_party/XoFTR/src/config/default.py +203 -0
- vismatch/third_party/XoFTR/src/datasets/megadepth.py +143 -0
- vismatch/third_party/XoFTR/src/datasets/pretrain_dataset.py +156 -0
- vismatch/third_party/XoFTR/src/datasets/sampler.py +77 -0
- vismatch/third_party/XoFTR/src/datasets/scannet.py +114 -0
- vismatch/third_party/XoFTR/src/datasets/vistir.py +109 -0
- vismatch/third_party/XoFTR/src/lightning/data.py +346 -0
- vismatch/third_party/XoFTR/src/lightning/data_pretrain.py +125 -0
- vismatch/third_party/XoFTR/src/lightning/lightning_xoftr.py +334 -0
- vismatch/third_party/XoFTR/src/lightning/lightning_xoftr_pretrain.py +171 -0
- vismatch/third_party/XoFTR/src/losses/xoftr_loss.py +170 -0
- vismatch/third_party/XoFTR/src/losses/xoftr_loss_pretrain.py +37 -0
- vismatch/third_party/XoFTR/src/optimizers/__init__.py +42 -0
- vismatch/third_party/XoFTR/src/utils/augment.py +113 -0
- vismatch/third_party/XoFTR/src/utils/comm.py +265 -0
- vismatch/third_party/XoFTR/src/utils/data_io.py +144 -0
- vismatch/third_party/XoFTR/src/utils/dataloader.py +23 -0
- vismatch/third_party/XoFTR/src/utils/dataset.py +279 -0
- vismatch/third_party/XoFTR/src/utils/metrics.py +211 -0
- vismatch/third_party/XoFTR/src/utils/misc.py +101 -0
- vismatch/third_party/XoFTR/src/utils/plotting.py +227 -0
- vismatch/third_party/XoFTR/src/utils/pretrain_utils.py +83 -0
- vismatch/third_party/XoFTR/src/utils/profiler.py +39 -0
- vismatch/third_party/XoFTR/src/xoftr/__init__.py +2 -0
- vismatch/third_party/XoFTR/src/xoftr/backbone/__init__.py +1 -0
- vismatch/third_party/XoFTR/src/xoftr/backbone/resnet.py +95 -0
- vismatch/third_party/XoFTR/src/xoftr/utils/geometry.py +107 -0
- vismatch/third_party/XoFTR/src/xoftr/utils/position_encoding.py +36 -0
- vismatch/third_party/XoFTR/src/xoftr/utils/supervision.py +290 -0
- vismatch/third_party/XoFTR/src/xoftr/xoftr.py +94 -0
- vismatch/third_party/XoFTR/src/xoftr/xoftr_module/__init__.py +4 -0
- vismatch/third_party/XoFTR/src/xoftr/xoftr_module/coarse_matching.py +305 -0
- vismatch/third_party/XoFTR/src/xoftr/xoftr_module/fine_matching.py +170 -0
- vismatch/third_party/XoFTR/src/xoftr/xoftr_module/fine_process.py +321 -0
- vismatch/third_party/XoFTR/src/xoftr/xoftr_module/linear_attention.py +81 -0
- vismatch/third_party/XoFTR/src/xoftr/xoftr_module/transformer.py +101 -0
- vismatch/third_party/XoFTR/src/xoftr/xoftr_pretrain.py +209 -0
- vismatch/third_party/XoFTR/test.py +68 -0
- vismatch/third_party/XoFTR/test_relative_pose.py +330 -0
- vismatch/third_party/XoFTR/train.py +126 -0
- vismatch/third_party/accelerated_features/hubconf.py +15 -0
- vismatch/third_party/accelerated_features/minimal_example.py +49 -0
- vismatch/third_party/accelerated_features/modules/__init__.py +4 -0
- vismatch/third_party/accelerated_features/modules/dataset/__init__.py +5 -0
- vismatch/third_party/accelerated_features/modules/dataset/augmentation.py +314 -0
- vismatch/third_party/accelerated_features/modules/dataset/megadepth/__init__.py +7 -0
- vismatch/third_party/accelerated_features/modules/dataset/megadepth/megadepth.py +174 -0
- vismatch/third_party/accelerated_features/modules/dataset/megadepth/megadepth_warper.py +170 -0
- vismatch/third_party/accelerated_features/modules/dataset/megadepth/utils.py +160 -0
- vismatch/third_party/accelerated_features/modules/interpolator.py +33 -0
- vismatch/third_party/accelerated_features/modules/lighterglue.py +56 -0
- vismatch/third_party/accelerated_features/modules/model.py +154 -0
- vismatch/third_party/accelerated_features/modules/training/__init__.py +4 -0
- vismatch/third_party/accelerated_features/modules/training/losses.py +224 -0
- vismatch/third_party/accelerated_features/modules/training/train.py +311 -0
- vismatch/third_party/accelerated_features/modules/training/utils.py +200 -0
- vismatch/third_party/accelerated_features/modules/xfeat.py +402 -0
- vismatch/third_party/accelerated_features/realtime_demo.py +295 -0
- vismatch/third_party/accelerated_features/third_party/ALIKE/alike.py +143 -0
- vismatch/third_party/accelerated_features/third_party/ALIKE/alnet.py +164 -0
- vismatch/third_party/accelerated_features/third_party/ALIKE/demo.py +167 -0
- vismatch/third_party/accelerated_features/third_party/ALIKE/hseq/eval.py +162 -0
- vismatch/third_party/accelerated_features/third_party/ALIKE/hseq/extract.py +159 -0
- vismatch/third_party/accelerated_features/third_party/ALIKE/soft_detect.py +194 -0
- vismatch/third_party/accelerated_features/third_party/__init__.py +4 -0
- vismatch/third_party/accelerated_features/third_party/alike_wrapper.py +110 -0
- vismatch/third_party/affine-steerers/affine_steerers/__init__.py +7 -0
- vismatch/third_party/affine-steerers/affine_steerers/benchmarks/__init__.py +5 -0
- vismatch/third_party/affine-steerers/affine_steerers/benchmarks/hpatches.py +92 -0
- vismatch/third_party/affine-steerers/affine_steerers/benchmarks/hpatches_oracle_steer.py +108 -0
- vismatch/third_party/affine-steerers/affine_steerers/benchmarks/mega_pose_est.py +116 -0
- vismatch/third_party/affine-steerers/affine_steerers/benchmarks/mega_pose_est_mnn.py +162 -0
- vismatch/third_party/affine-steerers/affine_steerers/benchmarks/nll_benchmark.py +57 -0
- vismatch/third_party/affine-steerers/affine_steerers/benchmarks/num_inliers.py +76 -0
- vismatch/third_party/affine-steerers/affine_steerers/checkpoint.py +82 -0
- vismatch/third_party/affine-steerers/affine_steerers/datasets/__init__.py +0 -0
- vismatch/third_party/affine-steerers/affine_steerers/datasets/homog.py +284 -0
- vismatch/third_party/affine-steerers/affine_steerers/datasets/megadepth.py +408 -0
- vismatch/third_party/affine-steerers/affine_steerers/decoder.py +90 -0
- vismatch/third_party/affine-steerers/affine_steerers/descriptors/__init__.py +0 -0
- vismatch/third_party/affine-steerers/affine_steerers/descriptors/dedode_descriptor.py +77 -0
- vismatch/third_party/affine-steerers/affine_steerers/descriptors/descriptor_loss.py +358 -0
- vismatch/third_party/affine-steerers/affine_steerers/detectors/__init__.py +0 -0
- vismatch/third_party/affine-steerers/affine_steerers/detectors/dedode_detector.py +75 -0
- vismatch/third_party/affine-steerers/affine_steerers/detectors/keypoint_loss.py +215 -0
- vismatch/third_party/affine-steerers/affine_steerers/encoder.py +87 -0
- vismatch/third_party/affine-steerers/affine_steerers/matchers/__init__.py +0 -0
- vismatch/third_party/affine-steerers/affine_steerers/matchers/dual_softmax_matcher.py +816 -0
- vismatch/third_party/affine-steerers/affine_steerers/model_zoo/__init__.py +3 -0
- vismatch/third_party/affine-steerers/affine_steerers/model_zoo/dedode_models.py +298 -0
- vismatch/third_party/affine-steerers/affine_steerers/steerers.py +732 -0
- vismatch/third_party/affine-steerers/affine_steerers/train.py +90 -0
- vismatch/third_party/affine-steerers/affine_steerers/transformer/__init__.py +8 -0
- vismatch/third_party/affine-steerers/affine_steerers/transformer/dinov2.py +359 -0
- vismatch/third_party/affine-steerers/affine_steerers/transformer/layers/__init__.py +12 -0
- vismatch/third_party/affine-steerers/affine_steerers/transformer/layers/attention.py +81 -0
- vismatch/third_party/affine-steerers/affine_steerers/transformer/layers/block.py +252 -0
- vismatch/third_party/affine-steerers/affine_steerers/transformer/layers/dino_head.py +59 -0
- vismatch/third_party/affine-steerers/affine_steerers/transformer/layers/drop_path.py +35 -0
- vismatch/third_party/affine-steerers/affine_steerers/transformer/layers/layer_scale.py +28 -0
- vismatch/third_party/affine-steerers/affine_steerers/transformer/layers/mlp.py +41 -0
- vismatch/third_party/affine-steerers/affine_steerers/transformer/layers/patch_embed.py +89 -0
- vismatch/third_party/affine-steerers/affine_steerers/transformer/layers/swiglu_ffn.py +63 -0
- vismatch/third_party/affine-steerers/affine_steerers/utils.py +1422 -0
- vismatch/third_party/affine-steerers/experiments/aff_equi_B.py +182 -0
- vismatch/third_party/affine-steerers/experiments/aff_equi_G.py +193 -0
- vismatch/third_party/affine-steerers/experiments/aff_steer_B.py +213 -0
- vismatch/third_party/affine-steerers/experiments/aff_steer_G.py +223 -0
- vismatch/third_party/affine-steerers/experiments/aff_steer_pretrain_B.py +187 -0
- vismatch/third_party/affine-steerers/experiments/aff_steer_pretrain_G.py +198 -0
- vismatch/third_party/affine-steerers/setup.py +15 -0
- vismatch/third_party/aspanformer/configs/aspan/indoor/aspan_test.py +7 -0
- vismatch/third_party/aspanformer/configs/aspan/indoor/aspan_train.py +8 -0
- vismatch/third_party/aspanformer/configs/aspan/outdoor/aspan_test.py +19 -0
- vismatch/third_party/aspanformer/configs/aspan/outdoor/aspan_train.py +17 -0
- vismatch/third_party/aspanformer/configs/data/__init__.py +0 -0
- vismatch/third_party/aspanformer/configs/data/base.py +35 -0
- vismatch/third_party/aspanformer/configs/data/megadepth_test_1500.py +13 -0
- vismatch/third_party/aspanformer/configs/data/megadepth_trainval_832.py +22 -0
- vismatch/third_party/aspanformer/configs/data/scannet_test_1500.py +11 -0
- vismatch/third_party/aspanformer/configs/data/scannet_trainval.py +17 -0
- vismatch/third_party/aspanformer/demo/demo.py +63 -0
- vismatch/third_party/aspanformer/demo/demo_utils.py +44 -0
- vismatch/third_party/aspanformer/src/ASpanFormer/__init__.py +2 -0
- vismatch/third_party/aspanformer/src/ASpanFormer/aspan_module/__init__.py +3 -0
- vismatch/third_party/aspanformer/src/ASpanFormer/aspan_module/attention.py +198 -0
- vismatch/third_party/aspanformer/src/ASpanFormer/aspan_module/fine_preprocess.py +59 -0
- vismatch/third_party/aspanformer/src/ASpanFormer/aspan_module/loftr.py +112 -0
- vismatch/third_party/aspanformer/src/ASpanFormer/aspan_module/transformer.py +244 -0
- vismatch/third_party/aspanformer/src/ASpanFormer/aspanformer.py +152 -0
- vismatch/third_party/aspanformer/src/ASpanFormer/backbone/__init__.py +11 -0
- vismatch/third_party/aspanformer/src/ASpanFormer/backbone/resnet_fpn.py +199 -0
- vismatch/third_party/aspanformer/src/ASpanFormer/utils/coarse_matching.py +331 -0
- vismatch/third_party/aspanformer/src/ASpanFormer/utils/cvpr_ds_config.py +50 -0
- vismatch/third_party/aspanformer/src/ASpanFormer/utils/fine_matching.py +74 -0
- vismatch/third_party/aspanformer/src/ASpanFormer/utils/geometry.py +54 -0
- vismatch/third_party/aspanformer/src/ASpanFormer/utils/position_encoding.py +61 -0
- vismatch/third_party/aspanformer/src/ASpanFormer/utils/supervision.py +151 -0
- vismatch/third_party/aspanformer/src/__init__.py +0 -0
- vismatch/third_party/aspanformer/src/config/default.py +180 -0
- vismatch/third_party/aspanformer/src/datasets/__init__.py +3 -0
- vismatch/third_party/aspanformer/src/datasets/megadepth.py +127 -0
- vismatch/third_party/aspanformer/src/datasets/sampler.py +77 -0
- vismatch/third_party/aspanformer/src/datasets/scannet.py +113 -0
- vismatch/third_party/aspanformer/src/lightning/data.py +326 -0
- vismatch/third_party/aspanformer/src/lightning/lightning_aspanformer.py +276 -0
- vismatch/third_party/aspanformer/src/losses/aspan_loss.py +231 -0
- vismatch/third_party/aspanformer/src/optimizers/__init__.py +42 -0
- vismatch/third_party/aspanformer/src/utils/augment.py +55 -0
- vismatch/third_party/aspanformer/src/utils/comm.py +265 -0
- vismatch/third_party/aspanformer/src/utils/dataloader.py +23 -0
- vismatch/third_party/aspanformer/src/utils/dataset.py +222 -0
- vismatch/third_party/aspanformer/src/utils/metrics.py +260 -0
- vismatch/third_party/aspanformer/src/utils/misc.py +139 -0
- vismatch/third_party/aspanformer/src/utils/plotting.py +219 -0
- vismatch/third_party/aspanformer/src/utils/profiler.py +39 -0
- vismatch/third_party/aspanformer/test.py +69 -0
- vismatch/third_party/aspanformer/tools/SensorData.py +125 -0
- vismatch/third_party/aspanformer/tools/extract.py +47 -0
- vismatch/third_party/aspanformer/tools/preprocess_scene.py +242 -0
- vismatch/third_party/aspanformer/tools/reader.py +39 -0
- vismatch/third_party/aspanformer/tools/undistort_mega.py +69 -0
- vismatch/third_party/aspanformer/train.py +134 -0
- vismatch/third_party/duster/croco/datasets/__init__.py +0 -0
- vismatch/third_party/duster/croco/datasets/crops/extract_crops_from_images.py +159 -0
- vismatch/third_party/duster/croco/datasets/habitat_sim/__init__.py +0 -0
- vismatch/third_party/duster/croco/datasets/habitat_sim/generate_from_metadata.py +92 -0
- vismatch/third_party/duster/croco/datasets/habitat_sim/generate_from_metadata_files.py +27 -0
- vismatch/third_party/duster/croco/datasets/habitat_sim/generate_multiview_images.py +177 -0
- vismatch/third_party/duster/croco/datasets/habitat_sim/multiview_habitat_sim_generator.py +390 -0
- vismatch/third_party/duster/croco/datasets/habitat_sim/pack_metadata_files.py +69 -0
- vismatch/third_party/duster/croco/datasets/habitat_sim/paths.py +129 -0
- vismatch/third_party/duster/croco/datasets/pairs_dataset.py +109 -0
- vismatch/third_party/duster/croco/datasets/transforms.py +95 -0
- vismatch/third_party/duster/croco/demo.py +55 -0
- vismatch/third_party/duster/croco/models/blocks.py +241 -0
- vismatch/third_party/duster/croco/models/criterion.py +37 -0
- vismatch/third_party/duster/croco/models/croco.py +249 -0
- vismatch/third_party/duster/croco/models/croco_downstream.py +122 -0
- vismatch/third_party/duster/croco/models/curope/__init__.py +4 -0
- vismatch/third_party/duster/croco/models/curope/curope2d.py +40 -0
- vismatch/third_party/duster/croco/models/curope/setup.py +34 -0
- vismatch/third_party/duster/croco/models/dpt_block.py +450 -0
- vismatch/third_party/duster/croco/models/head_downstream.py +58 -0
- vismatch/third_party/duster/croco/models/masking.py +25 -0
- vismatch/third_party/duster/croco/models/pos_embed.py +157 -0
- vismatch/third_party/duster/croco/pretrain.py +254 -0
- vismatch/third_party/duster/croco/stereoflow/augmentor.py +290 -0
- vismatch/third_party/duster/croco/stereoflow/criterion.py +251 -0
- vismatch/third_party/duster/croco/stereoflow/datasets_flow.py +630 -0
- vismatch/third_party/duster/croco/stereoflow/datasets_stereo.py +674 -0
- vismatch/third_party/duster/croco/stereoflow/engine.py +280 -0
- vismatch/third_party/duster/croco/stereoflow/test.py +216 -0
- vismatch/third_party/duster/croco/stereoflow/train.py +253 -0
- vismatch/third_party/duster/croco/utils/misc.py +463 -0
- vismatch/third_party/duster/datasets_preprocess/habitat/find_scenes.py +78 -0
- vismatch/third_party/duster/datasets_preprocess/habitat/habitat_renderer/__init__.py +2 -0
- vismatch/third_party/duster/datasets_preprocess/habitat/habitat_renderer/habitat_sim_envmaps_renderer.py +170 -0
- vismatch/third_party/duster/datasets_preprocess/habitat/habitat_renderer/multiview_crop_generator.py +93 -0
- vismatch/third_party/duster/datasets_preprocess/habitat/habitat_renderer/projections.py +151 -0
- vismatch/third_party/duster/datasets_preprocess/habitat/habitat_renderer/projections_conversions.py +45 -0
- vismatch/third_party/duster/datasets_preprocess/habitat/preprocess_habitat.py +121 -0
- vismatch/third_party/duster/datasets_preprocess/path_to_root.py +13 -0
- vismatch/third_party/duster/datasets_preprocess/preprocess_arkitscenes.py +355 -0
- vismatch/third_party/duster/datasets_preprocess/preprocess_blendedMVS.py +149 -0
- vismatch/third_party/duster/datasets_preprocess/preprocess_co3d.py +295 -0
- vismatch/third_party/duster/datasets_preprocess/preprocess_megadepth.py +198 -0
- vismatch/third_party/duster/datasets_preprocess/preprocess_scannetpp.py +400 -0
- vismatch/third_party/duster/datasets_preprocess/preprocess_staticthings3d.py +130 -0
- vismatch/third_party/duster/datasets_preprocess/preprocess_waymo.py +257 -0
- vismatch/third_party/duster/datasets_preprocess/preprocess_wildrgbd.py +209 -0
- vismatch/third_party/duster/demo.py +45 -0
- vismatch/third_party/duster/dust3r/__init__.py +2 -0
- vismatch/third_party/duster/dust3r/cloud_opt/__init__.py +33 -0
- vismatch/third_party/duster/dust3r/cloud_opt/base_opt.py +405 -0
- vismatch/third_party/duster/dust3r/cloud_opt/commons.py +90 -0
- vismatch/third_party/duster/dust3r/cloud_opt/init_im_poses.py +316 -0
- vismatch/third_party/duster/dust3r/cloud_opt/modular_optimizer.py +145 -0
- vismatch/third_party/duster/dust3r/cloud_opt/optimizer.py +248 -0
- vismatch/third_party/duster/dust3r/cloud_opt/pair_viewer.py +127 -0
- vismatch/third_party/duster/dust3r/datasets/__init__.py +50 -0
- vismatch/third_party/duster/dust3r/datasets/arkitscenes.py +102 -0
- vismatch/third_party/duster/dust3r/datasets/base/__init__.py +2 -0
- vismatch/third_party/duster/dust3r/datasets/base/base_stereo_view_dataset.py +220 -0
- vismatch/third_party/duster/dust3r/datasets/base/batched_sampler.py +74 -0
- vismatch/third_party/duster/dust3r/datasets/base/easy_dataset.py +157 -0
- vismatch/third_party/duster/dust3r/datasets/blendedmvs.py +104 -0
- vismatch/third_party/duster/dust3r/datasets/co3d.py +165 -0
- vismatch/third_party/duster/dust3r/datasets/habitat.py +107 -0
- vismatch/third_party/duster/dust3r/datasets/megadepth.py +123 -0
- vismatch/third_party/duster/dust3r/datasets/scannetpp.py +96 -0
- vismatch/third_party/duster/dust3r/datasets/staticthings3d.py +96 -0
- vismatch/third_party/duster/dust3r/datasets/utils/__init__.py +2 -0
- vismatch/third_party/duster/dust3r/datasets/utils/cropping.py +124 -0
- vismatch/third_party/duster/dust3r/datasets/utils/transforms.py +11 -0
- vismatch/third_party/duster/dust3r/datasets/waymo.py +93 -0
- vismatch/third_party/duster/dust3r/datasets/wildrgbd.py +67 -0
- vismatch/third_party/duster/dust3r/demo.py +287 -0
- vismatch/third_party/duster/dust3r/heads/__init__.py +19 -0
- vismatch/third_party/duster/dust3r/heads/dpt_head.py +115 -0
- vismatch/third_party/duster/dust3r/heads/linear_head.py +41 -0
- vismatch/third_party/duster/dust3r/heads/postprocess.py +58 -0
- vismatch/third_party/duster/dust3r/image_pairs.py +104 -0
- vismatch/third_party/duster/dust3r/inference.py +150 -0
- vismatch/third_party/duster/dust3r/losses.py +299 -0
- vismatch/third_party/duster/dust3r/model.py +211 -0
- vismatch/third_party/duster/dust3r/optim_factory.py +14 -0
- vismatch/third_party/duster/dust3r/patch_embed.py +70 -0
- vismatch/third_party/duster/dust3r/post_process.py +60 -0
- vismatch/third_party/duster/dust3r/training.py +377 -0
- vismatch/third_party/duster/dust3r/utils/__init__.py +2 -0
- vismatch/third_party/duster/dust3r/utils/device.py +76 -0
- vismatch/third_party/duster/dust3r/utils/geometry.py +366 -0
- vismatch/third_party/duster/dust3r/utils/image.py +128 -0
- vismatch/third_party/duster/dust3r/utils/misc.py +121 -0
- vismatch/third_party/duster/dust3r/utils/parallel.py +79 -0
- vismatch/third_party/duster/dust3r/utils/path_to_croco.py +19 -0
- vismatch/third_party/duster/dust3r/viz.py +381 -0
- vismatch/third_party/duster/dust3r_visloc/__init__.py +2 -0
- vismatch/third_party/duster/dust3r_visloc/datasets/__init__.py +6 -0
- vismatch/third_party/duster/dust3r_visloc/datasets/aachen_day_night.py +24 -0
- vismatch/third_party/duster/dust3r_visloc/datasets/base_colmap.py +282 -0
- vismatch/third_party/duster/dust3r_visloc/datasets/base_dataset.py +19 -0
- vismatch/third_party/duster/dust3r_visloc/datasets/cambridge_landmarks.py +19 -0
- vismatch/third_party/duster/dust3r_visloc/datasets/inloc.py +167 -0
- vismatch/third_party/duster/dust3r_visloc/datasets/sevenscenes.py +123 -0
- vismatch/third_party/duster/dust3r_visloc/datasets/utils.py +118 -0
- vismatch/third_party/duster/dust3r_visloc/evaluation.py +65 -0
- vismatch/third_party/duster/dust3r_visloc/localization.py +140 -0
- vismatch/third_party/duster/train.py +13 -0
- vismatch/third_party/duster/visloc.py +193 -0
- vismatch/third_party/gim/demo.py +479 -0
- vismatch/third_party/gim/dkm/__init__.py +4 -0
- vismatch/third_party/gim/dkm/benchmarks/__init__.py +4 -0
- vismatch/third_party/gim/dkm/benchmarks/hpatches_sequences_homog_benchmark.py +114 -0
- vismatch/third_party/gim/dkm/benchmarks/megadepth1500_benchmark.py +124 -0
- vismatch/third_party/gim/dkm/benchmarks/megadepth_dense_benchmark.py +86 -0
- vismatch/third_party/gim/dkm/benchmarks/scannet_benchmark.py +143 -0
- vismatch/third_party/gim/dkm/checkpointing/__init__.py +1 -0
- vismatch/third_party/gim/dkm/checkpointing/checkpoint.py +31 -0
- vismatch/third_party/gim/dkm/datasets/__init__.py +1 -0
- vismatch/third_party/gim/dkm/datasets/megadepth.py +177 -0
- vismatch/third_party/gim/dkm/datasets/scannet.py +151 -0
- vismatch/third_party/gim/dkm/losses/__init__.py +1 -0
- vismatch/third_party/gim/dkm/losses/depth_match_regression_loss.py +128 -0
- vismatch/third_party/gim/dkm/models/__init__.py +4 -0
- vismatch/third_party/gim/dkm/models/dkm.py +745 -0
- vismatch/third_party/gim/dkm/models/encoders.py +148 -0
- vismatch/third_party/gim/dkm/models/model_zoo/DKMv3.py +148 -0
- vismatch/third_party/gim/dkm/models/model_zoo/__init__.py +39 -0
- vismatch/third_party/gim/dkm/train/__init__.py +1 -0
- vismatch/third_party/gim/dkm/train/train.py +67 -0
- vismatch/third_party/gim/dkm/utils/__init__.py +13 -0
- vismatch/third_party/gim/dkm/utils/kde.py +26 -0
- vismatch/third_party/gim/dkm/utils/local_correlation.py +40 -0
- vismatch/third_party/gim/dkm/utils/transforms.py +104 -0
- vismatch/third_party/gim/dkm/utils/utils.py +341 -0
- vismatch/third_party/gim/gluefactory/__init__.py +17 -0
- vismatch/third_party/gim/gluefactory/datasets/__init__.py +25 -0
- vismatch/third_party/gim/gluefactory/datasets/augmentations.py +244 -0
- vismatch/third_party/gim/gluefactory/datasets/base_dataset.py +206 -0
- vismatch/third_party/gim/gluefactory/datasets/eth3d.py +254 -0
- vismatch/third_party/gim/gluefactory/datasets/homographies.py +311 -0
- vismatch/third_party/gim/gluefactory/datasets/hpatches.py +145 -0
- vismatch/third_party/gim/gluefactory/datasets/image_folder.py +59 -0
- vismatch/third_party/gim/gluefactory/datasets/image_pairs.py +100 -0
- vismatch/third_party/gim/gluefactory/datasets/megadepth.py +514 -0
- vismatch/third_party/gim/gluefactory/datasets/utils.py +131 -0
- vismatch/third_party/gim/gluefactory/eval/__init__.py +20 -0
- vismatch/third_party/gim/gluefactory/eval/eth3d.py +202 -0
- vismatch/third_party/gim/gluefactory/eval/eval_pipeline.py +109 -0
- vismatch/third_party/gim/gluefactory/eval/hpatches.py +203 -0
- vismatch/third_party/gim/gluefactory/eval/inspect.py +61 -0
- vismatch/third_party/gim/gluefactory/eval/io.py +109 -0
- vismatch/third_party/gim/gluefactory/eval/megadepth1500.py +189 -0
- vismatch/third_party/gim/gluefactory/eval/utils.py +272 -0
- vismatch/third_party/gim/gluefactory/geometry/depth.py +88 -0
- vismatch/third_party/gim/gluefactory/geometry/epipolar.py +155 -0
- vismatch/third_party/gim/gluefactory/geometry/gt_generation.py +558 -0
- vismatch/third_party/gim/gluefactory/geometry/homography.py +342 -0
- vismatch/third_party/gim/gluefactory/geometry/utils.py +167 -0
- vismatch/third_party/gim/gluefactory/geometry/wrappers.py +425 -0
- vismatch/third_party/gim/gluefactory/models/__init__.py +30 -0
- vismatch/third_party/gim/gluefactory/models/backbones/__init__.py +0 -0
- vismatch/third_party/gim/gluefactory/models/backbones/dinov2.py +30 -0
- vismatch/third_party/gim/gluefactory/models/base_model.py +157 -0
- vismatch/third_party/gim/gluefactory/models/cache_loader.py +139 -0
- vismatch/third_party/gim/gluefactory/models/extractors/__init__.py +0 -0
- vismatch/third_party/gim/gluefactory/models/extractors/aliked.py +786 -0
- vismatch/third_party/gim/gluefactory/models/extractors/disk_kornia.py +108 -0
- vismatch/third_party/gim/gluefactory/models/extractors/grid_extractor.py +60 -0
- vismatch/third_party/gim/gluefactory/models/extractors/keynet_affnet_hardnet.py +74 -0
- vismatch/third_party/gim/gluefactory/models/extractors/mixed.py +76 -0
- vismatch/third_party/gim/gluefactory/models/extractors/sift.py +234 -0
- vismatch/third_party/gim/gluefactory/models/extractors/sift_kornia.py +46 -0
- vismatch/third_party/gim/gluefactory/models/extractors/superpoint_open.py +210 -0
- vismatch/third_party/gim/gluefactory/models/lines/__init__.py +0 -0
- vismatch/third_party/gim/gluefactory/models/lines/deeplsd.py +106 -0
- vismatch/third_party/gim/gluefactory/models/lines/lsd.py +88 -0
- vismatch/third_party/gim/gluefactory/models/lines/wireframe.py +312 -0
- vismatch/third_party/gim/gluefactory/models/matchers/__init__.py +0 -0
- vismatch/third_party/gim/gluefactory/models/matchers/adalam.py +0 -0
- vismatch/third_party/gim/gluefactory/models/matchers/depth_matcher.py +82 -0
- vismatch/third_party/gim/gluefactory/models/matchers/gluestick.py +776 -0
- vismatch/third_party/gim/gluefactory/models/matchers/homography_matcher.py +66 -0
- vismatch/third_party/gim/gluefactory/models/matchers/kornia_loftr.py +66 -0
- vismatch/third_party/gim/gluefactory/models/matchers/lightglue.py +632 -0
- vismatch/third_party/gim/gluefactory/models/matchers/lightglue_pretrained.py +36 -0
- vismatch/third_party/gim/gluefactory/models/matchers/nearest_neighbor_matcher.py +97 -0
- vismatch/third_party/gim/gluefactory/models/triplet_pipeline.py +99 -0
- vismatch/third_party/gim/gluefactory/models/two_view_pipeline.py +114 -0
- vismatch/third_party/gim/gluefactory/models/utils/__init__.py +0 -0
- vismatch/third_party/gim/gluefactory/models/utils/losses.py +73 -0
- vismatch/third_party/gim/gluefactory/models/utils/metrics.py +50 -0
- vismatch/third_party/gim/gluefactory/models/utils/misc.py +70 -0
- vismatch/third_party/gim/gluefactory/robust_estimators/__init__.py +15 -0
- vismatch/third_party/gim/gluefactory/robust_estimators/base_estimator.py +33 -0
- vismatch/third_party/gim/gluefactory/robust_estimators/homography/__init__.py +0 -0
- vismatch/third_party/gim/gluefactory/robust_estimators/homography/homography_est.py +74 -0
- vismatch/third_party/gim/gluefactory/robust_estimators/homography/opencv.py +53 -0
- vismatch/third_party/gim/gluefactory/robust_estimators/homography/poselib.py +40 -0
- vismatch/third_party/gim/gluefactory/robust_estimators/relative_pose/__init__.py +0 -0
- vismatch/third_party/gim/gluefactory/robust_estimators/relative_pose/opencv.py +64 -0
- vismatch/third_party/gim/gluefactory/robust_estimators/relative_pose/poselib.py +44 -0
- vismatch/third_party/gim/gluefactory/robust_estimators/relative_pose/pycolmap.py +52 -0
- vismatch/third_party/gim/gluefactory/scripts/__init__.py +0 -0
- vismatch/third_party/gim/gluefactory/scripts/export_local_features.py +127 -0
- vismatch/third_party/gim/gluefactory/scripts/export_megadepth.py +173 -0
- vismatch/third_party/gim/gluefactory/settings.py +6 -0
- vismatch/third_party/gim/gluefactory/superpoint.py +361 -0
- vismatch/third_party/gim/gluefactory/train.py +691 -0
- vismatch/third_party/gim/gluefactory/utils/__init__.py +0 -0
- vismatch/third_party/gim/gluefactory/utils/benchmark.py +33 -0
- vismatch/third_party/gim/gluefactory/utils/experiments.py +134 -0
- vismatch/third_party/gim/gluefactory/utils/export_predictions.py +81 -0
- vismatch/third_party/gim/gluefactory/utils/image.py +130 -0
- vismatch/third_party/gim/gluefactory/utils/misc.py +44 -0
- vismatch/third_party/gim/gluefactory/utils/patches.py +50 -0
- vismatch/third_party/gim/gluefactory/utils/stdout_capturing.py +134 -0
- vismatch/third_party/gim/gluefactory/utils/tensor.py +48 -0
- vismatch/third_party/gim/gluefactory/utils/tools.py +269 -0
- vismatch/third_party/gim/gluefactory/visualization/global_frame.py +289 -0
- vismatch/third_party/gim/gluefactory/visualization/tools.py +465 -0
- vismatch/third_party/gim/gluefactory/visualization/two_view_frame.py +158 -0
- vismatch/third_party/gim/gluefactory/visualization/visualize_batch.py +57 -0
- vismatch/third_party/gim/gluefactory/visualization/viz2d.py +486 -0
- vismatch/third_party/imatch-toolbox/configs/d2net.yml +26 -0
- vismatch/third_party/imatch-toolbox/configs/dogaffnethardnet.yml +10 -0
- vismatch/third_party/imatch-toolbox/configs/ncnet.yml +7 -0
- vismatch/third_party/imatch-toolbox/configs/patch2pix.yml +56 -0
- vismatch/third_party/imatch-toolbox/configs/patch2pix_superglue.yml +58 -0
- vismatch/third_party/imatch-toolbox/configs/r2d2.yml +31 -0
- vismatch/third_party/imatch-toolbox/configs/sift.yml +27 -0
- vismatch/third_party/imatch-toolbox/configs/superglue.yml +69 -0
- vismatch/third_party/imatch-toolbox/configs/superpoint.yml +21 -0
- vismatch/third_party/imatch-toolbox/environment.yml +14 -0
- vismatch/third_party/imatch-toolbox/immatch/__init__.py +8 -0
- vismatch/third_party/imatch-toolbox/immatch/eval_aachen.py +88 -0
- vismatch/third_party/imatch-toolbox/immatch/eval_hpatches.py +117 -0
- vismatch/third_party/imatch-toolbox/immatch/eval_inloc.py +45 -0
- vismatch/third_party/imatch-toolbox/immatch/eval_relapose.py +231 -0
- vismatch/third_party/imatch-toolbox/immatch/eval_robotcar.py +83 -0
- vismatch/third_party/imatch-toolbox/immatch/modules/__init__.py +0 -0
- vismatch/third_party/imatch-toolbox/immatch/modules/base.py +89 -0
- vismatch/third_party/imatch-toolbox/immatch/modules/d2net.py +69 -0
- vismatch/third_party/imatch-toolbox/immatch/modules/dogaffnethardnet.py +94 -0
- vismatch/third_party/imatch-toolbox/immatch/modules/nn_matching.py +31 -0
- vismatch/third_party/imatch-toolbox/immatch/modules/patch2pix.py +126 -0
- vismatch/third_party/imatch-toolbox/immatch/modules/r2d2.py +64 -0
- vismatch/third_party/imatch-toolbox/immatch/modules/sift.py +67 -0
- vismatch/third_party/imatch-toolbox/immatch/modules/superglue.py +62 -0
- vismatch/third_party/imatch-toolbox/immatch/modules/superpoint.py +56 -0
- vismatch/third_party/imatch-toolbox/immatch/utils/__init__.py +13 -0
- vismatch/third_party/imatch-toolbox/immatch/utils/colmap/data_parsing.py +257 -0
- vismatch/third_party/imatch-toolbox/immatch/utils/colmap/database.py +362 -0
- vismatch/third_party/imatch-toolbox/immatch/utils/colmap/read_write_model.py +506 -0
- vismatch/third_party/imatch-toolbox/immatch/utils/data_io.py +111 -0
- vismatch/third_party/imatch-toolbox/immatch/utils/hpatches_helper.py +242 -0
- vismatch/third_party/imatch-toolbox/immatch/utils/localize_sfm_helper.py +403 -0
- vismatch/third_party/imatch-toolbox/immatch/utils/metrics.py +90 -0
- vismatch/third_party/imatch-toolbox/immatch/utils/model_helper.py +27 -0
- vismatch/third_party/imatch-toolbox/setup.py +36 -0
- vismatch/third_party/imatch-toolbox/third_party/d2net/extract_features.py +156 -0
- vismatch/third_party/imatch-toolbox/third_party/d2net/extract_kapture.py +248 -0
- vismatch/third_party/imatch-toolbox/third_party/d2net/lib/dataset.py +239 -0
- vismatch/third_party/imatch-toolbox/third_party/d2net/lib/exceptions.py +6 -0
- vismatch/third_party/imatch-toolbox/third_party/d2net/lib/loss.py +340 -0
- vismatch/third_party/imatch-toolbox/third_party/d2net/lib/model.py +121 -0
- vismatch/third_party/imatch-toolbox/third_party/d2net/lib/model_test.py +187 -0
- vismatch/third_party/imatch-toolbox/third_party/d2net/lib/pyramid.py +129 -0
- vismatch/third_party/imatch-toolbox/third_party/d2net/lib/utils.py +167 -0
- vismatch/third_party/imatch-toolbox/third_party/d2net/megadepth_utils/preprocess_scene.py +242 -0
- vismatch/third_party/imatch-toolbox/third_party/d2net/megadepth_utils/undistort_reconstructions.py +69 -0
- vismatch/third_party/imatch-toolbox/third_party/d2net/train.py +279 -0
- vismatch/third_party/imatch-toolbox/third_party/patch2pix/data_pairs/precompute_immatch_val_ovs.py +20 -0
- vismatch/third_party/imatch-toolbox/third_party/patch2pix/environment.yml +21 -0
- vismatch/third_party/imatch-toolbox/third_party/patch2pix/networks/modules.py +167 -0
- vismatch/third_party/imatch-toolbox/third_party/patch2pix/networks/ncn/conv4d.py +91 -0
- vismatch/third_party/imatch-toolbox/third_party/patch2pix/networks/ncn/extract_ncmatches.py +158 -0
- vismatch/third_party/imatch-toolbox/third_party/patch2pix/networks/ncn/model.py +333 -0
- vismatch/third_party/imatch-toolbox/third_party/patch2pix/networks/patch2pix.py +403 -0
- vismatch/third_party/imatch-toolbox/third_party/patch2pix/networks/resnet.py +191 -0
- vismatch/third_party/imatch-toolbox/third_party/patch2pix/networks/utils.py +111 -0
- vismatch/third_party/imatch-toolbox/third_party/patch2pix/train_patch2pix.py +374 -0
- vismatch/third_party/imatch-toolbox/third_party/patch2pix/utils/colmap/data_loading.py +169 -0
- vismatch/third_party/imatch-toolbox/third_party/patch2pix/utils/colmap/read_database.py +175 -0
- vismatch/third_party/imatch-toolbox/third_party/patch2pix/utils/colmap/read_write_model.py +483 -0
- vismatch/third_party/imatch-toolbox/third_party/patch2pix/utils/common/plotting.py +393 -0
- vismatch/third_party/imatch-toolbox/third_party/patch2pix/utils/common/setup_helper.py +59 -0
- vismatch/third_party/imatch-toolbox/third_party/patch2pix/utils/common/visdom_helper.py +95 -0
- vismatch/third_party/imatch-toolbox/third_party/patch2pix/utils/datasets/__init__.py +1 -0
- vismatch/third_party/imatch-toolbox/third_party/patch2pix/utils/datasets/data_parsing.py +145 -0
- vismatch/third_party/imatch-toolbox/third_party/patch2pix/utils/datasets/dataset_megadepth.py +141 -0
- vismatch/third_party/imatch-toolbox/third_party/patch2pix/utils/datasets/preprocess.py +184 -0
- vismatch/third_party/imatch-toolbox/third_party/patch2pix/utils/eval/geometry.py +90 -0
- vismatch/third_party/imatch-toolbox/third_party/patch2pix/utils/eval/measure.py +161 -0
- vismatch/third_party/imatch-toolbox/third_party/patch2pix/utils/eval/model_helper.py +129 -0
- vismatch/third_party/imatch-toolbox/third_party/patch2pix/utils/train/eval_epoch_immatch.py +99 -0
- vismatch/third_party/imatch-toolbox/third_party/patch2pix/utils/train/helper.py +196 -0
- vismatch/third_party/imatch-toolbox/third_party/r2d2/datasets/__init__.py +33 -0
- vismatch/third_party/imatch-toolbox/third_party/r2d2/datasets/aachen.py +146 -0
- vismatch/third_party/imatch-toolbox/third_party/r2d2/datasets/dataset.py +77 -0
- vismatch/third_party/imatch-toolbox/third_party/r2d2/datasets/imgfolder.py +23 -0
- vismatch/third_party/imatch-toolbox/third_party/r2d2/datasets/pair_dataset.py +287 -0
- vismatch/third_party/imatch-toolbox/third_party/r2d2/datasets/web_images.py +64 -0
- vismatch/third_party/imatch-toolbox/third_party/r2d2/extract.py +183 -0
- vismatch/third_party/imatch-toolbox/third_party/r2d2/extract_kapture.py +194 -0
- vismatch/third_party/imatch-toolbox/third_party/r2d2/nets/ap_loss.py +67 -0
- vismatch/third_party/imatch-toolbox/third_party/r2d2/nets/losses.py +56 -0
- vismatch/third_party/imatch-toolbox/third_party/r2d2/nets/patchnet.py +134 -0
- vismatch/third_party/imatch-toolbox/third_party/r2d2/nets/reliability_loss.py +59 -0
- vismatch/third_party/imatch-toolbox/third_party/r2d2/nets/repeatability_loss.py +66 -0
- vismatch/third_party/imatch-toolbox/third_party/r2d2/nets/sampler.py +390 -0
- vismatch/third_party/imatch-toolbox/third_party/r2d2/tools/common.py +41 -0
- vismatch/third_party/imatch-toolbox/third_party/r2d2/tools/dataloader.py +367 -0
- vismatch/third_party/imatch-toolbox/third_party/r2d2/tools/trainer.py +76 -0
- vismatch/third_party/imatch-toolbox/third_party/r2d2/tools/transforms.py +513 -0
- vismatch/third_party/imatch-toolbox/third_party/r2d2/tools/transforms_tools.py +230 -0
- vismatch/third_party/imatch-toolbox/third_party/r2d2/tools/viz.py +191 -0
- vismatch/third_party/imatch-toolbox/third_party/r2d2/train.py +138 -0
- vismatch/third_party/imatch-toolbox/third_party/r2d2/viz_heatmaps.py +122 -0
- vismatch/third_party/imatch-toolbox/third_party/superglue/demo_superglue.py +259 -0
- vismatch/third_party/imatch-toolbox/third_party/superglue/match_pairs.py +425 -0
- vismatch/third_party/imatch-toolbox/third_party/superglue/models/__init__.py +0 -0
- vismatch/third_party/imatch-toolbox/third_party/superglue/models/matching.py +84 -0
- vismatch/third_party/imatch-toolbox/third_party/superglue/models/superglue.py +283 -0
- vismatch/third_party/imatch-toolbox/third_party/superglue/models/superpoint.py +202 -0
- vismatch/third_party/imatch-toolbox/third_party/superglue/models/utils.py +555 -0
- vismatch/third_party/keypt2subpx/dataprocess/aliked.py +163 -0
- vismatch/third_party/keypt2subpx/dataprocess/dedode.py +215 -0
- vismatch/third_party/keypt2subpx/dataprocess/splg.py +162 -0
- vismatch/third_party/keypt2subpx/dataprocess/spnn.py +157 -0
- vismatch/third_party/keypt2subpx/dataprocess/superpoint_densescore.py +357 -0
- vismatch/third_party/keypt2subpx/dataprocess/xfeat.py +187 -0
- vismatch/third_party/keypt2subpx/dataset.py +145 -0
- vismatch/third_party/keypt2subpx/hubconf.py +38 -0
- vismatch/third_party/keypt2subpx/logger.py +127 -0
- vismatch/third_party/keypt2subpx/model.py +183 -0
- vismatch/third_party/keypt2subpx/settings.py +108 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/__init__.py +17 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/datasets/__init__.py +25 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/datasets/augmentations.py +244 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/datasets/base_dataset.py +206 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/datasets/eth3d.py +254 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/datasets/homographies.py +311 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/datasets/hpatches.py +145 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/datasets/image_folder.py +59 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/datasets/image_pairs.py +100 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/datasets/megadepth.py +510 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/datasets/utils.py +131 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/eval/__init__.py +20 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/eval/eth3d.py +202 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/eval/eval_pipeline.py +109 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/eval/hpatches.py +203 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/eval/inspect.py +61 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/eval/io.py +109 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/eval/megadepth1500.py +189 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/eval/utils.py +272 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/geometry/__init__.py +0 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/geometry/depth.py +88 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/geometry/epipolar.py +155 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/geometry/gt_generation.py +558 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/geometry/homography.py +342 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/geometry/utils.py +167 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/geometry/wrappers.py +425 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/models/__init__.py +30 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/models/backbones/__init__.py +0 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/models/backbones/dinov2.py +30 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/models/base_model.py +157 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/models/cache_loader.py +139 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/models/extractors/__init__.py +0 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/models/extractors/aliked.py +786 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/models/extractors/disk_kornia.py +108 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/models/extractors/grid_extractor.py +60 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/models/extractors/keynet_affnet_hardnet.py +74 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/models/extractors/mixed.py +76 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/models/extractors/sift.py +234 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/models/extractors/sift_kornia.py +46 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/models/extractors/superpoint_open.py +210 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/models/lines/__init__.py +0 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/models/lines/deeplsd.py +106 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/models/lines/lsd.py +88 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/models/lines/wireframe.py +312 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/models/matchers/__init__.py +0 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/models/matchers/adalam.py +0 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/models/matchers/depth_matcher.py +82 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/models/matchers/gluestick.py +776 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/models/matchers/homography_matcher.py +66 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/models/matchers/kornia_loftr.py +66 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/models/matchers/lightglue.py +612 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/models/matchers/lightglue_pretrained.py +36 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/models/matchers/nearest_neighbor_matcher.py +97 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/models/triplet_pipeline.py +99 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/models/two_view_pipeline.py +114 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/models/utils/__init__.py +0 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/models/utils/losses.py +73 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/models/utils/metrics.py +50 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/models/utils/misc.py +70 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/robust_estimators/__init__.py +15 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/robust_estimators/base_estimator.py +33 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/robust_estimators/homography/__init__.py +0 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/robust_estimators/homography/homography_est.py +74 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/robust_estimators/homography/opencv.py +53 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/robust_estimators/homography/poselib.py +40 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/robust_estimators/relative_pose/__init__.py +0 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/robust_estimators/relative_pose/opencv.py +64 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/robust_estimators/relative_pose/poselib.py +44 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/robust_estimators/relative_pose/pycolmap.py +52 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/scripts/__init__.py +0 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/scripts/export_local_features.py +127 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/scripts/export_megadepth.py +173 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/settings.py +6 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/train.py +691 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/utils/__init__.py +0 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/utils/benchmark.py +33 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/utils/experiments.py +134 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/utils/export_predictions.py +81 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/utils/image.py +130 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/utils/misc.py +44 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/utils/patches.py +50 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/utils/stdout_capturing.py +134 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/utils/tensor.py +48 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/utils/tools.py +269 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/visualization/global_frame.py +289 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/visualization/tools.py +465 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/visualization/two_view_frame.py +158 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/visualization/visualize_batch.py +57 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory/visualization/viz2d.py +486 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory_nonfree/__init__.py +0 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory_nonfree/superglue.py +342 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/gluefactory_nonfree/superpoint.py +356 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/tests/__init__.py +0 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/tests/test_eval_utils.py +88 -0
- vismatch/third_party/keypt2subpx/submodules/glue_factory/tests/test_integration.py +132 -0
- vismatch/third_party/keypt2subpx/summarize.py +44 -0
- vismatch/third_party/keypt2subpx/test.py +225 -0
- vismatch/third_party/keypt2subpx/train.py +180 -0
- vismatch/third_party/keypt2subpx/utils.py +150 -0
- vismatch/third_party/mast3r/demo.py +51 -0
- vismatch/third_party/mast3r/demo_dust3r_ga.py +99 -0
- vismatch/third_party/mast3r/demo_glomap.py +52 -0
- vismatch/third_party/mast3r/dust3r/croco/datasets/__init__.py +0 -0
- vismatch/third_party/mast3r/dust3r/croco/datasets/crops/extract_crops_from_images.py +159 -0
- vismatch/third_party/mast3r/dust3r/croco/datasets/habitat_sim/__init__.py +0 -0
- vismatch/third_party/mast3r/dust3r/croco/datasets/habitat_sim/generate_from_metadata.py +92 -0
- vismatch/third_party/mast3r/dust3r/croco/datasets/habitat_sim/generate_from_metadata_files.py +27 -0
- vismatch/third_party/mast3r/dust3r/croco/datasets/habitat_sim/generate_multiview_images.py +177 -0
- vismatch/third_party/mast3r/dust3r/croco/datasets/habitat_sim/multiview_habitat_sim_generator.py +390 -0
- vismatch/third_party/mast3r/dust3r/croco/datasets/habitat_sim/pack_metadata_files.py +69 -0
- vismatch/third_party/mast3r/dust3r/croco/datasets/habitat_sim/paths.py +129 -0
- vismatch/third_party/mast3r/dust3r/croco/datasets/pairs_dataset.py +109 -0
- vismatch/third_party/mast3r/dust3r/croco/datasets/transforms.py +95 -0
- vismatch/third_party/mast3r/dust3r/croco/demo.py +55 -0
- vismatch/third_party/mast3r/dust3r/croco/models/blocks.py +241 -0
- vismatch/third_party/mast3r/dust3r/croco/models/criterion.py +37 -0
- vismatch/third_party/mast3r/dust3r/croco/models/croco.py +249 -0
- vismatch/third_party/mast3r/dust3r/croco/models/croco_downstream.py +122 -0
- vismatch/third_party/mast3r/dust3r/croco/models/curope/__init__.py +4 -0
- vismatch/third_party/mast3r/dust3r/croco/models/curope/curope2d.py +40 -0
- vismatch/third_party/mast3r/dust3r/croco/models/curope/setup.py +34 -0
- vismatch/third_party/mast3r/dust3r/croco/models/dpt_block.py +450 -0
- vismatch/third_party/mast3r/dust3r/croco/models/head_downstream.py +58 -0
- vismatch/third_party/mast3r/dust3r/croco/models/masking.py +25 -0
- vismatch/third_party/mast3r/dust3r/croco/models/pos_embed.py +157 -0
- vismatch/third_party/mast3r/dust3r/croco/pretrain.py +254 -0
- vismatch/third_party/mast3r/dust3r/croco/stereoflow/augmentor.py +290 -0
- vismatch/third_party/mast3r/dust3r/croco/stereoflow/criterion.py +251 -0
- vismatch/third_party/mast3r/dust3r/croco/stereoflow/datasets_flow.py +630 -0
- vismatch/third_party/mast3r/dust3r/croco/stereoflow/datasets_stereo.py +674 -0
- vismatch/third_party/mast3r/dust3r/croco/stereoflow/engine.py +280 -0
- vismatch/third_party/mast3r/dust3r/croco/stereoflow/test.py +216 -0
- vismatch/third_party/mast3r/dust3r/croco/stereoflow/train.py +253 -0
- vismatch/third_party/mast3r/dust3r/croco/utils/misc.py +463 -0
- vismatch/third_party/mast3r/dust3r/datasets_preprocess/habitat/find_scenes.py +78 -0
- vismatch/third_party/mast3r/dust3r/datasets_preprocess/habitat/habitat_renderer/__init__.py +2 -0
- vismatch/third_party/mast3r/dust3r/datasets_preprocess/habitat/habitat_renderer/habitat_sim_envmaps_renderer.py +170 -0
- vismatch/third_party/mast3r/dust3r/datasets_preprocess/habitat/habitat_renderer/multiview_crop_generator.py +93 -0
- vismatch/third_party/mast3r/dust3r/datasets_preprocess/habitat/habitat_renderer/projections.py +151 -0
- vismatch/third_party/mast3r/dust3r/datasets_preprocess/habitat/habitat_renderer/projections_conversions.py +45 -0
- vismatch/third_party/mast3r/dust3r/datasets_preprocess/habitat/preprocess_habitat.py +121 -0
- vismatch/third_party/mast3r/dust3r/datasets_preprocess/path_to_root.py +13 -0
- vismatch/third_party/mast3r/dust3r/datasets_preprocess/preprocess_arkitscenes.py +355 -0
- vismatch/third_party/mast3r/dust3r/datasets_preprocess/preprocess_blendedMVS.py +149 -0
- vismatch/third_party/mast3r/dust3r/datasets_preprocess/preprocess_co3d.py +295 -0
- vismatch/third_party/mast3r/dust3r/datasets_preprocess/preprocess_megadepth.py +198 -0
- vismatch/third_party/mast3r/dust3r/datasets_preprocess/preprocess_scannetpp.py +390 -0
- vismatch/third_party/mast3r/dust3r/datasets_preprocess/preprocess_staticthings3d.py +130 -0
- vismatch/third_party/mast3r/dust3r/datasets_preprocess/preprocess_waymo.py +257 -0
- vismatch/third_party/mast3r/dust3r/datasets_preprocess/preprocess_wildrgbd.py +209 -0
- vismatch/third_party/mast3r/dust3r/demo.py +45 -0
- vismatch/third_party/mast3r/dust3r/dust3r/__init__.py +2 -0
- vismatch/third_party/mast3r/dust3r/dust3r/cloud_opt/__init__.py +33 -0
- vismatch/third_party/mast3r/dust3r/dust3r/cloud_opt/base_opt.py +405 -0
- vismatch/third_party/mast3r/dust3r/dust3r/cloud_opt/commons.py +90 -0
- vismatch/third_party/mast3r/dust3r/dust3r/cloud_opt/init_im_poses.py +316 -0
- vismatch/third_party/mast3r/dust3r/dust3r/cloud_opt/modular_optimizer.py +145 -0
- vismatch/third_party/mast3r/dust3r/dust3r/cloud_opt/optimizer.py +248 -0
- vismatch/third_party/mast3r/dust3r/dust3r/cloud_opt/pair_viewer.py +127 -0
- vismatch/third_party/mast3r/dust3r/dust3r/datasets/__init__.py +50 -0
- vismatch/third_party/mast3r/dust3r/dust3r/datasets/arkitscenes.py +102 -0
- vismatch/third_party/mast3r/dust3r/dust3r/datasets/base/__init__.py +2 -0
- vismatch/third_party/mast3r/dust3r/dust3r/datasets/base/base_stereo_view_dataset.py +220 -0
- vismatch/third_party/mast3r/dust3r/dust3r/datasets/base/batched_sampler.py +74 -0
- vismatch/third_party/mast3r/dust3r/dust3r/datasets/base/easy_dataset.py +157 -0
- vismatch/third_party/mast3r/dust3r/dust3r/datasets/blendedmvs.py +104 -0
- vismatch/third_party/mast3r/dust3r/dust3r/datasets/co3d.py +165 -0
- vismatch/third_party/mast3r/dust3r/dust3r/datasets/habitat.py +107 -0
- vismatch/third_party/mast3r/dust3r/dust3r/datasets/megadepth.py +123 -0
- vismatch/third_party/mast3r/dust3r/dust3r/datasets/scannetpp.py +96 -0
- vismatch/third_party/mast3r/dust3r/dust3r/datasets/staticthings3d.py +96 -0
- vismatch/third_party/mast3r/dust3r/dust3r/datasets/utils/__init__.py +2 -0
- vismatch/third_party/mast3r/dust3r/dust3r/datasets/utils/cropping.py +124 -0
- vismatch/third_party/mast3r/dust3r/dust3r/datasets/utils/transforms.py +11 -0
- vismatch/third_party/mast3r/dust3r/dust3r/datasets/waymo.py +93 -0
- vismatch/third_party/mast3r/dust3r/dust3r/datasets/wildrgbd.py +67 -0
- vismatch/third_party/mast3r/dust3r/dust3r/demo.py +287 -0
- vismatch/third_party/mast3r/dust3r/dust3r/heads/__init__.py +19 -0
- vismatch/third_party/mast3r/dust3r/dust3r/heads/dpt_head.py +115 -0
- vismatch/third_party/mast3r/dust3r/dust3r/heads/linear_head.py +41 -0
- vismatch/third_party/mast3r/dust3r/dust3r/heads/postprocess.py +58 -0
- vismatch/third_party/mast3r/dust3r/dust3r/image_pairs.py +104 -0
- vismatch/third_party/mast3r/dust3r/dust3r/inference.py +150 -0
- vismatch/third_party/mast3r/dust3r/dust3r/losses.py +299 -0
- vismatch/third_party/mast3r/dust3r/dust3r/model.py +211 -0
- vismatch/third_party/mast3r/dust3r/dust3r/optim_factory.py +14 -0
- vismatch/third_party/mast3r/dust3r/dust3r/patch_embed.py +70 -0
- vismatch/third_party/mast3r/dust3r/dust3r/post_process.py +60 -0
- vismatch/third_party/mast3r/dust3r/dust3r/training.py +377 -0
- vismatch/third_party/mast3r/dust3r/dust3r/utils/__init__.py +2 -0
- vismatch/third_party/mast3r/dust3r/dust3r/utils/device.py +76 -0
- vismatch/third_party/mast3r/dust3r/dust3r/utils/geometry.py +366 -0
- vismatch/third_party/mast3r/dust3r/dust3r/utils/image.py +128 -0
- vismatch/third_party/mast3r/dust3r/dust3r/utils/misc.py +121 -0
- vismatch/third_party/mast3r/dust3r/dust3r/utils/parallel.py +79 -0
- vismatch/third_party/mast3r/dust3r/dust3r/utils/path_to_croco.py +19 -0
- vismatch/third_party/mast3r/dust3r/dust3r/viz.py +381 -0
- vismatch/third_party/mast3r/dust3r/dust3r_visloc/__init__.py +2 -0
- vismatch/third_party/mast3r/dust3r/dust3r_visloc/datasets/__init__.py +6 -0
- vismatch/third_party/mast3r/dust3r/dust3r_visloc/datasets/aachen_day_night.py +24 -0
- vismatch/third_party/mast3r/dust3r/dust3r_visloc/datasets/base_colmap.py +282 -0
- vismatch/third_party/mast3r/dust3r/dust3r_visloc/datasets/base_dataset.py +19 -0
- vismatch/third_party/mast3r/dust3r/dust3r_visloc/datasets/cambridge_landmarks.py +19 -0
- vismatch/third_party/mast3r/dust3r/dust3r_visloc/datasets/inloc.py +167 -0
- vismatch/third_party/mast3r/dust3r/dust3r_visloc/datasets/sevenscenes.py +123 -0
- vismatch/third_party/mast3r/dust3r/dust3r_visloc/datasets/utils.py +118 -0
- vismatch/third_party/mast3r/dust3r/dust3r_visloc/evaluation.py +65 -0
- vismatch/third_party/mast3r/dust3r/dust3r_visloc/localization.py +140 -0
- vismatch/third_party/mast3r/dust3r/train.py +13 -0
- vismatch/third_party/mast3r/dust3r/visloc.py +193 -0
- vismatch/third_party/mast3r/kapture_mast3r_mapping.py +127 -0
- vismatch/third_party/mast3r/make_pairs.py +105 -0
- vismatch/third_party/mast3r/mast3r/__init__.py +2 -0
- vismatch/third_party/mast3r/mast3r/catmlp_dpt_head.py +239 -0
- vismatch/third_party/mast3r/mast3r/cloud_opt/__init__.py +2 -0
- vismatch/third_party/mast3r/mast3r/cloud_opt/sparse_ga.py +1078 -0
- vismatch/third_party/mast3r/mast3r/cloud_opt/triangulation.py +80 -0
- vismatch/third_party/mast3r/mast3r/cloud_opt/tsdf_optimizer.py +273 -0
- vismatch/third_party/mast3r/mast3r/cloud_opt/utils/__init__.py +2 -0
- vismatch/third_party/mast3r/mast3r/cloud_opt/utils/losses.py +32 -0
- vismatch/third_party/mast3r/mast3r/cloud_opt/utils/schedules.py +17 -0
- vismatch/third_party/mast3r/mast3r/colmap/__init__.py +2 -0
- vismatch/third_party/mast3r/mast3r/colmap/database.py +383 -0
- vismatch/third_party/mast3r/mast3r/colmap/mapping.py +196 -0
- vismatch/third_party/mast3r/mast3r/datasets/__init__.py +62 -0
- vismatch/third_party/mast3r/mast3r/datasets/base/__init__.py +2 -0
- vismatch/third_party/mast3r/mast3r/datasets/base/mast3r_base_stereo_view_dataset.py +355 -0
- vismatch/third_party/mast3r/mast3r/datasets/utils/__init__.py +2 -0
- vismatch/third_party/mast3r/mast3r/datasets/utils/cropping.py +219 -0
- vismatch/third_party/mast3r/mast3r/demo.py +381 -0
- vismatch/third_party/mast3r/mast3r/demo_glomap.py +343 -0
- vismatch/third_party/mast3r/mast3r/fast_nn.py +223 -0
- vismatch/third_party/mast3r/mast3r/image_pairs.py +115 -0
- vismatch/third_party/mast3r/mast3r/losses.py +508 -0
- vismatch/third_party/mast3r/mast3r/model.py +213 -0
- vismatch/third_party/mast3r/mast3r/retrieval/graph.py +77 -0
- vismatch/third_party/mast3r/mast3r/retrieval/model.py +271 -0
- vismatch/third_party/mast3r/mast3r/retrieval/processor.py +129 -0
- vismatch/third_party/mast3r/mast3r/utils/__init__.py +2 -0
- vismatch/third_party/mast3r/mast3r/utils/coarse_to_fine.py +214 -0
- vismatch/third_party/mast3r/mast3r/utils/collate.py +62 -0
- vismatch/third_party/mast3r/mast3r/utils/misc.py +17 -0
- vismatch/third_party/mast3r/mast3r/utils/path_to_dust3r.py +19 -0
- vismatch/third_party/mast3r/train.py +48 -0
- vismatch/third_party/mast3r/visloc.py +538 -0
- vismatch/third_party/omniglue/__init__.py +19 -0
- vismatch/third_party/omniglue/demo.py +89 -0
- vismatch/third_party/omniglue/src/omniglue/__init__.py +17 -0
- vismatch/third_party/omniglue/src/omniglue/dino_extract.py +215 -0
- vismatch/third_party/omniglue/src/omniglue/omniglue_extract.py +159 -0
- vismatch/third_party/omniglue/src/omniglue/superpoint_extract.py +214 -0
- vismatch/third_party/omniglue/src/omniglue/utils.py +274 -0
- vismatch/third_party/omniglue/third_party/dinov2/__init__.py +0 -0
- vismatch/third_party/omniglue/third_party/dinov2/dino.py +411 -0
- vismatch/third_party/omniglue/third_party/dinov2/dino_utils.py +341 -0
- vismatch/third_party/rdd/RDD/RDD.py +262 -0
- vismatch/third_party/rdd/RDD/RDD_helper.py +181 -0
- vismatch/third_party/rdd/RDD/dataset/__init__.py +0 -0
- vismatch/third_party/rdd/RDD/dataset/megadepth/__init__.py +2 -0
- vismatch/third_party/rdd/RDD/dataset/megadepth/megadepth.py +313 -0
- vismatch/third_party/rdd/RDD/dataset/megadepth/megadepth_warper.py +75 -0
- vismatch/third_party/rdd/RDD/dataset/megadepth/utils.py +848 -0
- vismatch/third_party/rdd/RDD/matchers/__init__.py +3 -0
- vismatch/third_party/rdd/RDD/matchers/dense_matcher.py +137 -0
- vismatch/third_party/rdd/RDD/matchers/dual_softmax_matcher.py +31 -0
- vismatch/third_party/rdd/RDD/matchers/lightglue.py +667 -0
- vismatch/third_party/rdd/RDD/models/backbone.py +147 -0
- vismatch/third_party/rdd/RDD/models/deformable_transformer.py +270 -0
- vismatch/third_party/rdd/RDD/models/descriptor.py +116 -0
- vismatch/third_party/rdd/RDD/models/detector.py +141 -0
- vismatch/third_party/rdd/RDD/models/interpolator.py +33 -0
- vismatch/third_party/rdd/RDD/models/ops/functions/__init__.py +13 -0
- vismatch/third_party/rdd/RDD/models/ops/functions/ms_deform_attn_func.py +74 -0
- vismatch/third_party/rdd/RDD/models/ops/modules/__init__.py +12 -0
- vismatch/third_party/rdd/RDD/models/ops/modules/ms_deform_attn.py +125 -0
- vismatch/third_party/rdd/RDD/models/ops/setup.py +78 -0
- vismatch/third_party/rdd/RDD/models/ops/test.py +92 -0
- vismatch/third_party/rdd/RDD/models/position_encoding.py +48 -0
- vismatch/third_party/rdd/RDD/models/soft_detect.py +176 -0
- vismatch/third_party/rdd/RDD/utils/__init__.py +1 -0
- vismatch/third_party/rdd/RDD/utils/misc.py +531 -0
- vismatch/third_party/rdd/benchmarks/air_ground.py +250 -0
- vismatch/third_party/rdd/benchmarks/mega_1500.py +259 -0
- vismatch/third_party/rdd/benchmarks/mega_view.py +252 -0
- vismatch/third_party/rdd/benchmarks/scannet_1500.py +251 -0
- vismatch/third_party/rdd/benchmarks/utils.py +112 -0
- vismatch/third_party/rdd/configs/default.yaml +19 -0
- vismatch/third_party/rdd/sfm/extract_rdd.py +145 -0
- vismatch/third_party/rdd/sfm/match_rdd.py +259 -0
- vismatch/third_party/rdd/third_party/LightGlue/.github/workflows/code-quality.yml +24 -0
- vismatch/third_party/rdd/third_party/LightGlue/benchmark.py +255 -0
- vismatch/third_party/rdd/third_party/LightGlue/lightglue/__init__.py +7 -0
- vismatch/third_party/rdd/third_party/LightGlue/lightglue/aliked.py +760 -0
- vismatch/third_party/rdd/third_party/LightGlue/lightglue/disk.py +55 -0
- vismatch/third_party/rdd/third_party/LightGlue/lightglue/dog_hardnet.py +41 -0
- vismatch/third_party/rdd/third_party/LightGlue/lightglue/lightglue.py +662 -0
- vismatch/third_party/rdd/third_party/LightGlue/lightglue/sift.py +216 -0
- vismatch/third_party/rdd/third_party/LightGlue/lightglue/superpoint.py +227 -0
- vismatch/third_party/rdd/third_party/LightGlue/lightglue/utils.py +165 -0
- vismatch/third_party/rdd/third_party/LightGlue/lightglue/viz2d.py +203 -0
- vismatch/third_party/rdd/third_party/__init__.py +1 -0
- vismatch/third_party/rdd/third_party/aliked_wrapper.py +17 -0
- vismatch/third_party/rdd/training/losses/descriptor_loss.py +73 -0
- vismatch/third_party/rdd/training/losses/detector_loss.py +499 -0
- vismatch/third_party/rdd/training/train.py +473 -0
- vismatch/third_party/rdd/training/utils.py +246 -0
- vismatch/utils.py +390 -0
- vismatch/viz.py +222 -0
- vismatch-1.1.1.dist-info/METADATA +265 -0
- vismatch-1.1.1.dist-info/RECORD +2042 -0
- vismatch-1.1.1.dist-info/WHEEL +5 -0
- vismatch-1.1.1.dist-info/entry_points.txt +4 -0
- vismatch-1.1.1.dist-info/licenses/LICENSE +28 -0
- vismatch-1.1.1.dist-info/top_level.txt +4 -0
- vismatch_extract.py +103 -0
- vismatch_match.py +114 -0
- vismatch_test.py +186 -0
|
@@ -0,0 +1,1091 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Flow and image resizing utilities.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from typing import List, Optional, Tuple
|
|
6
|
+
|
|
7
|
+
import torch
|
|
8
|
+
import torch.nn.functional as F
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ImagePairsManipulationBase:
|
|
12
|
+
def __init__(self):
|
|
13
|
+
pass
|
|
14
|
+
|
|
15
|
+
def __call__(
|
|
16
|
+
self,
|
|
17
|
+
img0: torch.Tensor,
|
|
18
|
+
img1: torch.Tensor,
|
|
19
|
+
img0_region_source: torch.Tensor,
|
|
20
|
+
img1_region_source: torch.Tensor,
|
|
21
|
+
img0_region_representation: torch.Tensor,
|
|
22
|
+
img1_region_representation: torch.Tensor,
|
|
23
|
+
):
|
|
24
|
+
"""
|
|
25
|
+
Apply resizing, cropping, and padding to image pairs while recording correspondence information.
|
|
26
|
+
|
|
27
|
+
Args:
|
|
28
|
+
- img0: Tensor of shape (B, H, W, C), dtype uint8 representing the first set of images.
|
|
29
|
+
- img1: Tensor of shape (B, H, W, C), dtype uint8 representing the second set of images.
|
|
30
|
+
- img0_region_source: Tensor of size 4 representing the region of img0 that is the source of the correspondence.
|
|
31
|
+
- img1_region_source: Tensor of size 4 representing the region of img1 that is the source of the correspondence.
|
|
32
|
+
- img0_region_representation: Tensor of size 4 representing the region of img0 in current representation space corresponding to the source region.
|
|
33
|
+
- img1_region_representation: Tensor of size 4 representing the region of img1 in current representation space corresponding to the source region.
|
|
34
|
+
Returns:
|
|
35
|
+
- img0: Tensor of image0 after manipulation.
|
|
36
|
+
- img1: Tensor of image1 after manipulation.
|
|
37
|
+
- img0_region_source: Tensor of size 4 representing the region of img0 that is the source of the correspondence.
|
|
38
|
+
- img1_region_source: Tensor of size 4 representing the region of img1 that is the source of the correspondence.
|
|
39
|
+
- img0_region_representation: Tensor of size 4 representing the region of img0 in current representation space corresponding to the source region.
|
|
40
|
+
- img1_region_representation: Tensor of size 4 representing the region of img1 in current representation space corresponding to the source region.
|
|
41
|
+
"""
|
|
42
|
+
raise NotImplementedError
|
|
43
|
+
|
|
44
|
+
def output_shape(self, H: int, W: int) -> Tuple[int, int]:
|
|
45
|
+
"""
|
|
46
|
+
Compute the output shape of the image after the resize operation.
|
|
47
|
+
|
|
48
|
+
Args:
|
|
49
|
+
- H: Height of the first image.
|
|
50
|
+
- W: Width of the first image.
|
|
51
|
+
|
|
52
|
+
Returns:
|
|
53
|
+
Tuple of (H1, W1, H2, W2) representing the output shape of the images if the manipulation is applied.
|
|
54
|
+
"""
|
|
55
|
+
|
|
56
|
+
raise NotImplementedError
|
|
57
|
+
|
|
58
|
+
def output_shape_pairs(self, H1: int, W1: int, H2: int, W2: int) -> Tuple[int, int, int, int]:
|
|
59
|
+
"""
|
|
60
|
+
Compute the output shape of the image after the resize operation.
|
|
61
|
+
"""
|
|
62
|
+
|
|
63
|
+
output1 = self.output_shape(H1, W1)
|
|
64
|
+
output2 = self.output_shape(H2, W2)
|
|
65
|
+
|
|
66
|
+
return output1[0], output1[1], output2[0], output2[1]
|
|
67
|
+
|
|
68
|
+
def check_input(self, H: int, W: int) -> bool:
|
|
69
|
+
"""
|
|
70
|
+
Check whether the input shapes are correct for the current manipulation.
|
|
71
|
+
|
|
72
|
+
Args:
|
|
73
|
+
- H: Height of the first image.
|
|
74
|
+
- W: Width of the first image.
|
|
75
|
+
|
|
76
|
+
Returns:
|
|
77
|
+
Whether the manipualtion can run on the given input shapes.
|
|
78
|
+
"""
|
|
79
|
+
raise NotImplementedError
|
|
80
|
+
|
|
81
|
+
def check_input_pairs(self, H1: int, W1: int, H2: int, W2: int) -> bool:
|
|
82
|
+
return self.check_input(H1, W1) and self.check_input(H2, W2)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
class ResizeHorizontalAxisManipulation(ImagePairsManipulationBase):
|
|
86
|
+
def __init__(self, horizontal_axis: int):
|
|
87
|
+
self.horizontal_axis = horizontal_axis
|
|
88
|
+
|
|
89
|
+
def output_shape(self, H: int, W: int) -> Tuple[int, int]:
|
|
90
|
+
"""
|
|
91
|
+
Compute the output shape of the image after the resize operation.
|
|
92
|
+
"""
|
|
93
|
+
resize_ratio = self.horizontal_axis / W
|
|
94
|
+
|
|
95
|
+
return (int(H * resize_ratio), self.horizontal_axis)
|
|
96
|
+
|
|
97
|
+
def check_input(self, H: int, W: int) -> bool:
|
|
98
|
+
return True
|
|
99
|
+
|
|
100
|
+
def __call__(
|
|
101
|
+
self,
|
|
102
|
+
img0: torch.Tensor,
|
|
103
|
+
img1: torch.Tensor,
|
|
104
|
+
img0_region_source: torch.Tensor,
|
|
105
|
+
img1_region_source: torch.Tensor,
|
|
106
|
+
img0_region_representation: torch.Tensor,
|
|
107
|
+
img1_region_representation: torch.Tensor,
|
|
108
|
+
):
|
|
109
|
+
"""
|
|
110
|
+
Apply resizing, cropping, and padding to image pairs while recording correspondence information.
|
|
111
|
+
|
|
112
|
+
Args:
|
|
113
|
+
- img0: Tensor of shape (B, H, W, C), dtype float32 or uint8 representing the first set of images.
|
|
114
|
+
- img1: Tensor of shape (B, H, W, C), dtype float32 or uint8 representing the second set of images.
|
|
115
|
+
- img0_region_source: Tensor of size 4 representing the region of img0 that is the source of the correspondence.
|
|
116
|
+
- img1_region_source: Tensor of size 4 representing the region of img1 that is the source of the correspondence.
|
|
117
|
+
- img0_region_representation: Tensor of size 4 representing the region of img0 in current representation space corresponding to the source region.
|
|
118
|
+
- img1_region_representation: Tensor of size 4 representing the region of img1 in current representation space corresponding to the source region.
|
|
119
|
+
Returns:
|
|
120
|
+
- img0: Tensor of image0 after manipulation.
|
|
121
|
+
- img1: Tensor of image1 after manipulation.
|
|
122
|
+
- img0_region_source: Tensor of size 4 representing the region of img0 that is the source of the correspondence.
|
|
123
|
+
- img1_region_source: Tensor of size 4 representing the region of img1 that is the source of the correspondence.
|
|
124
|
+
- img0_region_representation: Tensor of size 4 representing the region of img0 in current representation space corresponding to the source region.
|
|
125
|
+
- img1_region_representation: Tensor of size 4 representing the region of img1 in current representation space corresponding to the source region.
|
|
126
|
+
"""
|
|
127
|
+
# assert img0.shape == img1.shape, "Image shapes must match"
|
|
128
|
+
|
|
129
|
+
_, h0, w0, _ = img0.shape
|
|
130
|
+
_, h1, w1, _ = img1.shape
|
|
131
|
+
|
|
132
|
+
target_h0, target_w0, target_h1, target_w1 = self.output_shape_pairs(h0, w0, h1, w1)
|
|
133
|
+
|
|
134
|
+
assert img0.dtype == img1.dtype, "Image types must match"
|
|
135
|
+
is_uint8 = img0.dtype == torch.uint8
|
|
136
|
+
|
|
137
|
+
img0_resized = F.interpolate(
|
|
138
|
+
img0.permute(0, 3, 1, 2).float(), size=(target_h0, target_w0), mode="bilinear", align_corners=False
|
|
139
|
+
).permute(0, 2, 3, 1)
|
|
140
|
+
img1_resized = F.interpolate(
|
|
141
|
+
img1.permute(0, 3, 1, 2).float(), size=(target_h1, target_w1), mode="bilinear", align_corners=False
|
|
142
|
+
).permute(0, 2, 3, 1)
|
|
143
|
+
|
|
144
|
+
if is_uint8:
|
|
145
|
+
img0_resized = img0_resized.to(torch.uint8)
|
|
146
|
+
img1_resized = img1_resized.to(torch.uint8)
|
|
147
|
+
|
|
148
|
+
h_mult0 = target_h0 / h0
|
|
149
|
+
w_mult0 = target_w0 / w0
|
|
150
|
+
|
|
151
|
+
multplier0 = torch.tensor([h_mult0, h_mult0, w_mult0, w_mult0])
|
|
152
|
+
|
|
153
|
+
h_mult1 = target_h1 / h1
|
|
154
|
+
w_mult1 = target_w1 / w1
|
|
155
|
+
|
|
156
|
+
multplier1 = torch.tensor([h_mult1, h_mult1, w_mult1, w_mult1])
|
|
157
|
+
|
|
158
|
+
# source region is unchanged
|
|
159
|
+
# target region is scaled
|
|
160
|
+
img0_region_representation = multplier0 * img0_region_representation
|
|
161
|
+
img1_region_representation = multplier1 * img1_region_representation
|
|
162
|
+
|
|
163
|
+
return (
|
|
164
|
+
img0_resized,
|
|
165
|
+
img1_resized,
|
|
166
|
+
img0_region_source,
|
|
167
|
+
img1_region_source,
|
|
168
|
+
img0_region_representation,
|
|
169
|
+
img1_region_representation,
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
class ResizeVerticalAxisManipulation(ImagePairsManipulationBase):
|
|
174
|
+
def __init__(self, vertical_axis: int):
|
|
175
|
+
self.vertical_axis = vertical_axis
|
|
176
|
+
|
|
177
|
+
def output_shape(self, H: int, W: int) -> Tuple[int, int]:
|
|
178
|
+
"""
|
|
179
|
+
Compute the output shape of the image after the resize operation.
|
|
180
|
+
"""
|
|
181
|
+
|
|
182
|
+
resize_ratio = self.vertical_axis / H
|
|
183
|
+
|
|
184
|
+
return (self.vertical_axis, int(W * resize_ratio))
|
|
185
|
+
|
|
186
|
+
def check_input(self, H: int, W: int) -> bool:
|
|
187
|
+
return True
|
|
188
|
+
|
|
189
|
+
def __call__(
|
|
190
|
+
self,
|
|
191
|
+
img0: torch.Tensor,
|
|
192
|
+
img1: torch.Tensor,
|
|
193
|
+
img0_region_source: torch.Tensor,
|
|
194
|
+
img1_region_source: torch.Tensor,
|
|
195
|
+
img0_region_representation: torch.Tensor,
|
|
196
|
+
img1_region_representation: torch.Tensor,
|
|
197
|
+
):
|
|
198
|
+
"""
|
|
199
|
+
Apply resizing, cropping, and padding to image pairs while recording correspondence information.
|
|
200
|
+
|
|
201
|
+
Args:
|
|
202
|
+
- img0: Tensor of shape (B, H, W, C), dtype float32 or uint8 representing the first set of images.
|
|
203
|
+
- img1: Tensor of shape (B, H, W, C), dtype float32 or uint8 representing the second set of images.
|
|
204
|
+
- img0_region_source: Tensor of size 4 representing the region of img0 that is the source of the correspondence.
|
|
205
|
+
- img1_region_source: Tensor of size 4 representing the region of img1 that is the source of the correspondence.
|
|
206
|
+
- img0_region_representation: Tensor of size 4 representing the region of img0 in current representation space corresponding to the source region.
|
|
207
|
+
- img1_region_representation: Tensor of size 4 representing the region of img1 in current representation space corresponding to the source region.
|
|
208
|
+
Returns:
|
|
209
|
+
- img0: Tensor of image0 after manipulation.
|
|
210
|
+
- img1: Tensor of image1 after manipulation.
|
|
211
|
+
- img0_region_source: Tensor of size 4 representing the region of img0 that is the source of the correspondence.
|
|
212
|
+
- img1_region_source: Tensor of size 4 representing the region of img1 that is the source of the correspondence.
|
|
213
|
+
- img0_region_representation: Tensor of size 4 representing the region of img0 in current representation space corresponding to the source region.
|
|
214
|
+
- img1_region_representation: Tensor of size 4 representing the region of img1 in current representation space corresponding to the source region.
|
|
215
|
+
"""
|
|
216
|
+
# assert img0.shape == img1.shape, "Image shapes must match"
|
|
217
|
+
|
|
218
|
+
_, h0, w0, _ = img0.shape
|
|
219
|
+
_, h1, w1, _ = img1.shape
|
|
220
|
+
|
|
221
|
+
target_h0, target_w0, target_h1, target_w1 = self.output_shape_pairs(h0, w0, h1, w1)
|
|
222
|
+
|
|
223
|
+
assert img0.dtype == img1.dtype, "Image types must match"
|
|
224
|
+
is_uint8 = img0.dtype == torch.uint8
|
|
225
|
+
|
|
226
|
+
img0_resized = F.interpolate(
|
|
227
|
+
img0.permute(0, 3, 1, 2).float(), size=(target_h0, target_w0), mode="bilinear", align_corners=False
|
|
228
|
+
).permute(0, 2, 3, 1)
|
|
229
|
+
img1_resized = F.interpolate(
|
|
230
|
+
img1.permute(0, 3, 1, 2).float(), size=(target_h1, target_w1), mode="bilinear", align_corners=False
|
|
231
|
+
).permute(0, 2, 3, 1)
|
|
232
|
+
|
|
233
|
+
if is_uint8:
|
|
234
|
+
img0_resized = img0_resized.to(torch.uint8)
|
|
235
|
+
img1_resized = img1_resized.to(torch.uint8)
|
|
236
|
+
|
|
237
|
+
h_mult0 = target_h0 / h0
|
|
238
|
+
w_mult0 = target_w0 / w0
|
|
239
|
+
|
|
240
|
+
multplier0 = torch.tensor([h_mult0, h_mult0, w_mult0, w_mult0])
|
|
241
|
+
|
|
242
|
+
h_mult1 = target_h1 / h1
|
|
243
|
+
w_mult1 = target_w1 / w1
|
|
244
|
+
|
|
245
|
+
multplier1 = torch.tensor([h_mult1, h_mult1, w_mult1, w_mult1])
|
|
246
|
+
|
|
247
|
+
# source region is unchanged
|
|
248
|
+
# target region is scaled
|
|
249
|
+
img0_region_representation = multplier0 * img0_region_representation
|
|
250
|
+
img1_region_representation = multplier1 * img1_region_representation
|
|
251
|
+
|
|
252
|
+
return (
|
|
253
|
+
img0_resized,
|
|
254
|
+
img1_resized,
|
|
255
|
+
img0_region_source,
|
|
256
|
+
img1_region_source,
|
|
257
|
+
img0_region_representation,
|
|
258
|
+
img1_region_representation,
|
|
259
|
+
)
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
class ResizeToFixedManipulation(ImagePairsManipulationBase):
|
|
263
|
+
def __init__(self, target_shape: Tuple[int, int]):
|
|
264
|
+
self.target_shape = target_shape
|
|
265
|
+
|
|
266
|
+
def output_shape(self, H: int, W: int) -> Tuple[int, int]:
|
|
267
|
+
"""
|
|
268
|
+
Compute the output shape of the image after the resize operation.
|
|
269
|
+
"""
|
|
270
|
+
|
|
271
|
+
return self.target_shape
|
|
272
|
+
|
|
273
|
+
def check_input(self, H: int, W: int) -> bool:
|
|
274
|
+
return True
|
|
275
|
+
|
|
276
|
+
def __call__(
|
|
277
|
+
self,
|
|
278
|
+
img0: torch.Tensor,
|
|
279
|
+
img1: torch.Tensor,
|
|
280
|
+
img0_region_source: torch.Tensor,
|
|
281
|
+
img1_region_source: torch.Tensor,
|
|
282
|
+
img0_region_representation: torch.Tensor,
|
|
283
|
+
img1_region_representation: torch.Tensor,
|
|
284
|
+
):
|
|
285
|
+
"""
|
|
286
|
+
Apply resizing, cropping, and padding to image pairs while recording correspondence information.
|
|
287
|
+
|
|
288
|
+
Args:
|
|
289
|
+
- img0: Tensor of shape (B, H, W, C), dtype float32 or uint8 representing the first set of images.
|
|
290
|
+
- img1: Tensor of shape (B, H, W, C), dtype float32 or uint8 representing the second set of images.
|
|
291
|
+
- img0_region_source: Tensor of size 4 representing the region of img0 that is the source of the correspondence.
|
|
292
|
+
- img1_region_source: Tensor of size 4 representing the region of img1 that is the source of the correspondence.
|
|
293
|
+
- img0_region_representation: Tensor of size 4 representing the region of img0 in current representation space corresponding to the source region.
|
|
294
|
+
- img1_region_representation: Tensor of size 4 representing the region of img1 in current representation space corresponding to the source region.
|
|
295
|
+
Returns:
|
|
296
|
+
- img0: Tensor of image0 after manipulation.
|
|
297
|
+
- img1: Tensor of image1 after manipulation.
|
|
298
|
+
- img0_region_source: Tensor of size 4 representing the region of img0 that is the source of the correspondence.
|
|
299
|
+
- img1_region_source: Tensor of size 4 representing the region of img1 that is the source of the correspondence.
|
|
300
|
+
- img0_region_representation: Tensor of size 4 representing the region of img0 in current representation space corresponding to the source region.
|
|
301
|
+
- img1_region_representation: Tensor of size 4 representing the region of img1 in current representation space corresponding to the source region.
|
|
302
|
+
"""
|
|
303
|
+
# assert img0.shape == img1.shape, "Image shapes must match"
|
|
304
|
+
|
|
305
|
+
_, h0, w0, _ = img0.shape
|
|
306
|
+
_, h1, w1, _ = img1.shape
|
|
307
|
+
|
|
308
|
+
target_h0, target_w0, target_h1, target_w1 = self.output_shape_pairs(h0, w0, h1, w1)
|
|
309
|
+
|
|
310
|
+
assert img0.dtype == img1.dtype, "Image types must match"
|
|
311
|
+
is_uint8 = img0.dtype == torch.uint8
|
|
312
|
+
|
|
313
|
+
img0_resized = F.interpolate(
|
|
314
|
+
img0.permute(0, 3, 1, 2).float(),
|
|
315
|
+
size=(target_h0, target_w0),
|
|
316
|
+
mode="bilinear",
|
|
317
|
+
align_corners=False,
|
|
318
|
+
antialias=True,
|
|
319
|
+
).permute(0, 2, 3, 1)
|
|
320
|
+
img1_resized = F.interpolate(
|
|
321
|
+
img1.permute(0, 3, 1, 2).float(),
|
|
322
|
+
size=(target_h1, target_w1),
|
|
323
|
+
mode="bilinear",
|
|
324
|
+
align_corners=False,
|
|
325
|
+
antialias=True,
|
|
326
|
+
).permute(0, 2, 3, 1)
|
|
327
|
+
|
|
328
|
+
if is_uint8:
|
|
329
|
+
img0_resized = img0_resized.to(torch.uint8)
|
|
330
|
+
img1_resized = img1_resized.to(torch.uint8)
|
|
331
|
+
|
|
332
|
+
h_mult0 = target_h0 / h0
|
|
333
|
+
w_mult0 = target_w0 / w0
|
|
334
|
+
|
|
335
|
+
multplier0 = torch.tensor([h_mult0, h_mult0, w_mult0, w_mult0])
|
|
336
|
+
|
|
337
|
+
h_mult1 = target_h1 / h1
|
|
338
|
+
w_mult1 = target_w1 / w1
|
|
339
|
+
|
|
340
|
+
multplier1 = torch.tensor([h_mult1, h_mult1, w_mult1, w_mult1])
|
|
341
|
+
|
|
342
|
+
# source region is unchanged
|
|
343
|
+
# target region is scaled
|
|
344
|
+
img0_region_representation = (multplier0 * img0_region_representation).to(torch.int64)
|
|
345
|
+
img1_region_representation = (multplier1 * img1_region_representation).to(torch.int64)
|
|
346
|
+
|
|
347
|
+
return (
|
|
348
|
+
img0_resized,
|
|
349
|
+
img1_resized,
|
|
350
|
+
img0_region_source,
|
|
351
|
+
img1_region_source,
|
|
352
|
+
img0_region_representation,
|
|
353
|
+
img1_region_representation,
|
|
354
|
+
)
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
def scale_axis(
|
|
358
|
+
source_low: float,
|
|
359
|
+
source_high: float,
|
|
360
|
+
reference_low: float,
|
|
361
|
+
reference_high: float,
|
|
362
|
+
reference_low_new: float,
|
|
363
|
+
reference_high_new: float,
|
|
364
|
+
):
|
|
365
|
+
reference_length = reference_high - reference_low
|
|
366
|
+
coordinate_relative_low = (reference_low_new - reference_low) / reference_length
|
|
367
|
+
coordinate_relative_high = (reference_high_new - reference_low) / reference_length
|
|
368
|
+
|
|
369
|
+
source_length = source_high - source_low
|
|
370
|
+
source_low_new = source_low + coordinate_relative_low * source_length
|
|
371
|
+
source_high_new = source_low + coordinate_relative_high * source_length
|
|
372
|
+
|
|
373
|
+
return source_low_new, source_high_new
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
class CenterCropManipulation(ImagePairsManipulationBase):
|
|
377
|
+
def __init__(self, target_size: Tuple[int, int]):
|
|
378
|
+
self.target_size = target_size
|
|
379
|
+
|
|
380
|
+
def output_shape(self, H: int, W: int) -> Tuple[int, int]:
|
|
381
|
+
"""
|
|
382
|
+
Compute the output shape of the image after the resize operation.
|
|
383
|
+
"""
|
|
384
|
+
|
|
385
|
+
return self.target_size
|
|
386
|
+
|
|
387
|
+
def check_input(self, H: int, W: int) -> bool:
|
|
388
|
+
return H >= self.target_size[0] and W >= self.target_size[1]
|
|
389
|
+
|
|
390
|
+
def __call__(
|
|
391
|
+
self,
|
|
392
|
+
img0: torch.Tensor,
|
|
393
|
+
img1: torch.Tensor,
|
|
394
|
+
img0_region_source: torch.Tensor,
|
|
395
|
+
img1_region_source: torch.Tensor,
|
|
396
|
+
img0_region_representation: torch.Tensor,
|
|
397
|
+
img1_region_representation: torch.Tensor,
|
|
398
|
+
):
|
|
399
|
+
"""
|
|
400
|
+
Apply resizing, cropping, and padding to image pairs while recording correspondence information.
|
|
401
|
+
|
|
402
|
+
Args:
|
|
403
|
+
- img0: Tensor of shape (B, H, W, C), dtype uint8 representing the first set of images.
|
|
404
|
+
- img1: Tensor of shape (B, H, W, C), dtype uint8 representing the second set of images.
|
|
405
|
+
- img0_region_source: Tensor of size 4 representing the region of img0 that is the source of the correspondence.
|
|
406
|
+
- img1_region_source: Tensor of size 4 representing the region of img1 that is the source of the correspondence.
|
|
407
|
+
- img0_region_representation: Tensor of size 4 representing the region of img0 in current representation space corresponding to the source region.
|
|
408
|
+
- img1_region_representation: Tensor of size 4 representing the region of img1 in current representation space corresponding to the source region.
|
|
409
|
+
Returns:
|
|
410
|
+
- img0: Tensor of image0 after manipulation.
|
|
411
|
+
- img1: Tensor of image1 after manipulation.
|
|
412
|
+
- img0_region_source: Tensor of size 4 representing the region of img0 that is the source of the correspondence.
|
|
413
|
+
- img1_region_source: Tensor of size 4 representing the region of img1 that is the source of the correspondence.
|
|
414
|
+
- img0_region_representation: Tensor of size 4 representing the region of img0 in current representation space corresponding to the source region.
|
|
415
|
+
- img1_region_representation: Tensor of size 4 representing the region of img1 in current representation space corresponding to the source region.
|
|
416
|
+
"""
|
|
417
|
+
|
|
418
|
+
B0, H0, W0, C0 = img0.shape
|
|
419
|
+
B1, H1, W1, C1 = img1.shape
|
|
420
|
+
|
|
421
|
+
target_h, target_w = self.target_size
|
|
422
|
+
|
|
423
|
+
assert H0 >= target_h and W0 >= target_w, "Image shapes must be larger than the target size."
|
|
424
|
+
assert H1 >= target_h and W1 >= target_w, "Image shapes must be larger than the target size."
|
|
425
|
+
|
|
426
|
+
crop_top_0 = (H0 - target_h) // 2
|
|
427
|
+
crop_bottom_0 = H0 - target_h - crop_top_0
|
|
428
|
+
crop_left_0 = (W0 - target_w) // 2
|
|
429
|
+
crop_right_0 = W0 - target_w - crop_left_0
|
|
430
|
+
|
|
431
|
+
crop_top_1 = (H1 - target_h) // 2
|
|
432
|
+
crop_bottom_1 = H1 - target_h - crop_top_1
|
|
433
|
+
crop_left_1 = (W1 - target_w) // 2
|
|
434
|
+
crop_right_1 = W1 - target_w - crop_left_1
|
|
435
|
+
|
|
436
|
+
# apply the crops
|
|
437
|
+
img0_cropped = img0[:, crop_top_0 : H0 - crop_bottom_0, crop_left_0 : W0 - crop_right_0, :]
|
|
438
|
+
img1_cropped = img1[:, crop_top_1 : H1 - crop_bottom_1, crop_left_1 : W1 - crop_right_1, :]
|
|
439
|
+
|
|
440
|
+
# update the representation region accurately. This is complex as we may or may not crop out the valid regions.
|
|
441
|
+
remaining_region_0 = torch.tensor(
|
|
442
|
+
[
|
|
443
|
+
max(img0_region_representation[0], crop_top_0),
|
|
444
|
+
min(img0_region_representation[1], H0 - crop_bottom_0),
|
|
445
|
+
max(img0_region_representation[2], crop_left_0),
|
|
446
|
+
min(img0_region_representation[3], W0 - crop_right_0),
|
|
447
|
+
]
|
|
448
|
+
)
|
|
449
|
+
|
|
450
|
+
remaining_region_1 = torch.tensor(
|
|
451
|
+
[
|
|
452
|
+
max(img1_region_representation[0], crop_top_1),
|
|
453
|
+
min(img1_region_representation[1], H1 - crop_bottom_1),
|
|
454
|
+
max(img1_region_representation[2], crop_left_1),
|
|
455
|
+
min(img1_region_representation[3], W1 - crop_right_1),
|
|
456
|
+
]
|
|
457
|
+
)
|
|
458
|
+
|
|
459
|
+
# shift the remaining region as the cropped region is removed
|
|
460
|
+
img0_region_representation_new = remaining_region_0 - torch.tensor(
|
|
461
|
+
[crop_top_0, crop_top_0, crop_left_0, crop_left_0]
|
|
462
|
+
)
|
|
463
|
+
img1_region_representation_new = remaining_region_1 - torch.tensor(
|
|
464
|
+
[crop_top_1, crop_top_1, crop_left_1, crop_left_1]
|
|
465
|
+
)
|
|
466
|
+
|
|
467
|
+
img0_region_representation_new = img0_region_representation_new.to(torch.int64)
|
|
468
|
+
img1_region_representation_new = img1_region_representation_new.to(torch.int64)
|
|
469
|
+
|
|
470
|
+
# the valid region may or may not be cropped out, so we need to adjust the source region as well
|
|
471
|
+
img0_region_source[0], img0_region_source[1] = scale_axis(
|
|
472
|
+
img0_region_source[0],
|
|
473
|
+
img0_region_source[1],
|
|
474
|
+
img0_region_representation[0],
|
|
475
|
+
img0_region_representation[1],
|
|
476
|
+
remaining_region_0[0],
|
|
477
|
+
remaining_region_0[1],
|
|
478
|
+
)
|
|
479
|
+
|
|
480
|
+
img0_region_source[2], img0_region_source[3] = scale_axis(
|
|
481
|
+
img0_region_source[2],
|
|
482
|
+
img0_region_source[3],
|
|
483
|
+
img0_region_representation[2],
|
|
484
|
+
img0_region_representation[3],
|
|
485
|
+
remaining_region_0[2],
|
|
486
|
+
remaining_region_0[3],
|
|
487
|
+
)
|
|
488
|
+
|
|
489
|
+
img1_region_source[0], img1_region_source[1] = scale_axis(
|
|
490
|
+
img1_region_source[0],
|
|
491
|
+
img1_region_source[1],
|
|
492
|
+
img1_region_representation[0],
|
|
493
|
+
img1_region_representation[1],
|
|
494
|
+
remaining_region_1[0],
|
|
495
|
+
remaining_region_1[1],
|
|
496
|
+
)
|
|
497
|
+
|
|
498
|
+
img1_region_source[2], img1_region_source[3] = scale_axis(
|
|
499
|
+
img1_region_source[2],
|
|
500
|
+
img1_region_source[3],
|
|
501
|
+
img1_region_representation[2],
|
|
502
|
+
img1_region_representation[3],
|
|
503
|
+
remaining_region_1[2],
|
|
504
|
+
remaining_region_1[3],
|
|
505
|
+
)
|
|
506
|
+
|
|
507
|
+
return (
|
|
508
|
+
img0_cropped,
|
|
509
|
+
img1_cropped,
|
|
510
|
+
img0_region_source,
|
|
511
|
+
img1_region_source,
|
|
512
|
+
img0_region_representation_new,
|
|
513
|
+
img1_region_representation_new,
|
|
514
|
+
)
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
class ImagePairsManipulationComposite(ImagePairsManipulationBase):
|
|
518
|
+
def __init__(self, *manipulations: List[ImagePairsManipulationBase]):
|
|
519
|
+
self.manipulations = manipulations
|
|
520
|
+
|
|
521
|
+
def output_shape(self, H: int, W: int) -> Tuple[int, int]:
|
|
522
|
+
"""
|
|
523
|
+
Compute the output shape of the image after the resize operation.
|
|
524
|
+
"""
|
|
525
|
+
|
|
526
|
+
output_shape = (H, W)
|
|
527
|
+
for manipulation in self.manipulations:
|
|
528
|
+
output_shape = manipulation.output_shape(*output_shape)
|
|
529
|
+
|
|
530
|
+
return output_shape
|
|
531
|
+
|
|
532
|
+
def output_shape_pairs(self, H1: int, W1: int, H2: int, W2: int) -> Tuple[int, int, int, int]:
|
|
533
|
+
"""
|
|
534
|
+
Compute the output shape of the image after the resize operation.
|
|
535
|
+
"""
|
|
536
|
+
|
|
537
|
+
output_shape = (H1, W1, H2, W2)
|
|
538
|
+
for manipulation in self.manipulations:
|
|
539
|
+
output_shape = manipulation.output_shape_pairs(*output_shape)
|
|
540
|
+
|
|
541
|
+
return output_shape
|
|
542
|
+
|
|
543
|
+
def check_input(self, H: int, W: int) -> bool:
|
|
544
|
+
current_shape = (H, W)
|
|
545
|
+
for manipulation in self.manipulations:
|
|
546
|
+
if not manipulation.check_input(*current_shape):
|
|
547
|
+
return False
|
|
548
|
+
|
|
549
|
+
current_shape = manipulation.output_shape(*current_shape)
|
|
550
|
+
|
|
551
|
+
return True
|
|
552
|
+
|
|
553
|
+
def check_input_pairs(self, H1: int, W1: int, H2: int, W2: int) -> bool:
|
|
554
|
+
current_shape = (H1, W1, H2, W2)
|
|
555
|
+
for manipulation in self.manipulations:
|
|
556
|
+
if not manipulation.check_input_pairs(*current_shape):
|
|
557
|
+
return False
|
|
558
|
+
|
|
559
|
+
current_shape = manipulation.output_shape_pairs(*current_shape)
|
|
560
|
+
|
|
561
|
+
return True
|
|
562
|
+
|
|
563
|
+
def __call__(
|
|
564
|
+
self,
|
|
565
|
+
img0: torch.Tensor,
|
|
566
|
+
img1: torch.Tensor,
|
|
567
|
+
img0_region_source: torch.Tensor,
|
|
568
|
+
img1_region_source: torch.Tensor,
|
|
569
|
+
img0_region_representation: torch.Tensor,
|
|
570
|
+
img1_region_representation: torch.Tensor,
|
|
571
|
+
): # -> tuple[Tensor | Any, Tensor | Any, Tensor | Any, Tensor | ...:
|
|
572
|
+
"""
|
|
573
|
+
Apply resizing, cropping, and padding to image pairs while recording correspondence information.
|
|
574
|
+
|
|
575
|
+
Args:
|
|
576
|
+
- img0: Tensor of shape (B, H, W, C), dtype uint8 representing the first set of images.
|
|
577
|
+
- img1: Tensor of shape (B, H, W, C), dtype uint8 representing the second set of images.
|
|
578
|
+
- img0_region_source: Tensor of size 4 representing the region of img0 that is the source of the correspondence.
|
|
579
|
+
- img1_region_source: Tensor of size 4 representing the region of img1 that is the source of the correspondence.
|
|
580
|
+
- img0_region_representation: Tensor of size 4 representing the region of img0 in current representation space corresponding to the source region.
|
|
581
|
+
- img1_region_representation: Tensor of size 4 representing the region of img1 in current representation space corresponding to the source region.
|
|
582
|
+
Returns:
|
|
583
|
+
- img0: Tensor of image0 after manipulation.
|
|
584
|
+
- img1: Tensor of image1 after manipulation.
|
|
585
|
+
- img0_region_source: Tensor of size 4 representing the region of img0 that is the source of the correspondence.
|
|
586
|
+
- img1_region_source: Tensor of size 4 representing the region of img1 that is the source of the correspondence.
|
|
587
|
+
- img0_region_representation: Tensor of size 4 representing the region of img0 in current representation space corresponding to the source region.
|
|
588
|
+
- img1_region_representation: Tensor of size 4 representing the region of img1 in current representation space corresponding to the source region.
|
|
589
|
+
"""
|
|
590
|
+
|
|
591
|
+
for manipulation in self.manipulations:
|
|
592
|
+
(
|
|
593
|
+
img0,
|
|
594
|
+
img1,
|
|
595
|
+
img0_region_source,
|
|
596
|
+
img1_region_source,
|
|
597
|
+
img0_region_representation,
|
|
598
|
+
img1_region_representation,
|
|
599
|
+
) = manipulation(
|
|
600
|
+
img0,
|
|
601
|
+
img1,
|
|
602
|
+
img0_region_source,
|
|
603
|
+
img1_region_source,
|
|
604
|
+
img0_region_representation,
|
|
605
|
+
img1_region_representation,
|
|
606
|
+
)
|
|
607
|
+
|
|
608
|
+
return (
|
|
609
|
+
img0,
|
|
610
|
+
img1,
|
|
611
|
+
img0_region_source,
|
|
612
|
+
img1_region_source,
|
|
613
|
+
img0_region_representation,
|
|
614
|
+
img1_region_representation,
|
|
615
|
+
)
|
|
616
|
+
|
|
617
|
+
|
|
618
|
+
class AutomaticShapeSelection(ImagePairsManipulationBase):
|
|
619
|
+
def __init__(self, *manipulations: ImagePairsManipulationBase, strategy="closest_aspect"):
|
|
620
|
+
self.manipulations = manipulations
|
|
621
|
+
|
|
622
|
+
if strategy == "closest_aspect":
|
|
623
|
+
self.strategy = self._closest_aspect_strategy
|
|
624
|
+
else:
|
|
625
|
+
raise ValueError("Unknown strategy")
|
|
626
|
+
|
|
627
|
+
def output_shape(self, H: int, W: int) -> Tuple[int, int]:
|
|
628
|
+
"""
|
|
629
|
+
Compute the output shape of the image after the resize operation.
|
|
630
|
+
"""
|
|
631
|
+
|
|
632
|
+
output_shape, augmentor = self.strategy(H, W)
|
|
633
|
+
|
|
634
|
+
if output_shape is None:
|
|
635
|
+
raise ValueError("No valid shape found for the given resolution.")
|
|
636
|
+
|
|
637
|
+
return output_shape
|
|
638
|
+
|
|
639
|
+
def output_shape_pairs(self, H1: int, W1: int, H2: int, W2: int) -> Tuple[int, int, int, int]:
|
|
640
|
+
"""
|
|
641
|
+
Compute the output shape of the image after the resize operation.
|
|
642
|
+
"""
|
|
643
|
+
|
|
644
|
+
output_shape, augmentor = self.strategy(H1, W1, H2, W2)
|
|
645
|
+
|
|
646
|
+
if output_shape is None:
|
|
647
|
+
raise ValueError("No valid shape found for the given resolution.")
|
|
648
|
+
|
|
649
|
+
return output_shape
|
|
650
|
+
|
|
651
|
+
def check_input(self, H: int, W: int) -> bool:
|
|
652
|
+
output_shape, augmentor = self.strategy(H, W)
|
|
653
|
+
|
|
654
|
+
if output_shape is None:
|
|
655
|
+
return False
|
|
656
|
+
|
|
657
|
+
return True
|
|
658
|
+
|
|
659
|
+
def check_input_pairs(self, H1: int, W1: int, H2: int, W2: int) -> bool:
|
|
660
|
+
output_shape, augmentor = self.strategy(H1, W1, H2, W2)
|
|
661
|
+
|
|
662
|
+
if output_shape is None:
|
|
663
|
+
return False
|
|
664
|
+
|
|
665
|
+
return True
|
|
666
|
+
|
|
667
|
+
def _closest_aspect_strategy(self, H: int, W: int, *shape_img1):
|
|
668
|
+
# for all caididate sizes, first check if they can run at the given resolution
|
|
669
|
+
if shape_img1 is None:
|
|
670
|
+
runnable_sizes = [
|
|
671
|
+
(manipulator.output_shape(H, W, *shape_img1), manipulator)
|
|
672
|
+
for manipulator in self.manipulations
|
|
673
|
+
if manipulator.check_input(H, W, *shape_img1)
|
|
674
|
+
]
|
|
675
|
+
else:
|
|
676
|
+
runnable_sizes = [
|
|
677
|
+
(manipulator.output_shape_pairs(H, W, *shape_img1), manipulator)
|
|
678
|
+
for manipulator in self.manipulations
|
|
679
|
+
if manipulator.check_input_pairs(H, W, *shape_img1)
|
|
680
|
+
]
|
|
681
|
+
|
|
682
|
+
if len(runnable_sizes) == 0:
|
|
683
|
+
return None, None
|
|
684
|
+
|
|
685
|
+
# if there are runnable sizes, then select the one that is closest to the given resolution
|
|
686
|
+
if shape_img1 is None:
|
|
687
|
+
closest_size, closest_augmentor = min(runnable_sizes, key=lambda x: abs(x[0][0] / x[0][1] - H / W))
|
|
688
|
+
else:
|
|
689
|
+
closest_size, closest_augmentor = min(
|
|
690
|
+
runnable_sizes,
|
|
691
|
+
key=lambda x: abs(x[0][0] / x[0][1] - H / W) + abs(x[0][2] / x[0][3] - shape_img1[0] / shape_img1[1]),
|
|
692
|
+
)
|
|
693
|
+
|
|
694
|
+
return closest_size, closest_augmentor
|
|
695
|
+
|
|
696
|
+
def __call__(
|
|
697
|
+
self,
|
|
698
|
+
img0: torch.Tensor,
|
|
699
|
+
img1: torch.Tensor,
|
|
700
|
+
img0_region_source: Optional[torch.Tensor] = None,
|
|
701
|
+
img1_region_source: Optional[torch.Tensor] = None,
|
|
702
|
+
img0_region_representation: Optional[torch.Tensor] = None,
|
|
703
|
+
img1_region_representation: Optional[torch.Tensor] = None,
|
|
704
|
+
):
|
|
705
|
+
"""
|
|
706
|
+
Apply resizing, cropping, and padding to image pairs while recording correspondence information.
|
|
707
|
+
|
|
708
|
+
Args:
|
|
709
|
+
- img0: Tensor of shape (B, H, W, C), dtype uint8 representing the first set of images.
|
|
710
|
+
- img1: Tensor of shape (B, H, W, C), dtype uint8 representing the second set of images.
|
|
711
|
+
- img0_region_source: Tensor of size 4 representing the region of img0 that is the source of the correspondence.
|
|
712
|
+
- img1_region_source: Tensor of size 4 representing the region of img1 that is the source of the correspondence.
|
|
713
|
+
- img0_region_representation: Tensor of size 4 representing the region of img0 in current representation space corresponding to the source region.
|
|
714
|
+
- img1_region_representation: Tensor of size 4 representing the region of img1 in current representation space corresponding to the source region.
|
|
715
|
+
Returns:
|
|
716
|
+
- img0: Tensor of image0 after manipulation.
|
|
717
|
+
- img1: Tensor of image1 after manipulation.
|
|
718
|
+
- img0_region_source: Tensor of size 4 representing the region of img0 that is the source of the correspondence.
|
|
719
|
+
- img1_region_source: Tensor of size 4 representing the region of img1 that is the source of the correspondence.
|
|
720
|
+
- img0_region_representation: Tensor of size 4 representing the region of img0 in current representation space corresponding to the source region.
|
|
721
|
+
- img1_region_representation: Tensor of size 4 representing the region of img1 in current representation space corresponding to the source region.
|
|
722
|
+
"""
|
|
723
|
+
|
|
724
|
+
H0, W0 = img0.shape[1], img0.shape[2]
|
|
725
|
+
H1, W1 = img1.shape[1], img1.shape[2]
|
|
726
|
+
|
|
727
|
+
output_shape, augmentor = self.strategy(H0, W0, H1, W1)
|
|
728
|
+
|
|
729
|
+
if output_shape is None:
|
|
730
|
+
raise ValueError("No valid shape found for the given resolution.")
|
|
731
|
+
|
|
732
|
+
if img0_region_source is None:
|
|
733
|
+
assert img1_region_source is None
|
|
734
|
+
assert img0_region_representation is None
|
|
735
|
+
assert img1_region_representation is None
|
|
736
|
+
|
|
737
|
+
img0_region_source = torch.tensor([0, H0, 0, W0])
|
|
738
|
+
img1_region_source = torch.tensor([0, H1, 0, W1])
|
|
739
|
+
img0_region_representation = torch.tensor([0, H0, 0, W0])
|
|
740
|
+
img1_region_representation = torch.tensor([0, H1, 0, W1])
|
|
741
|
+
|
|
742
|
+
return augmentor(
|
|
743
|
+
img0, img1, img0_region_source, img1_region_source, img0_region_representation, img1_region_representation
|
|
744
|
+
)
|
|
745
|
+
|
|
746
|
+
|
|
747
|
+
# unmap the predicted flow to match the input. Flow is unique semantically as its value changes
|
|
748
|
+
# depending on the source and target region.
|
|
749
|
+
def unmap_predicted_flow(
|
|
750
|
+
flow: torch.Tensor,
|
|
751
|
+
img0_region_representation: torch.Tensor,
|
|
752
|
+
img1_region_representation: torch.Tensor,
|
|
753
|
+
img0_region_source: torch.Tensor,
|
|
754
|
+
img1_region_source: torch.Tensor,
|
|
755
|
+
img0_source_shape: Tuple[int, int],
|
|
756
|
+
img1_source_shape: Tuple[int, int],
|
|
757
|
+
):
|
|
758
|
+
"""
|
|
759
|
+
Unmap the predicted flow to the original image space.
|
|
760
|
+
|
|
761
|
+
Args:
|
|
762
|
+
- flow: Tensor of shape (B, 2, H, W) representing the predicted flow between the two regions.
|
|
763
|
+
- img0_region_representation: Tensor of size 4 representing the region of img0 in current representation space corresponding to the source region.
|
|
764
|
+
- img1_region_representation: Tensor of size 4 representing the region of img1 in current representation space corresponding to the source region.
|
|
765
|
+
- img0_region_source: Tensor of size 4 representing the region of img0 that is the source of the correspondence.
|
|
766
|
+
- img1_region_source: Tensor of size 4 representing the region of img1 that is the source of the correspondence.
|
|
767
|
+
Returns:
|
|
768
|
+
- flow: Tensor of shape (B, 2, H, W) representing the predicted flow in the original image space.
|
|
769
|
+
"""
|
|
770
|
+
|
|
771
|
+
B, C, H, W = flow.shape
|
|
772
|
+
|
|
773
|
+
# Step 1: Zero the start of flow representing mapping in model's output space
|
|
774
|
+
# the flow end is the source coordinates + the flow
|
|
775
|
+
flow_roi = flow[
|
|
776
|
+
...,
|
|
777
|
+
img0_region_representation[0] : img0_region_representation[1],
|
|
778
|
+
img0_region_representation[2] : img0_region_representation[3],
|
|
779
|
+
]
|
|
780
|
+
|
|
781
|
+
source_offset = torch.tensor([img0_region_source[2], img0_region_source[0]]).to(flow.device)
|
|
782
|
+
|
|
783
|
+
target_offset = torch.tensor([img1_region_source[2], img1_region_source[0]]).to(flow.device)
|
|
784
|
+
|
|
785
|
+
flow_valid2valid = flow_roi # + (source_offset - target_offset).view(1, 2, 1, 1)
|
|
786
|
+
|
|
787
|
+
# Step 2: Represent the flow as pairs of source and target coordinates
|
|
788
|
+
source_coordinates = (
|
|
789
|
+
torch.stack(
|
|
790
|
+
torch.meshgrid(
|
|
791
|
+
torch.arange(0, flow_valid2valid.shape[3]) + 0.5,
|
|
792
|
+
torch.arange(0, flow_valid2valid.shape[2]) + 0.5,
|
|
793
|
+
indexing="xy",
|
|
794
|
+
),
|
|
795
|
+
dim=-1,
|
|
796
|
+
)
|
|
797
|
+
.permute(2, 0, 1)
|
|
798
|
+
.unsqueeze(0)
|
|
799
|
+
.to(flow.device)
|
|
800
|
+
)
|
|
801
|
+
|
|
802
|
+
# Step 3: Scale the flow to the source space. Notice that here we can actually assume
|
|
803
|
+
# valid representation space have the same shape.
|
|
804
|
+
# So it looks like both source and target coordinates are scaled according to the source representation.
|
|
805
|
+
|
|
806
|
+
# now we scale the valid2valid flow from representation space to source space
|
|
807
|
+
source_valid_shape = torch.tensor(
|
|
808
|
+
[img0_region_source[1] - img0_region_source[0], img0_region_source[3] - img0_region_source[2]]
|
|
809
|
+
)
|
|
810
|
+
|
|
811
|
+
target_valid_shape = torch.tensor(
|
|
812
|
+
[img1_region_source[1] - img1_region_source[0], img1_region_source[3] - img1_region_source[2]]
|
|
813
|
+
)
|
|
814
|
+
|
|
815
|
+
# upscale source and target coordinates to the source space
|
|
816
|
+
source_coordinates_valid = F.interpolate(
|
|
817
|
+
source_coordinates.float(), size=source_valid_shape.tolist(), mode="bilinear", align_corners=False
|
|
818
|
+
)
|
|
819
|
+
|
|
820
|
+
# This is equivalently we define "target_coordinates = source_coordinates + flow_valid2valid" and apply the scaling.
|
|
821
|
+
# since we have a flow component, we can only do nearest interpolation, but this will cause ~0.5 pixel error
|
|
822
|
+
# because we are interpoling the source_coordinates also linearly.
|
|
823
|
+
|
|
824
|
+
target_coordinates_valid = (
|
|
825
|
+
F.interpolate(flow_valid2valid.float(), size=source_valid_shape.tolist(), mode="nearest")
|
|
826
|
+
+ source_coordinates_valid
|
|
827
|
+
)
|
|
828
|
+
|
|
829
|
+
# print("Change me to nearest interpolation")
|
|
830
|
+
|
|
831
|
+
# apply different scaling to the flow: representation for source maps to source_valid_shape in source space
|
|
832
|
+
source_coordinates_valid *= (
|
|
833
|
+
torch.tensor(
|
|
834
|
+
[
|
|
835
|
+
source_valid_shape[1] / (img0_region_representation[3] - img0_region_representation[2]),
|
|
836
|
+
source_valid_shape[0] / (img0_region_representation[1] - img0_region_representation[0]),
|
|
837
|
+
]
|
|
838
|
+
)
|
|
839
|
+
.view(1, 2, 1, 1)
|
|
840
|
+
.to(flow.device)
|
|
841
|
+
)
|
|
842
|
+
|
|
843
|
+
# target coordinates are scaled to the target source space, which may be different from the source space
|
|
844
|
+
target_coordinates_valid *= (
|
|
845
|
+
torch.tensor(
|
|
846
|
+
[
|
|
847
|
+
target_valid_shape[1] / (img0_region_representation[3] - img0_region_representation[2]),
|
|
848
|
+
target_valid_shape[0] / (img0_region_representation[1] - img0_region_representation[0]),
|
|
849
|
+
]
|
|
850
|
+
)
|
|
851
|
+
.view(1, 2, 1, 1)
|
|
852
|
+
.to(flow.device)
|
|
853
|
+
)
|
|
854
|
+
|
|
855
|
+
# Step 4: Offset the flow from valid source space to the original source space
|
|
856
|
+
source_coordinates_valid += (
|
|
857
|
+
torch.tensor([img0_region_source[2], img0_region_source[0]]).view(1, 2, 1, 1).to(flow.device)
|
|
858
|
+
)
|
|
859
|
+
|
|
860
|
+
target_coordinates_valid += (
|
|
861
|
+
torch.tensor([img1_region_source[2], img1_region_source[0]]).view(1, 2, 1, 1).to(flow.device)
|
|
862
|
+
)
|
|
863
|
+
|
|
864
|
+
# now we can compute the flow in the source space
|
|
865
|
+
flow_source = target_coordinates_valid - source_coordinates_valid
|
|
866
|
+
|
|
867
|
+
# Step5: Embed the flow in its original space
|
|
868
|
+
flow_output = torch.zeros((B, 2, img0_source_shape[0], img0_source_shape[1]), dtype=flow.dtype, device=flow.device)
|
|
869
|
+
|
|
870
|
+
flow_output[..., img0_region_source[0] : img0_region_source[1], img0_region_source[2] : img0_region_source[3]] = (
|
|
871
|
+
flow_source
|
|
872
|
+
)
|
|
873
|
+
|
|
874
|
+
flow_valid = torch.zeros((B, img0_source_shape[0], img0_source_shape[1]), dtype=torch.bool, device=flow.device)
|
|
875
|
+
flow_valid[..., img0_region_source[0] : img0_region_source[1], img0_region_source[2] : img0_region_source[3]] = True
|
|
876
|
+
|
|
877
|
+
return flow_output, flow_valid
|
|
878
|
+
|
|
879
|
+
|
|
880
|
+
# unmap predicted source - target point pairs.
|
|
881
|
+
def unmap_predicted_pairs(
|
|
882
|
+
source_points: torch.Tensor,
|
|
883
|
+
target_points: torch.Tensor,
|
|
884
|
+
img0_region_representation: torch.Tensor,
|
|
885
|
+
img1_region_representation: torch.Tensor,
|
|
886
|
+
img0_region_source: torch.Tensor,
|
|
887
|
+
img1_region_source: torch.Tensor,
|
|
888
|
+
img0_source_shape: Tuple[int, int],
|
|
889
|
+
img1_source_shape: Tuple[int, int],
|
|
890
|
+
):
|
|
891
|
+
"""
|
|
892
|
+
Unmap the predicted flow to the original image space.
|
|
893
|
+
|
|
894
|
+
Args:
|
|
895
|
+
- source_points: Tensor of shape (B, N, 2) representing the predicted source points.
|
|
896
|
+
- target_points: Tensor of shape (B, N, 2) representing the predicted target points.
|
|
897
|
+
- img0_region_representation: Tensor of size 4 representing the region of img0 in current representation space corresponding to the source region.
|
|
898
|
+
- img1_region_representation: Tensor of size 4 representing the region of img1 in current representation space corresponding to the source region.
|
|
899
|
+
- img0_region_source: Tensor of size 4 representing the region of img0 that is the source of the correspondence.
|
|
900
|
+
- img1_region_source: Tensor of size 4 representing the region of img1 that is the source of the correspondence.
|
|
901
|
+
Returns:
|
|
902
|
+
- flow: Tensor of shape (B, 2, H, W) representing the predicted flow in the original image space.
|
|
903
|
+
"""
|
|
904
|
+
|
|
905
|
+
# 1. scale source points & target points from representation space to source space
|
|
906
|
+
img0_region_source_shape = torch.tensor(
|
|
907
|
+
[img0_region_source[1] - img0_region_source[0], img0_region_source[3] - img0_region_source[2]]
|
|
908
|
+
)
|
|
909
|
+
|
|
910
|
+
img1_region_source_shape = torch.tensor(
|
|
911
|
+
[img1_region_source[1] - img1_region_source[0], img1_region_source[3] - img1_region_source[2]]
|
|
912
|
+
)
|
|
913
|
+
|
|
914
|
+
source_points[:, :, 0], _ = scale_axis(
|
|
915
|
+
img0_region_source[2],
|
|
916
|
+
img0_region_source[3],
|
|
917
|
+
img0_region_representation[2],
|
|
918
|
+
img0_region_representation[3],
|
|
919
|
+
source_points[:, :, 0],
|
|
920
|
+
0.0,
|
|
921
|
+
)
|
|
922
|
+
|
|
923
|
+
source_points[:, :, 1], _ = scale_axis(
|
|
924
|
+
img0_region_source[0],
|
|
925
|
+
img0_region_source[1],
|
|
926
|
+
img0_region_representation[0],
|
|
927
|
+
img0_region_representation[1],
|
|
928
|
+
source_points[:, :, 1],
|
|
929
|
+
0.0,
|
|
930
|
+
)
|
|
931
|
+
|
|
932
|
+
target_points[:, :, 0], _ = scale_axis(
|
|
933
|
+
img1_region_source[2],
|
|
934
|
+
img1_region_source[3],
|
|
935
|
+
img1_region_representation[2],
|
|
936
|
+
img1_region_representation[3],
|
|
937
|
+
target_points[:, :, 0],
|
|
938
|
+
0.0,
|
|
939
|
+
)
|
|
940
|
+
|
|
941
|
+
target_points[:, :, 1], _ = scale_axis(
|
|
942
|
+
img1_region_source[0],
|
|
943
|
+
img1_region_source[1],
|
|
944
|
+
img1_region_representation[0],
|
|
945
|
+
img1_region_representation[1],
|
|
946
|
+
target_points[:, :, 1],
|
|
947
|
+
0.0,
|
|
948
|
+
)
|
|
949
|
+
|
|
950
|
+
return source_points, target_points
|
|
951
|
+
|
|
952
|
+
|
|
953
|
+
# unmap normal channels like confidence, depth, etc.
|
|
954
|
+
# much simpler than the flow case
|
|
955
|
+
def unmap_predicted_channels(
|
|
956
|
+
channel: torch.Tensor,
|
|
957
|
+
img0_region_representation: torch.Tensor,
|
|
958
|
+
img0_region_source: torch.Tensor,
|
|
959
|
+
img0_source_shape: Tuple[int, int],
|
|
960
|
+
):
|
|
961
|
+
"""
|
|
962
|
+
Unmap the predicted flow to the original image space.
|
|
963
|
+
|
|
964
|
+
Args:
|
|
965
|
+
- channel: Tensor of shape (B, C, H, W) representing the predicted values in img0 representation space
|
|
966
|
+
- img0_region_representation: Tensor of size 4 representing the region of img0 in current representation space corresponding to the source region.
|
|
967
|
+
- img0_region_source: Tensor of size 4 representing the region of img0 that is the source of the correspondence.
|
|
968
|
+
- img0_source_shape: Tuple of size 2 representing the shape of the original image.
|
|
969
|
+
Returns:
|
|
970
|
+
- channel: Tensor of shape (B, C, H, W) representing the predicted flow in the original image space.
|
|
971
|
+
- channel_valid: Tensor of shape (B, H, W) representing the valid region of the channel in the original image space.
|
|
972
|
+
"""
|
|
973
|
+
|
|
974
|
+
B, C, H, W = channel.shape
|
|
975
|
+
|
|
976
|
+
# Step 1: Zero the start of flow representing mapping in model's output space
|
|
977
|
+
# the flow end is the source coordinates + the flow
|
|
978
|
+
channel_roi = channel[
|
|
979
|
+
...,
|
|
980
|
+
img0_region_representation[0] : img0_region_representation[1],
|
|
981
|
+
img0_region_representation[2] : img0_region_representation[3],
|
|
982
|
+
]
|
|
983
|
+
|
|
984
|
+
# upscale the channel roi into source space roi
|
|
985
|
+
img0_valid_shape = torch.tensor(
|
|
986
|
+
[img0_region_source[1] - img0_region_source[0], img0_region_source[3] - img0_region_source[2]]
|
|
987
|
+
)
|
|
988
|
+
|
|
989
|
+
channel_source_roi = F.interpolate(
|
|
990
|
+
channel_roi,
|
|
991
|
+
size=img0_valid_shape.tolist(),
|
|
992
|
+
mode="nearest",
|
|
993
|
+
# align_corners=False
|
|
994
|
+
)
|
|
995
|
+
|
|
996
|
+
channel_output = torch.zeros(
|
|
997
|
+
(B, C, img0_source_shape[0], img0_source_shape[1]), dtype=channel.dtype, device=channel.device
|
|
998
|
+
)
|
|
999
|
+
channel_output[
|
|
1000
|
+
..., img0_region_source[0] : img0_region_source[1], img0_region_source[2] : img0_region_source[3]
|
|
1001
|
+
] = channel_source_roi
|
|
1002
|
+
|
|
1003
|
+
channel_valid = torch.zeros(
|
|
1004
|
+
(B, img0_source_shape[0], img0_source_shape[1]), dtype=torch.bool, device=channel.device
|
|
1005
|
+
)
|
|
1006
|
+
channel_valid[..., img0_region_source[0] : img0_region_source[1], img0_region_source[2] : img0_region_source[3]] = (
|
|
1007
|
+
True
|
|
1008
|
+
)
|
|
1009
|
+
|
|
1010
|
+
return channel_output, channel_valid
|
|
1011
|
+
|
|
1012
|
+
|
|
1013
|
+
if __name__ == "__main__":
|
|
1014
|
+
import sys
|
|
1015
|
+
|
|
1016
|
+
import matplotlib.pyplot as plt
|
|
1017
|
+
import numpy as np
|
|
1018
|
+
import torch
|
|
1019
|
+
import torch.nn.functional as F
|
|
1020
|
+
|
|
1021
|
+
# make a example test image that have flow in only one pixel from (25%, 25%) to (50%, 75%) of the image.
|
|
1022
|
+
img0 = torch.zeros((1, 145, 256, 3), dtype=torch.uint8) # one below and one above the aspect (288, 512)
|
|
1023
|
+
img1 = torch.zeros((1, 135, 256, 3), dtype=torch.uint8)
|
|
1024
|
+
|
|
1025
|
+
source_pt = img0.shape[1] * 0.25, img0.shape[2] * 0.25
|
|
1026
|
+
target_pt = img1.shape[1] * 0.5, img1.shape[2] * 0.75
|
|
1027
|
+
|
|
1028
|
+
img0[0, int(source_pt[0]), int(source_pt[1]), :] = 255
|
|
1029
|
+
img1[0, int(target_pt[0]), int(target_pt[1]), :] = 255
|
|
1030
|
+
|
|
1031
|
+
flow_gt = torch.zeros((1, 2, 145, 256))
|
|
1032
|
+
flow_gt[0, :, int(source_pt[0]), int(source_pt[1])] = torch.tensor(
|
|
1033
|
+
[target_pt[1] - source_pt[1], target_pt[0] - source_pt[0]]
|
|
1034
|
+
)
|
|
1035
|
+
|
|
1036
|
+
H0, W0 = img0.shape[1], img0.shape[2]
|
|
1037
|
+
H1, W1 = img1.shape[1], img1.shape[2]
|
|
1038
|
+
|
|
1039
|
+
manipulation = AutomaticShapeSelection(
|
|
1040
|
+
ImagePairsManipulationComposite(ResizeHorizontalAxisManipulation(512), CenterCropManipulation((288, 512))),
|
|
1041
|
+
ImagePairsManipulationComposite(ResizeHorizontalAxisManipulation(512), CenterCropManipulation((200, 512))),
|
|
1042
|
+
)
|
|
1043
|
+
|
|
1044
|
+
(
|
|
1045
|
+
img0_resized,
|
|
1046
|
+
img1_resized,
|
|
1047
|
+
img0_region_source,
|
|
1048
|
+
img1_region_source,
|
|
1049
|
+
img0_region_representation,
|
|
1050
|
+
img1_region_representation,
|
|
1051
|
+
) = manipulation(img0, img1)
|
|
1052
|
+
|
|
1053
|
+
fig, axs = plt.subplots(2, 3)
|
|
1054
|
+
|
|
1055
|
+
axs[0, 0].imshow(img0[0].numpy())
|
|
1056
|
+
axs[0, 1].imshow(img0_resized[0].numpy())
|
|
1057
|
+
|
|
1058
|
+
axs[1, 0].imshow(img1[0].numpy())
|
|
1059
|
+
axs[1, 1].imshow(img1_resized[0].numpy())
|
|
1060
|
+
|
|
1061
|
+
print(img0_region_source)
|
|
1062
|
+
print(img1_region_source)
|
|
1063
|
+
print(img0_region_representation)
|
|
1064
|
+
print(img1_region_representation)
|
|
1065
|
+
|
|
1066
|
+
flow_pred = torch.zeros((1, 2, 288, 512))
|
|
1067
|
+
flow_pred[0, :, 28, 128] = torch.tensor([256, 72])
|
|
1068
|
+
|
|
1069
|
+
# unmap the flow
|
|
1070
|
+
flow_unmapped = unmap_predicted_flow(
|
|
1071
|
+
flow_pred,
|
|
1072
|
+
img0_region_representation,
|
|
1073
|
+
img1_region_representation,
|
|
1074
|
+
img0_region_source,
|
|
1075
|
+
img1_region_source,
|
|
1076
|
+
(H0, W0),
|
|
1077
|
+
(H1, W1),
|
|
1078
|
+
)
|
|
1079
|
+
|
|
1080
|
+
flow_unmapped, flow_validity = flow_unmapped
|
|
1081
|
+
flow_unmapped = flow_unmapped[0]
|
|
1082
|
+
flow_validity = flow_validity[0]
|
|
1083
|
+
|
|
1084
|
+
import flow_vis
|
|
1085
|
+
|
|
1086
|
+
flow_rgb = flow_vis.flow_to_color(flow_unmapped.permute(1, 2, 0).numpy())
|
|
1087
|
+
axs[0, 2].imshow(flow_validity)
|
|
1088
|
+
|
|
1089
|
+
plt.figure()
|
|
1090
|
+
plt.imshow(flow_rgb)
|
|
1091
|
+
plt.show()
|