### Train on ScanNet Source: https://github.com/apple/ml-aspanformer/blob/main/docs/TRAINING.md Run the provided training script for ScanNet. ```shell scripts/reproduce_train/indoor.sh ``` -------------------------------- ### Train on MegaDepth Source: https://github.com/apple/ml-aspanformer/blob/main/docs/TRAINING.md Run the provided training script for MegaDepth. ```shell scripts/reproduce_train/outdoor.sh ``` -------------------------------- ### Build dataset symlinks Source: https://github.com/apple/ml-aspanformer/blob/main/docs/TRAINING.md Create symlinks in the ASpanFormer data directory for ScanNet and MegaDepth training/test data and dataset indices. ```shell # scannet # -- # train and test dataset ln -s /path/to/scannet_train/* /path/to/ASpanFormer/data/scannet/train ln -s /path/to/scannet_test/* /path/to/ASpanFormer/data/scannet/test # -- # dataset indices ln -s /path/to/scannet_indices/* /path/to/ASpanFormer/data/scannet/index # megadepth # -- # train and test dataset (train and test share the same dataset) ln -sv /path/to/megadepth/phoenix /path/to/megadepth_d2net/Undistorted_SfM /path/to/ASpanFormer/data/megadepth/train ln -sv /path/to/megadepth/phoenix /path/to/megadepth_d2net/Undistorted_SfM /path/to/ASpanFormer/data/megadepth/test # -- # dataset indices ln -s /path/to/megadepth_indices/* /path/to/ASpanFormer/data/megadepth/index ``` -------------------------------- ### Extract dataset indices Source: https://github.com/apple/ml-aspanformer/blob/main/docs/TRAINING.md Unzip the downloaded dataset indices and extract the training and optional testing data archives for MegaDepth and ScanNet. ```shell unzip downloaded-file.zip # extract dataset indices tar xf train-data/megadepth_indices.tar tar xf train-data/scannet_indices.tar # extract testing data (optional) tar xf testdata/megadepth_test_1500.tar tar xf testdata/scannet_test_1500.tar ``` -------------------------------- ### Run demo for one image pair Source: https://github.com/apple/ml-aspanformer/blob/main/README.md Runs the demo script to match a single image pair. Execute from the demo directory. ```bash cd demo python demo.py ``` -------------------------------- ### Create and activate conda environment Source: https://github.com/apple/ml-aspanformer/blob/main/README.md Creates a conda environment from environment.yaml and activates it. Run from the project root. ```bash conda env create -f environment.yaml conda activate ASpanFormer ``` -------------------------------- ### Run ScanNet training Source: https://github.com/apple/ml-aspanformer/blob/main/README.md Runs the ScanNet training script. ```bash cd scripts/reproduce_train bash indoor.sh ``` -------------------------------- ### Run MegaDepth training Source: https://github.com/apple/ml-aspanformer/blob/main/README.md Runs the MegaDepth training script. ```bash cd scripts/reproduce_train bash outdoor.sh ``` -------------------------------- ### Extract model weights Source: https://github.com/apple/ml-aspanformer/blob/main/README.md Extracts the downloaded weights archive into the current directory. ```bash tar -xvf weights_aspanformer.tar ``` -------------------------------- ### Run ScanNet evaluation Source: https://github.com/apple/ml-aspanformer/blob/main/README.md Runs the ScanNet evaluation script. Expected results are shown in the following output block. ```bash cd scripts/reproduce_test bash indoor.sh ``` -------------------------------- ### Citation for ASpanFormer paper Source: https://github.com/apple/ml-aspanformer/blob/main/README.md BibTeX entry for citing the ASpanFormer paper. ```bibtex @article{chen2022aspanformer, title={ASpanFormer: Detector-Free Image Matching with Adaptive Span Transformer}, author={Chen, Hongkai and Luo, Zixin and Zhou, Lei and Tian, Yurun and Zhen, Mingmin and Fang, Tian and McKinnon, David and Tsin, Yanghai and Quan, Long}, journal={European Conference on Computer Vision (ECCV)}, year={2022} } ``` -------------------------------- ### Run MegaDepth evaluation Source: https://github.com/apple/ml-aspanformer/blob/main/README.md Runs the MegaDepth evaluation script. Expected results are shown in the following output block. ```bash cd scripts/reproduce_test bash outdoor.sh ``` -------------------------------- ### ScanNet evaluation expected output Source: https://github.com/apple/ml-aspanformer/blob/main/README.md Expected evaluation metrics for ScanNet, including AUC and precision values. ```bash 'auc@10': 0.46640095171012563, 'auc@20': 0.6407042320049785, 'auc@5': 0.26241231577189295, 'prec@5e-04': 0.8827665604024288, 'prec_flow@2e-03': 0.810938751342228 ``` -------------------------------- ### MegaDepth evaluation expected output Source: https://github.com/apple/ml-aspanformer/blob/main/README.md Expected evaluation metrics for MegaDepth, including AUC and precision values. ```bash 'auc@10': 0.7184113573584142, 'auc@20': 0.8333835724453831, 'auc@5': 0.5567622479156181, 'prec@5e-04': 0.9901741341790503, 'prec_flow@2e-03': 0.7188964321862907 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.