├── .gitignore ├── LICENSE ├── README.md ├── Train_model_frontend_all.py ├── Train_model_frontend_all_ang.py ├── Train_model_heatmap_all.py ├── Train_model_heatmap_all_ang.py ├── Train_model_subpixel.py ├── Val_model_heatmap.py ├── Val_model_subpixel.py ├── configs ├── classical_descriptors.yaml ├── magicpoint_coco_export.yaml ├── magicpoint_kitti_export.yaml ├── magicpoint_kitti_train.yaml ├── magicpoint_repeatability_heatmap.yaml ├── magicpoint_repeatability_heatmap_export.yaml ├── magicpoint_shapes_pair.yaml ├── superpoint_coco_train_heatmap.yaml ├── superpoint_coco_train_heatmap_ang.yaml ├── superpoint_coco_train_heatmap_ang_sem.yaml ├── superpoint_coco_train_wsem_heatmap.yaml ├── superpoint_kitti_train_heatmap.yaml └── superpoint_tum_train_heatmap.yaml ├── convert2script.py ├── datasets ├── Apollo.py ├── Coco.py ├── Coco_sem.py ├── Kitti_inh.py ├── SyntheticDataset_gaussian.py ├── Tum.py ├── __init__.py ├── base_dataset.py ├── data_tools.py ├── kitti │ ├── 2011_09_26_drive_0001_sync_02 │ │ ├── 0000000000.jpg │ │ ├── 0000000000.npy │ │ ├── 0000000001.jpg │ │ ├── 0000000001.npy │ │ ├── 0000000002.jpg │ │ ├── 0000000002.npy │ │ ├── 0000000003.jpg │ │ ├── 0000000003.npy │ │ ├── 0000000004.jpg │ │ ├── 0000000004.npy │ │ ├── 0000000005.jpg │ │ ├── 0000000005.npy │ │ ├── 0000000006.jpg │ │ ├── 0000000006.npy │ │ ├── 0000000007.jpg │ │ ├── 0000000007.npy │ │ ├── 0000000008.jpg │ │ ├── 0000000008.npy │ │ ├── 0000000009.jpg │ │ ├── 0000000009.npy │ │ ├── 0000000010.jpg │ │ ├── 0000000010.npy │ │ ├── 0000000011.jpg │ │ ├── 0000000011.npy │ │ ├── 0000000012.jpg │ │ ├── 0000000012.npy │ │ ├── 0000000013.jpg │ │ ├── 0000000013.npy │ │ ├── 0000000014.jpg │ │ ├── 0000000014.npy │ │ ├── 0000000015.jpg │ │ ├── 0000000015.npy │ │ ├── 0000000016.jpg │ │ ├── 0000000016.npy │ │ ├── 0000000017.jpg │ │ ├── 0000000017.npy │ │ ├── 0000000018.jpg │ │ ├── 0000000018.npy │ │ ├── 0000000019.jpg │ │ ├── 0000000019.npy │ │ ├── 0000000020.jpg │ │ ├── 0000000020.npy │ │ ├── 0000000021.jpg │ │ ├── 0000000021.npy │ │ ├── 0000000022.jpg │ │ ├── 0000000022.npy │ │ ├── 0000000023.jpg │ │ ├── 0000000023.npy │ │ ├── 0000000024.jpg │ │ ├── 0000000024.npy │ │ ├── 0000000025.jpg │ │ ├── 0000000025.npy │ │ ├── 0000000026.jpg │ │ ├── 0000000026.npy │ │ ├── 0000000027.jpg │ │ ├── 0000000027.npy │ │ ├── 0000000028.jpg │ │ ├── 0000000028.npy │ │ ├── 0000000029.jpg │ │ ├── 0000000029.npy │ │ ├── 0000000030.jpg │ │ ├── 0000000030.npy │ │ ├── 0000000031.jpg │ │ ├── 0000000031.npy │ │ ├── 0000000032.jpg │ │ ├── 0000000032.npy │ │ ├── 0000000033.jpg │ │ ├── 0000000033.npy │ │ ├── 0000000034.jpg │ │ ├── 0000000034.npy │ │ ├── 0000000035.jpg │ │ ├── 0000000035.npy │ │ ├── 0000000036.jpg │ │ ├── 0000000036.npy │ │ ├── 0000000037.jpg │ │ ├── 0000000037.npy │ │ ├── 0000000038.jpg │ │ ├── 0000000038.npy │ │ ├── 0000000039.jpg │ │ ├── 0000000039.npy │ │ ├── 0000000040.jpg │ │ ├── 0000000040.npy │ │ ├── 0000000041.jpg │ │ ├── 0000000041.npy │ │ ├── 0000000042.jpg │ │ ├── 0000000042.npy │ │ ├── 0000000043.jpg │ │ ├── 0000000043.npy │ │ ├── 0000000044.jpg │ │ ├── 0000000044.npy │ │ ├── 0000000045.jpg │ │ ├── 0000000045.npy │ │ ├── 0000000046.jpg │ │ ├── 0000000046.npy │ │ ├── 0000000047.jpg │ │ ├── 0000000047.npy │ │ ├── 0000000048.jpg │ │ ├── 0000000048.npy │ │ ├── 0000000049.jpg │ │ ├── 0000000049.npy │ │ ├── 0000000050.jpg │ │ ├── 0000000050.npy │ │ ├── 0000000051.jpg │ │ ├── 0000000051.npy │ │ ├── 0000000052.jpg │ │ ├── 0000000052.npy │ │ ├── 0000000053.jpg │ │ ├── 0000000053.npy │ │ ├── 0000000054.jpg │ │ ├── 0000000054.npy │ │ ├── 0000000055.jpg │ │ ├── 0000000055.npy │ │ ├── 0000000056.jpg │ │ ├── 0000000056.npy │ │ ├── 0000000057.jpg │ │ ├── 0000000057.npy │ │ ├── 0000000058.jpg │ │ ├── 0000000058.npy │ │ ├── 0000000059.jpg │ │ ├── 0000000059.npy │ │ ├── 0000000060.jpg │ │ ├── 0000000060.npy │ │ ├── 0000000061.jpg │ │ ├── 0000000061.npy │ │ ├── 0000000062.jpg │ │ ├── 0000000062.npy │ │ ├── 0000000063.jpg │ │ ├── 0000000063.npy │ │ ├── 0000000064.jpg │ │ ├── 0000000064.npy │ │ ├── 0000000065.jpg │ │ ├── 0000000065.npy │ │ ├── 0000000066.jpg │ │ ├── 0000000066.npy │ │ ├── 0000000067.jpg │ │ ├── 0000000067.npy │ │ ├── 0000000068.jpg │ │ ├── 0000000068.npy │ │ ├── 0000000069.jpg │ │ ├── 0000000069.npy │ │ ├── 0000000070.jpg │ │ ├── 0000000070.npy │ │ ├── 0000000071.jpg │ │ ├── 0000000071.npy │ │ ├── 0000000072.jpg │ │ ├── 0000000072.npy │ │ ├── 0000000073.jpg │ │ ├── 0000000073.npy │ │ ├── 0000000074.jpg │ │ ├── 0000000074.npy │ │ ├── 0000000075.jpg │ │ ├── 0000000075.npy │ │ ├── 0000000076.jpg │ │ ├── 0000000076.npy │ │ ├── 0000000077.jpg │ │ ├── 0000000077.npy │ │ ├── 0000000078.jpg │ │ ├── 0000000078.npy │ │ ├── 0000000079.jpg │ │ ├── 0000000079.npy │ │ ├── 0000000080.jpg │ │ ├── 0000000080.npy │ │ ├── 0000000081.jpg │ │ ├── 0000000081.npy │ │ ├── 0000000082.jpg │ │ ├── 0000000082.npy │ │ ├── 0000000083.jpg │ │ ├── 0000000083.npy │ │ ├── 0000000084.jpg │ │ ├── 0000000084.npy │ │ ├── 0000000085.jpg │ │ ├── 0000000085.npy │ │ ├── 0000000086.jpg │ │ ├── 0000000086.npy │ │ ├── 0000000087.jpg │ │ ├── 0000000087.npy │ │ ├── 0000000088.jpg │ │ ├── 0000000088.npy │ │ ├── 0000000089.jpg │ │ ├── 0000000089.npy │ │ ├── 0000000090.jpg │ │ ├── 0000000090.npy │ │ ├── 0000000091.jpg │ │ ├── 0000000091.npy │ │ ├── 0000000092.jpg │ │ ├── 0000000092.npy │ │ ├── 0000000093.jpg │ │ ├── 0000000093.npy │ │ ├── 0000000094.jpg │ │ ├── 0000000094.npy │ │ ├── 0000000095.jpg │ │ ├── 0000000095.npy │ │ ├── 0000000096.jpg │ │ ├── 0000000096.npy │ │ ├── 0000000097.jpg │ │ ├── 0000000097.npy │ │ ├── 0000000098.jpg │ │ ├── 0000000098.npy │ │ ├── 0000000099.jpg │ │ ├── 0000000099.npy │ │ ├── 0000000100.jpg │ │ ├── 0000000100.npy │ │ ├── 0000000101.jpg │ │ ├── 0000000101.npy │ │ ├── 0000000102.jpg │ │ ├── 0000000102.npy │ │ ├── 0000000103.jpg │ │ ├── 0000000103.npy │ │ ├── 0000000104.jpg │ │ ├── 0000000104.npy │ │ ├── 0000000105.jpg │ │ ├── 0000000105.npy │ │ ├── 0000000106.jpg │ │ ├── 0000000106.npy │ │ ├── 0000000107.jpg │ │ ├── 0000000107.npy │ │ ├── cam.txt │ │ └── poses.txt │ ├── kitti_test │ │ ├── 0000000000.npz │ │ ├── 0000000000_0.png │ │ ├── 0000000000_1.png │ │ └── test.txt │ └── train.txt ├── kitti_split │ ├── train.txt │ └── val.txt ├── patches_dataset.py ├── synthetic_dataset.py ├── synthetic_shapes.py ├── tum_split │ ├── train.txt │ └── val.txt └── utils │ ├── __init__.py │ ├── augmentation_legacy.py │ ├── photometric_augmentation.py │ ├── pipeline.py │ └── util.py ├── evaluation.py ├── evaluations ├── descriptor_evaluation.py └── detector_evaluation.py ├── export.py ├── export_classical.py ├── export_eval.py ├── imgs ├── HPATCHES.png ├── SLAM.png └── SSp.png ├── logs ├── magicpoint_synth20 │ └── checkpoints │ │ └── superPointNet_200000_checkpoint.pth.tar ├── magicpoint_synth_t2 │ ├── checkpoints │ │ └── superPointNet_100000_checkpoint.pth.tar │ └── config.yml ├── superpoint_coco_2017_ML22 │ ├── checkpoints │ │ ├── results.csv │ │ └── superPointNet_185000_checkpoint.pth.tar │ └── config.yml └── superpoint_coco_ssmall_ML22 │ ├── checkpoints │ ├── results.csv │ └── superPointNet_180000_checkpoint.pth.tar │ └── config.yml ├── models ├── SubpixelNet.py ├── SuperPointNet.py ├── SuperPointNet_gauss2.py ├── SuperPointNet_gauss2_ssmall.py ├── SuperPointNet_pretrained.py ├── __init__.py ├── classical_detectors_descriptors.py ├── homographies.py ├── model_utils.py ├── model_wrap.py ├── senner_models.py └── unet_parts.py ├── pretrained └── superpoint_v1.pth ├── requirements.txt ├── requirements_torch.txt ├── run_export.sh ├── settings.py ├── test ├── sample_homography.py └── visualize_warping.py ├── train4.py ├── train_tutorial.md └── utils ├── __init__.py ├── coco_labels.py ├── correspondence_tools ├── __init__.py ├── __pycache__ │ ├── __init__.cpython-38.pyc │ └── correspondence_finder.cpython-38.pyc ├── correspondence_augmentation.py ├── correspondence_finder.py └── correspondence_plotter.py ├── cp_labels.py ├── d2s.py ├── draw.py ├── homographies.py ├── loader.py ├── logging.py ├── loss_functions ├── __init__.py ├── __pycache__ │ ├── __init__.cpython-38.pyc │ ├── pixelwise_contrastive_loss.cpython-38.pyc │ └── sparse_loss.cpython-38.pyc ├── loss_composer.py ├── pixelwise_contrastive_loss.py └── sparse_loss.py ├── losses.py ├── photometric.py ├── photometric_augmentation.py ├── print_tool.py ├── tools.py ├── utils.py └── var_dim.py /.gitignore: -------------------------------------------------------------------------------- 1 | datasets/HPatches 2 | datasets/hpatches-* 3 | runs/ 4 | 5 | # Byte-compiled / optimized / DLL files 6 | __pycache__/ 7 | *.py[cod] 8 | *$py.class 9 | 10 | # C extensions 11 | *.so 12 | 13 | # Distribution / packaging 14 | .Python 15 | build/ 16 | develop-eggs/ 17 | dist/ 18 | downloads/ 19 | eggs/ 20 | .eggs/ 21 | lib/ 22 | lib64/ 23 | parts/ 24 | sdist/ 25 | var/ 26 | wheels/ 27 | share/python-wheels/ 28 | *.egg-info/ 29 | .installed.cfg 30 | *.egg 31 | MANIFEST 32 | 33 | # PyInstaller 34 | # Usually these files are written by a python script from a template 35 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 36 | *.manifest 37 | *.spec 38 | 39 | # Installer logs 40 | pip-log.txt 41 | pip-delete-this-directory.txt 42 | 43 | # Unit test / coverage reports 44 | htmlcov/ 45 | .tox/ 46 | .nox/ 47 | .coverage 48 | .coverage.* 49 | .cache 50 | nosetests.xml 51 | coverage.xml 52 | *.cover 53 | *.py,cover 54 | .hypothesis/ 55 | .pytest_cache/ 56 | cover/ 57 | 58 | # Translations 59 | *.mo 60 | *.pot 61 | 62 | # Django stuff: 63 | *.log 64 | local_settings.py 65 | db.sqlite3 66 | db.sqlite3-journal 67 | 68 | # Flask stuff: 69 | instance/ 70 | .webassets-cache 71 | 72 | # Scrapy stuff: 73 | .scrapy 74 | 75 | # Sphinx documentation 76 | docs/_build/ 77 | 78 | # PyBuilder 79 | .pybuilder/ 80 | target/ 81 | 82 | # Jupyter Notebook 83 | .ipynb_checkpoints 84 | 85 | # IPython 86 | profile_default/ 87 | ipython_config.py 88 | 89 | # pyenv 90 | # For a library or package, you might want to ignore these files since the code is 91 | # intended to run in multiple environments; otherwise, check them in: 92 | # .python-version 93 | 94 | # pipenv 95 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 96 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 97 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 98 | # install all needed dependencies. 99 | #Pipfile.lock 100 | 101 | # poetry 102 | # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. 103 | # This is especially recommended for binary packages to ensure reproducibility, and is more 104 | # commonly ignored for libraries. 105 | # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control 106 | #poetry.lock 107 | 108 | # pdm 109 | # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. 110 | #pdm.lock 111 | # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it 112 | # in version control. 113 | # https://pdm.fming.dev/#use-with-ide 114 | .pdm.toml 115 | 116 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm 117 | __pypackages__/ 118 | 119 | # Celery stuff 120 | celerybeat-schedule 121 | celerybeat.pid 122 | 123 | # SageMath parsed files 124 | *.sage.py 125 | 126 | # Environments 127 | .env 128 | .venv 129 | env/ 130 | venv/ 131 | ENV/ 132 | env.bak/ 133 | venv.bak/ 134 | 135 | # Spyder project settings 136 | .spyderproject 137 | .spyproject 138 | 139 | # Rope project settings 140 | .ropeproject 141 | 142 | # mkdocs documentation 143 | /site 144 | 145 | # mypy 146 | .mypy_cache/ 147 | .dmypy.json 148 | dmypy.json 149 | 150 | # Pyre type checker 151 | .pyre/ 152 | 153 | # pytype static type analyzer 154 | .pytype/ 155 | 156 | # Cython debug symbols 157 | cython_debug/ 158 | 159 | # PyCharm 160 | # JetBrains specific template is maintained in a separate JetBrains.gitignore that can 161 | # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore 162 | # and can be added to the global gitignore or merged into this file. For a more nuclear 163 | # option (not recommended) you can uncomment the following to ignore the entire idea folder. 164 | #.idea/ -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Eric Jau 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Val_model_subpixel.py: -------------------------------------------------------------------------------- 1 | """script for subpixel experiment (not tested) 2 | """ 3 | 4 | import numpy as np 5 | import torch 6 | from torch.autograd import Variable 7 | import torch.backends.cudnn as cudnn 8 | import torch.optim 9 | import torch.nn as nn 10 | import torch.nn.functional as F 11 | import torch.utils.data 12 | from tqdm import tqdm 13 | from utils.loader import dataLoader, modelLoader, pretrainedLoader 14 | import logging 15 | 16 | from utils.tools import dict_update 17 | 18 | from utils.utils import labels2Dto3D, flattenDetection, labels2Dto3D_flattened 19 | 20 | from utils.utils import pltImshow, saveImg 21 | from utils.utils import precisionRecall_torch 22 | from utils.utils import save_checkpoint 23 | 24 | from pathlib import Path 25 | 26 | @torch.no_grad() 27 | class Val_model_subpixel(object): 28 | def __init__(self, config, device='cpu', verbose=False): 29 | self.config = config 30 | self.model = self.config['name'] 31 | self.params = self.config['params'] 32 | self.weights_path = self.config['pretrained'] 33 | self.device=device 34 | pass 35 | 36 | 37 | def loadModel(self): 38 | # model = 'SuperPointNet' 39 | # params = self.config['model']['subpixel']['params'] 40 | from utils.loader import modelLoader 41 | self.net = modelLoader(model=self.model, **self.params) 42 | 43 | checkpoint = torch.load(self.weights_path, 44 | map_location=lambda storage, loc: storage) 45 | self.net.load_state_dict(checkpoint['model_state_dict']) 46 | 47 | self.net = self.net.to(self.device) 48 | logging.info('successfully load pretrained model from: %s', self.weights_path) 49 | pass 50 | 51 | def extract_patches(self, label_idx, img): 52 | """ 53 | input: 54 | label_idx: tensor [N, 4]: (batch, 0, y, x) 55 | img: tensor [batch, channel(1), H, W] 56 | """ 57 | from utils.losses import extract_patches 58 | patch_size = self.config['params']['patch_size'] 59 | patches = extract_patches(label_idx.to(self.device), img.to(self.device), 60 | patch_size=patch_size) 61 | return patches 62 | pass 63 | 64 | def run(self, patches): 65 | """ 66 | 67 | 68 | """ 69 | with torch.no_grad(): 70 | pred_res = self.net(patches) 71 | return pred_res 72 | pass 73 | 74 | 75 | if __name__ == '__main__': 76 | # filename = 'configs/magicpoint_shapes_subpix.yaml' 77 | filename = 'configs/magicpoint_repeatability.yaml' 78 | import yaml 79 | device = torch.device("cuda" if torch.cuda.is_available() else "cpu") 80 | 81 | torch.set_default_tensor_type(torch.FloatTensor) 82 | with open(filename, 'r') as f: 83 | config = yaml.load(f) 84 | 85 | task = config['data']['dataset'] 86 | # data loading 87 | from utils.loader import dataLoader_test as dataLoader 88 | data = dataLoader(config, dataset='hpatches') 89 | test_set, test_loader = data['test_set'], data['test_loader'] 90 | 91 | # take one sample 92 | for i, sample in tqdm(enumerate(test_loader)): 93 | if i>1: break 94 | 95 | 96 | val_agent = Val_model_subpixel(config['subpixel'], device=device) 97 | val_agent.loadModel() 98 | # points from heatmap 99 | img = sample['image'] 100 | print("image: ", img.shape) 101 | points = torch.tensor([[1,2], [3,4]]) 102 | def points_to_4d(points): 103 | num_of_points = points.shape[0] 104 | cols = torch.zeros(num_of_points, 1).float() 105 | points = torch.cat((cols, cols, points.float()), dim=1) 106 | return points 107 | label_idx = points_to_4d(points) 108 | # concat points to be (batch, 0, y, x) 109 | patches = val_agent.extract_patches(label_idx, img) 110 | points_res = val_agent.run(patches) 111 | 112 | 113 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /configs/classical_descriptors.yaml: -------------------------------------------------------------------------------- 1 | data: 2 | name: 'patches_dataset' 3 | dataset: 'hpatches' # 'hpatches' 'coco' 4 | alteration: 'all' # 'i' 'v' 'all' 5 | cache_in_memory: false 6 | validation_size: 100 7 | preprocessing: 8 | resize: [240, 320] # False for coco 9 | # resize: [480, 640] # False for coco 10 | model: 11 | name: 'classical_detectors_descriptors' 12 | method: 'sift' # 'orb' 'sift' 13 | batch_size: 1 # unused 14 | learning_rate: 0.001 # unused 15 | nms: 4 16 | top_k: 1000 17 | eval_iter: 600 18 | seed: 1 19 | -------------------------------------------------------------------------------- /configs/magicpoint_coco_export.yaml: -------------------------------------------------------------------------------- 1 | data: 2 | dataset: 'Coco' # 'coco' 'hpatches' 3 | export_folder: 'train' # train, val 4 | preprocessing: 5 | # resize: [120, 160] 6 | resize: [240, 320] 7 | # resize: [480, 640] 8 | gaussian_label: 9 | enable: false # false 10 | sigma: 1. 11 | augmentation: 12 | photometric: 13 | enable: false 14 | homography_adaptation: 15 | enable: true 16 | num: 100 # 100 17 | aggregation: 'sum' 18 | filter_counts: 0 19 | homographies: 20 | params: 21 | translation: true 22 | rotation: true 23 | scaling: true 24 | perspective: true 25 | scaling_amplitude: 0.2 26 | perspective_amplitude_x: 0.2 27 | perspective_amplitude_y: 0.2 28 | allow_artifacts: true 29 | patch_ratio: 0.85 30 | 31 | training: 32 | workers_test: 2 33 | 34 | model: 35 | # name: 'SuperPointNet' # 'SuperPointNet_gauss2' 36 | name: 'SuperPointNet_gauss2' # 'SuperPointNet_gauss2' 37 | params: { 38 | } 39 | batch_size: 1 40 | eval_batch_size: 1 41 | detection_threshold: 0.015 # 0.015 42 | nms: 4 43 | top_k: 600 44 | subpixel: 45 | enable: true 46 | 47 | pretrained: 'logs/magicpoint_synth20/checkpoints/superPointNet_200000_checkpoint.pth.tar' # 'SuperPointNet' 48 | 49 | -------------------------------------------------------------------------------- /configs/magicpoint_kitti_export.yaml: -------------------------------------------------------------------------------- 1 | data: 2 | # name: 'kitti' 3 | dataset: 'Kitti_inh' # 'coco' 'hpatches', 'Kitti', '' 4 | export_folder: 'train' 5 | alteration: 'all' # 'all' 'i' 'v' 6 | root: 'datasets/kitti_wVal' # root for dataset 7 | root_split_txt: 'datasets/kitti_split' # split file provided in datasets/kitti_split 8 | preprocessing: 9 | resize: [384, 1248] # hand defined, original: [375, 1242] 10 | # resize: [192, 624] # hand defined 11 | # resize: [96, 312] # hand defined 12 | gaussian_label: 13 | enable: false # false 14 | sigma: 1. 15 | homography_adaptation: 16 | enable: true 17 | num: 20 # 100 18 | aggregation: 'sum' 19 | filter_counts: 0 20 | homographies: 21 | params: 22 | translation: true 23 | rotation: true 24 | scaling: true 25 | perspective: true 26 | scaling_amplitude: 0.2 27 | perspective_amplitude_x: 0.2 28 | perspective_amplitude_y: 0.2 29 | allow_artifacts: true 30 | patch_ratio: 0.85 31 | # name: 'coco' 32 | # cache_in_memory: false 33 | # validation_size: 100 34 | model: 35 | # name: 'SuperPointNet' # need to use old version of network 36 | name: 'SuperPointNet_gauss2' # 'SuperPointNet_gauss2' 37 | batch_size: 1 38 | detection_threshold: 0.015 # 0.015 39 | nms: 4 40 | top_k: 600 # no use 41 | 42 | params: {} 43 | subpixel: 44 | enable: false 45 | 46 | # eval_iter: -1 47 | 48 | # pretrained: 'logs/magicpoint_synth20/checkpoints/superPointNet_200000_checkpoint.pth.tar' 49 | pretrained: 'logs/magicpoint_synth_t2/checkpoints/superPointNet_100000_checkpoint.pth.tar' 50 | 51 | 52 | -------------------------------------------------------------------------------- /configs/magicpoint_kitti_train.yaml: -------------------------------------------------------------------------------- 1 | data: 2 | name: 'kitti' 3 | dataset: 'kitti' # 'coco' 'hpatches' 4 | # labels: superpoint_base199_homoAdapt_coco_top600_resize/predictions # Complete with your export labels 5 | # labels: superpoint_kitti-test/predictions 6 | # labels: magicpoint_synth20_homoAdapt100_kitti/predictions 7 | labels: magicpoint_synth20_homoAdapt100_kitti_r0.5/predictions_wVal 8 | 9 | 10 | validation_size: 192 11 | preprocessing: 12 | # resize: [192, 624] 13 | resize: [96, 312] 14 | gaussian_label: 15 | enable: false # false 16 | sigma: 1. 17 | augmentation: 18 | photometric: 19 | enable: true 20 | enable_train: true 21 | enable_val: false 22 | primitives: [ 23 | 'random_brightness', 'random_contrast', 'additive_speckle_noise', 24 | 'additive_gaussian_noise', 'additive_shade', 'motion_blur' ] 25 | params: 26 | random_brightness: {max_abs_change: 50} 27 | random_contrast: {strength_range: [0.3, 1.5]} 28 | additive_gaussian_noise: {stddev_range: [0, 10]} 29 | additive_speckle_noise: {prob_range: [0, 0.0035]} 30 | additive_shade: 31 | transparency_range: [-0.5, 0.5] 32 | kernel_size_range: [100, 150] 33 | motion_blur: {max_kernel_size: 3} 34 | homographic: 35 | enable: true # true 36 | enable_train: true 37 | enable_val: false 38 | params: 39 | translation: true 40 | rotation: true 41 | scaling: true 42 | perspective: true 43 | scaling_amplitude: 0.2 44 | perspective_amplitude_x: 0.2 45 | perspective_amplitude_y: 0.2 46 | patch_ratio: 0.85 47 | max_angle: 1.57 48 | allow_artifacts: true 49 | valid_border_margin: 3 50 | 51 | warped_pair: 52 | enable: false 53 | params: 54 | translation: true 55 | rotation: true 56 | scaling: true 57 | perspective: true 58 | scaling_amplitude: 0.2 59 | perspective_amplitude_x: 0.2 60 | perspective_amplitude_y: 0.2 61 | patch_ratio: 0.85 62 | max_angle: 1.57 63 | allow_artifacts: true # true 64 | valid_border_margin: 3 65 | 66 | model: 67 | name: 'magic_point' 68 | batch_size: 32 # 32 69 | eval_batch_size: 32 70 | learning_rate: 0.001 71 | detection_threshold: 0.001 # 0.015 72 | nms: 4 73 | # top_k: 300 74 | retrain: false # set true for new model 75 | reset_iter: true 76 | #pretrained: 'logs/magicpoint_coco/checkpoints/superPointNet_529_checkpoint.pth.tar' 77 | # pretrained: 'logs/magicpoint_synth_rui_thres4_softmaxce/checkpoints/superPointNet_200007_checkpoint.pth.tar' 78 | # pretrained: '/home/yoyee/Documents/deepSfm/logs/magicpoint_synth15/checkpoints/superPointNet_200208_checkpoint.pth.tar' 79 | # pretrained: '/home/yoyee/Documents/deepSfm/logs/magicpoint_synth14/checkpoints/superPointNet_200111_checkpoint.pth.tar' 80 | # pretrained: 'logs/magicpoint_coco5/checkpoints/superPointNet_84608_checkpoint.pth.tar' 81 | #pretrained: 'pretrained/superpoint_v1.pth' 82 | # 83 | pretrained: 'logs/magicpoint_synth20/checkpoints/superPointNet_200000_checkpoint.pth.tar' 84 | 85 | train_iter: 200000 86 | # validation_interval: 1000 87 | validation_interval: 500 # 500 # one validation of entire val set every N training steps 88 | train_show_interval: 1000 # one show of the current training from to Tensorboard every N training steps 89 | -------------------------------------------------------------------------------- /configs/magicpoint_repeatability_heatmap.yaml: -------------------------------------------------------------------------------- 1 | data: 2 | name: 'patches_dataset' 3 | dataset: 'hpatches' # 'coco' 'hpatches' 4 | alteration: 'all' # 'all' 'i' 'v' 5 | preprocessing: 6 | # resize: [120, 160] # [120, 160] for HPatches and False for coco 7 | resize: [240, 320] # [240, 320] for HPatches and False for coco 8 | # resize: [480, 640] # [240, 320] for HPatches and False for coco 9 | # labels: magicpoint_synth20_homoAdapt100_coco/predictions # for coco 10 | 11 | front_end_model: 'Val_model_heatmap' # 'Train_model_frontend' 12 | model: 13 | # name: 'magic_point' 14 | # name: 'SuperPointNet_gauss2' # SuperPointNet_heatmap 15 | # name: 'SuperPointNet_pretrained' 16 | name: 'SuperPointNet_gauss2_ssmall' # SuperPointNet_heatmap 17 | params: { 18 | } 19 | 20 | # learning_rate: 0.0001 # 0.0001 21 | detection_threshold: 0.015 # 0.015 22 | 23 | batch_size: 1 24 | eval_batch_size: 1 25 | # output parameters 26 | learning_rate: 0.001 27 | detection_threshold: 0.015 # 0.001 28 | nms: 4 29 | top_k: 1000 30 | nn_thresh: 1.0 # 0.7 31 | homography_adaptation: 32 | num: 0 33 | subpixel: 34 | enable: true 35 | patch_size: 5 36 | rand_noise: 37 | enable: false 38 | sigma: 0.2 39 | 40 | # pretrained: pretrained/superpoint_v1.pth 41 | pretrained: logs/superpoint_coco_ssmall_ML22/checkpoints/superPointNet_180000_checkpoint.pth.tar 42 | 43 | 44 | 45 | 46 | eval_iter: 1000 47 | -------------------------------------------------------------------------------- /configs/magicpoint_repeatability_heatmap_export.yaml: -------------------------------------------------------------------------------- 1 | data: 2 | name: 'patches_dataset' 3 | dataset: 'hpatches' # 'coco' 'hpatches' 4 | alteration: 'all' # 'all' 'i' 'v' 5 | preprocessing: 6 | # resize: [120, 160] # [120, 160] for HPatches and False for coco 7 | resize: [240, 320] # [240, 320] for HPatches and False for coco 8 | # resize: [480, 640] # [240, 320] for HPatches and False for coco 9 | 10 | front_end_model: 'Val_model_heatmap' # 'Train_model_frontend' 11 | model: 12 | # name: 'magic_point' 13 | # name: 'SuperPointNet_pretrained' # SuperPointNet_heatmap 14 | name: 'SuperPointNet_gauss2' # SuperPointNet_heatmap 15 | # name: 'SuperPointNet_gauss2_ssmall' 16 | params: { 17 | } 18 | 19 | # learning_rate: 0.0001 # 0.0001 20 | detection_threshold: 0.015 # 0.015 21 | 22 | batch_size: 1 23 | eval_batch_size: 1 24 | # output parameters 25 | learning_rate: 0.001 26 | detection_threshold: 0.015 # 0.001 27 | nms: 4 28 | top_k: 1000 29 | nn_thresh: 1.0 # 0.7 30 | homography_adaptation: 31 | num: 0 32 | subpixel: 33 | enable: true 34 | patch_size: 5 35 | rand_noise: 36 | enable: false 37 | sigma: 0.2 38 | 39 | # folder: 'logs/superpoint_coco_normal_1_1_200k/checkpoints/' 40 | folder: 'logs/superpoint_coco_2017_ML22/checkpoints/' 41 | # folder: 'logs/superpoint_coco_ssmall_ML22/checkpoints/' 42 | pretrained: 'finds in program' 43 | 44 | 45 | eval_iter: 1000 46 | -------------------------------------------------------------------------------- /configs/magicpoint_shapes_pair.yaml: -------------------------------------------------------------------------------- 1 | data: 2 | # name: 'synthetic_shapes' 3 | dataset: 'SyntheticDataset_gaussian' 4 | primitives: 'all' 5 | truncate: {draw_ellipses: 0.3, draw_stripes: 0.2, gaussian_noise: 0.1} 6 | cache_in_memory: true 7 | suffix: 'v6' 8 | add_augmentation_to_test_set: false # set to true to evaluate with noise 9 | gaussian_label: 10 | enable: false 11 | params: 12 | GaussianBlur: {sigma: 0.2} 13 | preprocessing: ## didn't do this 14 | blur_size: 21 15 | resize: [120, 160] 16 | augmentation: 17 | photometric: 18 | enable: true ## for class to recognize 19 | enable_train: true 20 | enable_val: false 21 | primitives: [ 22 | 'random_brightness', 'random_contrast', 'additive_speckle_noise', 23 | 'additive_gaussian_noise', 'additive_shade', 'motion_blur' ] 24 | params: 25 | random_brightness: {max_abs_change: 75} 26 | random_contrast: {strength_range: [0.3, 1.8]} 27 | additive_gaussian_noise: {stddev_range: [0, 15]} 28 | additive_speckle_noise: {prob_range: [0, 0.0035]} 29 | additive_shade: 30 | transparency_range: [-0.5, 0.8] 31 | kernel_size_range: [50, 100] 32 | motion_blur: {max_kernel_size: 7} # origin 7 33 | homographic: 34 | enable: true 35 | enable_train: true 36 | enable_val: false 37 | params: 38 | translation: true 39 | rotation: true 40 | scaling: true 41 | perspective: true 42 | scaling_amplitude: 0.2 43 | perspective_amplitude_x: 0.2 44 | perspective_amplitude_y: 0.2 45 | patch_ratio: 0.8 46 | max_angle: 1.57 # 3.14 47 | allow_artifacts: true 48 | translation_overflow: 0.05 49 | valid_border_margin: 2 50 | warped_pair: 51 | enable: false # false when training only on detector 52 | params: 53 | translation: true 54 | rotation: true 55 | scaling: true 56 | perspective: true 57 | scaling_amplitude: 0.2 58 | perspective_amplitude_x: 0.2 59 | perspective_amplitude_y: 0.2 60 | patch_ratio: 0.85 61 | max_angle: 1.57 62 | allow_artifacts: true # true 63 | valid_border_margin: 3 64 | 65 | front_end_model: 'Train_model_heatmap' # 'Train_model_frontend' 66 | 67 | model: 68 | name: 'SuperPointNet_gauss2' 69 | params: { 70 | } 71 | detector_loss: 72 | loss_type: 'softmax' 73 | 74 | batch_size: 64 # 64 75 | eval_batch_size: 16 76 | learning_rate: 0.001 77 | kernel_reg: 0. 78 | detection_threshold: 0.001 # 1/65 79 | nms: 4 80 | lambda_loss: 0 # disable descriptor loss 81 | dense_loss: 82 | enable: false 83 | params: 84 | descriptor_dist: 4 # 4, 7.5 85 | lambda_d: 800 # 800 86 | sparse_loss: 87 | enable: true 88 | params: 89 | num_matching_attempts: 1000 90 | num_masked_non_matches_per_match: 100 91 | lamda_d: 1 92 | dist: 'cos' 93 | method: '2d' 94 | other_settings: 'train 2d, gauss 0.5' 95 | 96 | retrain: True # set true for new model 97 | reset_iter: True 98 | 99 | train_iter: 200000 # 200000 100 | tensorboard_interval: 1000 # 200 101 | save_interval: 2000 # 2000 102 | validation_interval: 1000 # one validation of entire val set every N training steps 103 | validation_size: 10 104 | train_show_interval: 1000 # one show of the current training from to Tensorboard every N training steps 105 | seed: 0 106 | 107 | # pretrained: 'logs/superpoint_syn_heat1_0/checkpoints/superPointNet_100000_checkpoint.pth.tar' 108 | 109 | -------------------------------------------------------------------------------- /configs/superpoint_coco_train_heatmap.yaml: -------------------------------------------------------------------------------- 1 | data: 2 | # name: 'coco' 3 | dataset: 'Coco' # 'coco' 4 | semantic: false 5 | 6 | # labels: datasets/magicpoint_synth20_homoAdapt100_coco_f1/predictions 7 | labels: logs/magicpoint_synth_homoAdapt_coco/predictions 8 | root: # datasets/COCO 9 | root_split_txt: # /datasets/COCO 10 | 11 | gaussian_label: 12 | enable: true 13 | params: 14 | GaussianBlur: {sigma: 0.2} 15 | 16 | 17 | cache_in_memory: false 18 | preprocessing: 19 | # resize: [120, 160] 20 | resize: [240, 320] 21 | # resize: [480, 640] 22 | augmentation: 23 | photometric: 24 | enable: true 25 | primitives: [ 26 | 'random_brightness', 'random_contrast', 'additive_speckle_noise', 27 | 'additive_gaussian_noise', 'additive_shade', 'motion_blur'] 28 | params: 29 | random_brightness: {max_abs_change: 50} 30 | random_contrast: {strength_range: [0.5, 1.5]} 31 | additive_gaussian_noise: {stddev_range: [0, 10]} 32 | additive_speckle_noise: {prob_range: [0, 0.0035]} 33 | additive_shade: 34 | transparency_range: [-0.5, 0.5] 35 | kernel_size_range: [100, 150] 36 | motion_blur: {max_kernel_size: 3} 37 | homographic: 38 | enable: false # not implemented 39 | warped_pair: 40 | enable: true 41 | params: 42 | translation: true 43 | rotation: true 44 | scaling: true 45 | perspective: true 46 | scaling_amplitude: 0.2 47 | perspective_amplitude_x: 0.2 48 | perspective_amplitude_y: 0.2 49 | patch_ratio: 0.85 50 | max_angle: 1.57 51 | allow_artifacts: true # true 52 | valid_border_margin: 3 53 | 54 | front_end_model: 'Train_model_heatmap_all' # 'Train_model_frontend' 55 | 56 | training: 57 | workers_train: 16 58 | workers_val: 2 # 2 59 | 60 | model: 61 | # name: 'magic_point' 62 | # name: 'SuperPointNet_heatmap' 63 | name: 'SuperPointNet_gauss2' 64 | # name: 'SuperPointNet_pretrained' 65 | params: { 66 | } 67 | detector_loss: 68 | loss_type: 'softmax' 69 | 70 | 71 | batch_size: 16 # 32 #batch size in the GPU memory - only for training - ITER VARIABLES ARE MODIFIED IN CODE ACCORDINGLY 72 | real_batch_size: 16 73 | eval_batch_size: 5 # 32 74 | learning_rate: 0.001 # 0.0001 75 | detection_threshold: 0.015 # 0.015 76 | lambda_loss: 1 # 1 77 | nms: 4 78 | dense_loss: 79 | enable: false 80 | params: 81 | descriptor_dist: 4 # 4, 7.5 82 | lambda_d: 800 # 800 83 | sparse_loss: 84 | enable: true 85 | params: 86 | num_matching_attempts: 1000 87 | num_masked_non_matches_per_match: 100 88 | lamda_d: 1 #1 89 | dist: 'cos' 90 | method: '2d' 91 | other_settings: 'train 2d, gauss 0.2' 92 | 93 | multi_task_loss: true 94 | 95 | # subpixel: 96 | # enable: false 97 | # params: 98 | # subpixel_channel: 2 99 | # settings: 'predict flow directly' 100 | # loss_func: 'subpixel_loss_no_argmax' # subpixel_loss, subpixel_loss_no_argmax 101 | 102 | retrain: True # set true for new model 103 | reset_iter: True # set true to set the iteration number to 0 104 | train_iter: 200000 #200000 # 170000 105 | validation_interval: 1000 # 2000 106 | tensorboard_interval: 200 # 200 107 | save_interval: 5000 # 2000 108 | validation_size: 10 109 | 110 | pretrained: 111 | 112 | 113 | 114 | -------------------------------------------------------------------------------- /configs/superpoint_coco_train_heatmap_ang.yaml: -------------------------------------------------------------------------------- 1 | data: 2 | # name: 'coco' 3 | dataset: 'Coco' # 'coco' 4 | semantic: false 5 | 6 | # labels: datasets/magicpoint_synth20_homoAdapt100_coco_f1/predictions 7 | labels: logs/magicpoint_synth_homoAdapt_coco/predictions 8 | root: # datasets/COCO 9 | root_split_txt: # /datasets/COCO 10 | 11 | gaussian_label: 12 | enable: true 13 | params: 14 | GaussianBlur: {sigma: 0.2} 15 | 16 | 17 | cache_in_memory: false 18 | preprocessing: 19 | # resize: [120, 160] 20 | resize: [240, 320] 21 | # resize: [480, 640] 22 | augmentation: 23 | photometric: 24 | enable: true 25 | primitives: [ 26 | 'random_brightness', 'random_contrast', 'additive_speckle_noise', 27 | 'additive_gaussian_noise', 'additive_shade', 'motion_blur'] 28 | params: 29 | random_brightness: {max_abs_change: 50} 30 | random_contrast: {strength_range: [0.5, 1.5]} 31 | additive_gaussian_noise: {stddev_range: [0, 10]} 32 | additive_speckle_noise: {prob_range: [0, 0.0035]} 33 | additive_shade: 34 | transparency_range: [-0.5, 0.5] 35 | kernel_size_range: [100, 150] 36 | motion_blur: {max_kernel_size: 3} 37 | homographic: 38 | enable: false # not implemented 39 | warped_pair: 40 | enable: true 41 | params: 42 | translation: true 43 | rotation: true 44 | scaling: true 45 | perspective: true 46 | scaling_amplitude: 0.2 47 | perspective_amplitude_x: 0.2 48 | perspective_amplitude_y: 0.2 49 | patch_ratio: 0.85 50 | max_angle: 1.57 51 | allow_artifacts: true # true 52 | valid_border_margin: 3 53 | 54 | front_end_model: 'Train_model_heatmap_all_ang' # 'Train_model_frontend' 55 | 56 | training: 57 | workers_train: 16 58 | workers_val: 2 # 2 59 | 60 | model: 61 | # name: 'SuperPointNet_heatmap' 62 | name: 'SuperPointNet_gauss2' 63 | # name: 'SuperPointNet_pretrained' 64 | params: { 65 | } 66 | detector_loss: 67 | loss_type: 'softmax' 68 | 69 | 70 | batch_size: 16 # 32 #batch size in the GPU memory - only for training - ITER VARIABLES ARE MODIFIED IN CODE ACCORDINGLY 71 | real_batch_size: 16 72 | eval_batch_size: 5 # 32 73 | learning_rate: 0.001 # 0.0001 74 | detection_threshold: 0.015 # 0.015 75 | lambda_loss: 1 # 1 76 | nms: 4 77 | dense_loss: 78 | enable: false 79 | params: 80 | descriptor_dist: 4 # 4, 7.5 81 | lambda_d: 800 # 800 82 | sparse_loss: 83 | enable: true 84 | params: 85 | num_matching_attempts: 1000 86 | num_masked_non_matches_per_match: 100 87 | lamda_d: 1 #1 88 | dist: 'cos' 89 | method: '2d' 90 | other_settings: 'train 2d, gauss 0.2' 91 | # subpixel: 92 | # enable: false 93 | # params: 94 | # subpixel_channel: 2 95 | # settings: 'predict flow directly' 96 | # loss_func: 'subpixel_loss_no_argmax' # subpixel_loss, subpixel_loss_no_argmax 97 | 98 | retrain: False # set true for new model 99 | reset_iter: True # set true to set the iteration number to 0 100 | train_iter: 100000 #200000 # 170000 101 | validation_interval: 5000 # 2000 102 | tensorboard_interval: 200 # 200 103 | save_interval: 5000 # 2000 104 | validation_size: 10 105 | 106 | pretrained: "logs/superpoint_coco_200k_001lr_noWD/checkpoints/superPointNet_100000_checkpoint.pth.tar" 107 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /configs/superpoint_coco_train_heatmap_ang_sem.yaml: -------------------------------------------------------------------------------- 1 | data: 2 | # name: 'coco' 3 | dataset: 'Coco_sem' # 'coco' 4 | semantic: True 5 | ignore_class: 133 6 | 7 | # labels: datasets/magicpoint_synth20_homoAdapt100_coco_f1/predictions 8 | labels: logs/magicpoint_synth_homoAdapt_coco/predictions 9 | sem_labels: datasets/COCO/annotations 10 | root: # datasets/COCO 11 | root_split_txt: # /datasets/COCO 12 | 13 | gaussian_label: 14 | enable: true 15 | params: 16 | GaussianBlur: {sigma: 0.2} 17 | 18 | 19 | cache_in_memory: false 20 | preprocessing: 21 | # resize: [120, 160] 22 | resize: [240, 320] 23 | # resize: [480, 640] 24 | augmentation: 25 | photometric: 26 | enable: true 27 | primitives: [ 28 | 'random_brightness', 'random_contrast', 'additive_speckle_noise', 29 | 'additive_gaussian_noise', 'additive_shade', 'motion_blur'] 30 | params: 31 | random_brightness: {max_abs_change: 50} 32 | random_contrast: {strength_range: [0.5, 1.5]} 33 | additive_gaussian_noise: {stddev_range: [0, 10]} 34 | additive_speckle_noise: {prob_range: [0, 0.0035]} 35 | additive_shade: 36 | transparency_range: [-0.5, 0.5] 37 | kernel_size_range: [100, 150] 38 | motion_blur: {max_kernel_size: 3} 39 | homographic: 40 | enable: false # not implemented 41 | warped_pair: 42 | enable: true 43 | params: 44 | translation: true 45 | rotation: true 46 | scaling: true 47 | perspective: true 48 | scaling_amplitude: 0.2 49 | perspective_amplitude_x: 0.2 50 | perspective_amplitude_y: 0.2 51 | patch_ratio: 0.85 52 | max_angle: 1.57 53 | allow_artifacts: true # true 54 | valid_border_margin: 3 55 | 56 | front_end_model: 'Train_model_heatmap_all_ang' # 'Train_model_frontend' 57 | 58 | training: 59 | workers_train: 16 60 | workers_val: 2 # 2 61 | 62 | model: 63 | name: 'SuperPointNet_gauss2_ssmall' 64 | params: { 65 | n_classes: 133, 66 | } 67 | detector_loss: 68 | loss_type: 'softmax' 69 | 70 | 71 | batch_size: 16 # 32 #batch size in the GPU memory - only for training - ITER VARIABLES ARE MODIFIED IN CODE ACCORDINGLY 72 | real_batch_size: 16 73 | eval_batch_size: 5 # 32 74 | learning_rate: 0.0025 # 0.0001 75 | detection_threshold: 0.015 # 0.015 76 | lambda_loss: 1 # 1 77 | nms: 4 78 | dense_loss: 79 | enable: false 80 | params: 81 | descriptor_dist: 4 # 4, 7.5 82 | lambda_d: 800 # 800 83 | sparse_loss: 84 | enable: true 85 | params: 86 | num_matching_attempts: 1000 87 | num_masked_non_matches_per_match: 100 88 | lamda_d: 1 #1 89 | dist: 'cos' 90 | method: '2d' 91 | other_settings: 'train 2d, gauss 0.2' 92 | # subpixel: 93 | # enable: false 94 | # params: 95 | # subpixel_channel: 2 96 | # settings: 'predict flow directly' 97 | # loss_func: 'subpixel_loss_no_argmax' # subpixel_loss, subpixel_loss_no_argmax 98 | seg_head: 99 | loss: 'cross_entropy' 100 | loss_wheight: 1 101 | optimizer: 'AdamB' 102 | metric: 'mIou' 103 | 104 | 105 | 106 | retrain: False # set true for new model 107 | reset_iter: True # set true to set the iteration number to 0 108 | train_iter: 150000 #200000 # 170000 109 | validation_interval: 5000 # 2000 110 | tensorboard_interval: 200 # 200 111 | save_interval: 5000 # 2000 112 | validation_size: 10 113 | 114 | pretrained: "logs/superpoint_coco_sem_small_ML2/checkpoints/superPointNet_100000_checkpoint.pth.tar" 115 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /configs/superpoint_coco_train_wsem_heatmap.yaml: -------------------------------------------------------------------------------- 1 | data: 2 | # name: 'coco' 3 | dataset: 'Coco_sem' # 'coco' 4 | semantic: True 5 | ignore_class: 133 6 | 7 | # labels: datasets/magicpoint_synth20_homoAdapt100_coco_f1/predictions 8 | labels: logs/magicpoint_synth_homoAdapt_coco/predictions 9 | sem_labels: datasets/COCO/annotations 10 | root: # datasets/COCO 11 | root_split_txt: # /datasets/COCO 12 | 13 | gaussian_label: 14 | enable: true 15 | params: 16 | GaussianBlur: {sigma: 0.2} 17 | 18 | 19 | cache_in_memory: false 20 | preprocessing: 21 | # resize: [120, 160] 22 | resize: [240, 320] 23 | # resize: [480, 640] 24 | augmentation: 25 | photometric: 26 | enable: true 27 | primitives: [ 28 | 'random_brightness', 'random_contrast', 'additive_speckle_noise', 29 | 'additive_gaussian_noise', 'additive_shade', 'motion_blur'] 30 | params: 31 | random_brightness: {max_abs_change: 50} 32 | random_contrast: {strength_range: [0.5, 1.5]} 33 | additive_gaussian_noise: {stddev_range: [0, 10]} 34 | additive_speckle_noise: {prob_range: [0, 0.0035]} 35 | additive_shade: 36 | transparency_range: [-0.5, 0.5] 37 | kernel_size_range: [100, 150] 38 | motion_blur: {max_kernel_size: 3} 39 | homographic: 40 | enable: false # not implemented 41 | warped_pair: 42 | enable: true 43 | params: 44 | translation: true 45 | rotation: true 46 | scaling: true 47 | perspective: true 48 | scaling_amplitude: 0.2 49 | perspective_amplitude_x: 0.2 50 | perspective_amplitude_y: 0.2 51 | patch_ratio: 0.85 52 | max_angle: 1.57 53 | allow_artifacts: true # true 54 | valid_border_margin: 3 55 | 56 | front_end_model: 'Train_model_heatmap_all' # 'Train_model_frontend' 57 | 58 | training: 59 | workers_train: 16 # 16 60 | workers_val: 4 # 2 61 | 62 | model: 63 | # name: 'magic_point' 64 | # name: 'SuperPointNet_heatmap' 65 | name: 'SuperPointNet_gauss2_ssmall' 66 | 67 | params: { 68 | n_classes: 133, 69 | } 70 | detector_loss: 71 | loss_type: 'softmax' 72 | 73 | 74 | batch_size: 16 # 16 # 32 75 | real_batch_size: 16 76 | eval_batch_size: 5 # 8 # 32 77 | learning_rate: 0.0025 # 0.0001 78 | detection_threshold: 0.015 # 0.015 79 | lambda_loss: 1 # 1 80 | nms: 4 81 | dense_loss: 82 | enable: false 83 | params: 84 | descriptor_dist: 4 # 4, 7.5 85 | lambda_d: 800 # 800 86 | sparse_loss: 87 | enable: true 88 | params: 89 | num_matching_attempts: 1000 90 | num_masked_non_matches_per_match: 100 91 | lamda_d: 1 92 | dist: 'cos' 93 | method: '2d' 94 | other_settings: 'train 2d, gauss 0.2' 95 | # subpixel: 96 | # enable: false 97 | # params: 98 | # subpixel_channel: 2 99 | # settings: 'predict flow directly' 100 | # loss_func: 'subpixel_loss_no_argmax' # subpixel_loss, subpixel_loss_no_argmax 101 | multi_task_loss: true 102 | # seg_head: 103 | # loss: 'cross_entropy' 104 | # loss_wheight: 1 105 | # optimizer: 'AdamB' 106 | # metric: 'mIou' 107 | 108 | retrain: True # set true for new model 109 | reset_iter: True # set true to set the iteration number to 0 110 | train_iter: 200000 #200000 # 170000 111 | validation_interval: 1000 # 2000 112 | tensorboard_interval: 200 # 200 113 | save_interval: 5000 # 2000 114 | validation_size: 10 115 | 116 | pretrained: 117 | 118 | 119 | 120 | -------------------------------------------------------------------------------- /configs/superpoint_kitti_train_heatmap.yaml: -------------------------------------------------------------------------------- 1 | data: 2 | name: 'kitti' 3 | dataset: 'Kitti_inh' # 'Kitti' 4 | root: './datasets/KITTI/' # /data/kitti/kitti_wVal 5 | root_split_txt: 'datasets/kitti_split' 6 | labels: logs/magicpoint_synth20_homoAdapt100_kitti_h384_labels/predictions 7 | 8 | gaussian_label: 9 | enable: true 10 | params: 11 | GaussianBlur: {sigma: 0.2} 12 | 13 | cache_in_memory: false 14 | preprocessing: 15 | resize: [384, 1248] # hand defined, original: [375, 1242] 16 | # resize: [192, 624] 17 | augmentation: 18 | photometric: 19 | enable: true 20 | primitives: [ 21 | 'random_brightness', 'random_contrast', 'additive_speckle_noise', 22 | 'additive_gaussian_noise', 'additive_shade', 'motion_blur'] 23 | params: 24 | random_brightness: {max_abs_change: 50} 25 | random_contrast: {strength_range: [0.5, 1.5]} 26 | additive_gaussian_noise: {stddev_range: [0, 10]} 27 | additive_speckle_noise: {prob_range: [0, 0.0035]} 28 | additive_shade: 29 | transparency_range: [-0.5, 0.5] 30 | kernel_size_range: [100, 150] 31 | motion_blur: {max_kernel_size: 3} 32 | homographic: 33 | enable: false # not implemented 34 | params: 35 | {} 36 | warped_pair: 37 | enable: true 38 | params: 39 | translation: true 40 | rotation: true 41 | scaling: true 42 | perspective: true 43 | scaling_amplitude: 0.2 44 | perspective_amplitude_x: 0.2 45 | perspective_amplitude_y: 0.2 46 | patch_ratio: 0.85 47 | max_angle: 1.57 # 0.1 48 | allow_artifacts: true # true 49 | valid_border_margin: 3 50 | 51 | 52 | front_end_model: 'Train_model_heatmap' # 'Train_model_frontend' 53 | 54 | training: 55 | workers_train: 4 # 16 56 | workers_val: 2 # 2 57 | 58 | model: 59 | name: 'SuperPointNet_gauss2' 60 | params: { 61 | } 62 | detector_loss: 63 | loss_type: 'softmax' 64 | 65 | 66 | batch_size: 4 # 32 67 | eval_batch_size: 4 68 | learning_rate: 0.0001 69 | detection_threshold: 0.015 # 0.015 70 | nms: 4 71 | lambda_loss: 1 72 | # top_k: 300 73 | dense_loss: 74 | enable: false 75 | params: 76 | descriptor_dist: 4 # 4, 7.5 77 | lambda_d: 800 # 800 78 | sparse_loss: 79 | enable: true 80 | params: 81 | num_matching_attempts: 600 82 | num_masked_non_matches_per_match: 100 83 | lamda_d: 1 84 | dist: 'cos' 85 | method: '2d' 86 | other_settings: 'train from scratch, 2d method' 87 | lambda_res: 100 88 | 89 | retrain: true # set true for new model 90 | reset_iter: true 91 | train_iter: 170000 92 | validation_interval: 2000 93 | tensorboard_interval: 400 94 | save_interval: 2000 95 | validation_size: 5 96 | 97 | pretrained: 98 | # pretrained: 'logs/superpoint_coco_heat2_0/checkpoints/superPointNet_90000_checkpoint.pth.tar' 99 | 100 | 101 | -------------------------------------------------------------------------------- /configs/superpoint_tum_train_heatmap.yaml: -------------------------------------------------------------------------------- 1 | data: 2 | # name: 'tum' 3 | dataset: 'Tum' # 'Kitti' 4 | root: '/data/tum/raw_sequences' # use in export, and training 5 | root_split_txt: 'datasets/tum_split' 6 | labels: logs/magicpoint_base_homoAdapt_tum_rawSeq/predictions 7 | 8 | gaussian_label: 9 | enable: true 10 | params: 11 | GaussianBlur: {sigma: 0.2} 12 | 13 | cache_in_memory: false 14 | preprocessing: 15 | resize: [480, 640] # hand defined, original: [375, 1242] 16 | augmentation: 17 | photometric: 18 | enable: true 19 | primitives: [ 20 | 'random_brightness', 'random_contrast', 'additive_speckle_noise', 21 | 'additive_gaussian_noise', 'additive_shade', 'motion_blur'] 22 | params: 23 | random_brightness: {max_abs_change: 50} 24 | random_contrast: {strength_range: [0.5, 1.5]} 25 | additive_gaussian_noise: {stddev_range: [0, 10]} 26 | additive_speckle_noise: {prob_range: [0, 0.0035]} 27 | additive_shade: 28 | transparency_range: [-0.5, 0.5] 29 | kernel_size_range: [100, 150] 30 | motion_blur: {max_kernel_size: 3} 31 | homographic: 32 | enable: false # not implemented 33 | params: 34 | {} 35 | warped_pair: 36 | enable: true 37 | params: 38 | translation: true 39 | rotation: true 40 | scaling: true 41 | perspective: true 42 | scaling_amplitude: 0.2 43 | perspective_amplitude_x: 0.2 44 | perspective_amplitude_y: 0.2 45 | patch_ratio: 0.85 46 | max_angle: 1.57 # 0.1 47 | allow_artifacts: true # true 48 | valid_border_margin: 3 49 | 50 | 51 | front_end_model: 'Train_model_heatmap' # 'Train_model_frontend' 52 | 53 | model: 54 | name: 'SuperPointNet_gauss2' 55 | params: { 56 | } 57 | detector_loss: 58 | loss_type: 'softmax' 59 | 60 | 61 | batch_size: 4 # 32 62 | eval_batch_size: 4 63 | learning_rate: 0.0001 64 | detection_threshold: 0.015 # 0.015 65 | nms: 4 66 | lambda_loss: 1 67 | # top_k: 300 68 | dense_loss: 69 | enable: false 70 | params: 71 | descriptor_dist: 4 # 4, 7.5 72 | lambda_d: 800 # 800 73 | sparse_loss: 74 | enable: true 75 | params: 76 | num_matching_attempts: 600 77 | num_masked_non_matches_per_match: 100 78 | lamda_d: 1 79 | dist: 'cos' 80 | method: '2d' 81 | other_settings: 'train from scratch, 2d method' 82 | lambda_res: 100 83 | 84 | retrain: true # set true for new model 85 | reset_iter: true 86 | train_iter: 170000 87 | validation_interval: 2000 88 | tensorboard_interval: 400 89 | save_interval: 2000 90 | validation_size: 5 91 | 92 | # pretrained: 'logs/superpoint_coco_heat2_0/checkpoints/superPointNet_90000_checkpoint.pth.tar' 93 | pretrained: 94 | 95 | 96 | -------------------------------------------------------------------------------- /convert2script.py: -------------------------------------------------------------------------------- 1 | import torch 2 | from models.SuperPointNet_gauss2_ssmall import SuperPointNet_gauss2_ssmall 3 | 4 | model = SuperPointNet_gauss2_ssmall() 5 | 6 | path = "logs/superpoint_coco_ssmall_ML22/checkpoints/superPointNet_180000_checkpoint.pth.tar" 7 | 8 | model.load_state_dict(torch.load(path)["model_state_dict"]) 9 | 10 | # model.removeSem() # if you don't want the semantic decoder 11 | 12 | traced_script_module = torch.jit.script(model) 13 | traced_script_module.save("SSP_small_180000_ML22.pt") 14 | -------------------------------------------------------------------------------- /datasets/__init__.py: -------------------------------------------------------------------------------- 1 | def get_dataset(name): 2 | mod = __import__('datasets.{}'.format(name), fromlist=['']) 3 | return getattr(mod, _module_to_class(name)) 4 | 5 | 6 | def _module_to_class(name): 7 | return ''.join(n.capitalize() for n in name.split('_')) 8 | -------------------------------------------------------------------------------- /datasets/base_dataset.py: -------------------------------------------------------------------------------- 1 | from abc import ABCMeta, abstractmethod 2 | import tensorflow as tf 3 | 4 | from utils.tools import dict_update 5 | 6 | 7 | class BaseDataset(metaclass=ABCMeta): 8 | """Base model class. 9 | 10 | Arguments: 11 | config: A dictionary containing the configuration parameters. 12 | 13 | Datasets should inherit from this class and implement the following methods: 14 | `_init_dataset` and `_get_data`. 15 | Additionally, the following static attributes should be defined: 16 | default_config: A dictionary of potential default configuration values (e.g. the 17 | size of the validation set). 18 | """ 19 | split_names = ['training', 'validation', 'test'] 20 | 21 | @abstractmethod 22 | def _init_dataset(self, **config): 23 | """Prepare the dataset for reading. 24 | 25 | This method should configure the dataset for later fetching through `_get_data`, 26 | such as downloading the data if it is not stored locally, or reading the list of 27 | data files from disk. Ideally, especially in the case of large images, this 28 | method shoudl NOT read all the dataset into memory, but rather prepare for faster 29 | seubsequent fetching. 30 | 31 | Arguments: 32 | config: A configuration dictionary, given during the object instantiantion. 33 | 34 | Returns: 35 | An object subsequently passed to `_get_data`, e.g. a list of file paths and 36 | set splits. 37 | """ 38 | raise NotImplementedError 39 | 40 | @abstractmethod 41 | def _get_data(self, dataset, split_name, **config): 42 | """Reads the dataset splits using the Tensorflow `tf.data` API. 43 | 44 | This method should create a `tf.data.Dataset` object for the given data split, 45 | with named components defined through a dictionary mapping strings to tensors. 46 | 47 | It typically performs operations such as reading data from a file or from a 48 | Python generator, shuffling the elements or applying data augmentation to the 49 | training split. It should however NOT batch the dataset (left to the model). 50 | 51 | Arguments: 52 | dataset: An object returned by the `_init_dataset` method. 53 | split_name: A string, the name of the requested split, either `"training"`, 54 | `"validation"` or `"test"`. 55 | config: A configuration dictionary, given during the object instantiantion. 56 | 57 | Returns: 58 | An object of type `tf.data.Dataset` corresponding to the corresponding split. 59 | """ 60 | raise NotImplementedError 61 | 62 | def get_tf_datasets(self): 63 | """"Exposes data splits consistent with the Tensorflow `tf.data` API. 64 | 65 | Returns: 66 | A dictionary mapping split names (`str`, either `"training"`, `"validation"`, 67 | or `"test"`) to `tf.data.Dataset` objects. 68 | """ 69 | return self.tf_splits 70 | 71 | def get_training_set(self): 72 | """Processed training set. 73 | 74 | Returns: 75 | A generator of elements from the training set as dictionaries mapping 76 | component names to the corresponding data (e.g. Numpy array). 77 | """ 78 | return self._get_set_generator('training') 79 | 80 | def get_validation_set(self): 81 | """Processed validation set. 82 | 83 | Returns: 84 | A generator of elements from the training set as dictionaries mapping 85 | component names to the corresponding data (e.g. Numpy array). 86 | """ 87 | return self._get_set_generator('validation') 88 | 89 | def get_test_set(self): 90 | """Processed test set. 91 | 92 | Returns: 93 | A generator of elements from the training set as dictionaries mapping 94 | component names to the corresponding data (e.g. Numpy array). 95 | """ 96 | return self._get_set_generator('test') 97 | 98 | def __init__(self, **config): 99 | # Update config 100 | self.config = dict_update(getattr(self, 'default_config', {}), config) 101 | 102 | self.dataset = self._init_dataset(**self.config) 103 | 104 | self.tf_splits = {} 105 | self.tf_next = {} 106 | with tf.device('/cpu:0'): 107 | for n in self.split_names: 108 | self.tf_splits[n] = self._get_data(self.dataset, n, **self.config) 109 | self.tf_next[n] = tf.compat.v1.data.make_one_shot_iterator(self.tf_splits[n]).get_next() 110 | self.end_set = tf.errors.OutOfRangeError 111 | self.sess = tf.compat.v1.Session() 112 | 113 | def _get_set_generator(self, set_name): 114 | while True: 115 | yield self.sess.run(self.tf_next[set_name]) 116 | -------------------------------------------------------------------------------- /datasets/data_tools.py: -------------------------------------------------------------------------------- 1 | 2 | import torch 3 | 4 | quan = lambda x: x.round().long() 5 | 6 | def extrapolate_points(pnts): 7 | pnts_int = pnts.long().type(torch.FloatTensor) 8 | pnts_x, pnts_y = pnts_int[:,0], pnts_int[:,1] 9 | 10 | stack_1 = lambda x, y: torch.stack((x, y), dim=1) 11 | pnts_ext = torch.cat((pnts_int, stack_1(pnts_x, pnts_y+1), 12 | stack_1(pnts_x+1, pnts_y), pnts_int+1), dim=0) 13 | 14 | pnts_res = pnts - pnts_int # (x, y) 15 | x_res, y_res = pnts_res[:,0], pnts_res[:,1] # residuals 16 | res_ext = torch.cat(((1-x_res)*(1-y_res), (1-x_res)*y_res, 17 | x_res*(1-y_res), x_res*y_res), dim=0) 18 | return pnts_ext, res_ext 19 | 20 | def scatter_points(warped_pnts, H, W, res_ext = 1): 21 | warped_labels = torch.zeros(H, W) 22 | warped_labels[quan(warped_pnts)[:, 1], quan(warped_pnts)[:, 0]] = res_ext 23 | warped_labels = warped_labels.view(-1, H, W) 24 | return warped_labels 25 | 26 | # from datasets.data_tools import get_labels_bi 27 | def get_labels_bi(warped_pnts, H, W): 28 | from utils.utils import filter_points 29 | pnts_ext, res_ext = extrapolate_points(warped_pnts) 30 | # quan = lambda x: x.long() 31 | pnts_ext, mask = filter_points(pnts_ext, torch.tensor([W, H]), return_mask=True) 32 | res_ext = res_ext[mask] 33 | warped_labels_bi = scatter_points(pnts_ext, H, W, res_ext = res_ext) 34 | return warped_labels_bi 35 | 36 | # from data_tools import warpLabels 37 | def warpLabels(pnts, H, W, homography, bilinear = False): 38 | from utils.utils import homography_scaling_torch as homography_scaling 39 | from utils.utils import filter_points 40 | from utils.utils import warp_points 41 | if isinstance(pnts, torch.Tensor): 42 | pnts = pnts.long() 43 | else: 44 | pnts = torch.tensor(pnts).long() 45 | warped_pnts = warp_points(torch.stack((pnts[:, 0], pnts[:, 1]), dim=1), 46 | homography_scaling(homography, H, W)) # check the (x, y) 47 | outs = {} 48 | # warped_pnts 49 | # print("extrapolate_points!!") 50 | 51 | # ext_points = True 52 | if bilinear == True: 53 | warped_labels_bi = get_labels_bi(warped_pnts, H, W) 54 | outs['labels_bi'] = warped_labels_bi 55 | 56 | warped_pnts = filter_points(warped_pnts, torch.tensor([W, H])) 57 | warped_labels = scatter_points(warped_pnts, H, W, res_ext = 1) 58 | 59 | warped_labels_res = torch.zeros(H, W, 2) 60 | warped_labels_res[quan(warped_pnts)[:, 1], quan(warped_pnts)[:, 0], :] = warped_pnts - warped_pnts.round() 61 | # print("res sum: ", (warped_pnts - warped_pnts.round()).sum()) 62 | outs.update({'labels': warped_labels, 'res': warped_labels_res, 'warped_pnts': warped_pnts}) 63 | return outs 64 | 65 | 66 | # from data_tools import np_to_tensor 67 | def np_to_tensor(img, H, W): 68 | img = torch.tensor(img).type(torch.FloatTensor).view(-1, H, W) 69 | return img 70 | 71 | 72 | if __name__ == '__main__': 73 | main() 74 | -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000000.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000000.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000000.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000000.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000001.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000001.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000001.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000002.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000002.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000002.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000003.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000003.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000003.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000004.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000004.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000004.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000004.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000005.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000005.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000005.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000005.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000006.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000006.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000006.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000006.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000007.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000007.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000007.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000007.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000008.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000008.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000008.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000008.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000009.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000009.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000009.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000009.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000010.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000010.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000010.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000010.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000011.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000011.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000011.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000011.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000012.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000012.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000012.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000012.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000013.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000013.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000013.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000013.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000014.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000014.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000014.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000014.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000015.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000015.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000015.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000015.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000016.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000016.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000016.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000016.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000017.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000017.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000017.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000017.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000018.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000018.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000018.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000018.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000019.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000019.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000019.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000019.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000020.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000020.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000020.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000020.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000021.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000021.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000021.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000021.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000022.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000022.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000022.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000022.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000023.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000023.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000023.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000023.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000024.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000024.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000024.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000024.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000025.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000025.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000025.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000025.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000026.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000026.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000026.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000026.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000027.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000027.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000027.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000027.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000028.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000028.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000028.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000028.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000029.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000029.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000029.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000029.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000030.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000030.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000030.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000030.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000031.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000031.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000031.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000031.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000032.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000032.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000032.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000032.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000033.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000033.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000033.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000033.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000034.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000034.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000034.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000034.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000035.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000035.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000035.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000035.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000036.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000036.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000036.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000036.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000037.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000037.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000037.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000037.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000038.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000038.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000038.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000038.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000039.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000039.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000039.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000039.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000040.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000040.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000040.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000040.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000041.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000041.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000041.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000041.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000042.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000042.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000042.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000042.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000043.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000043.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000043.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000043.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000044.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000044.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000044.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000044.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000045.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000045.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000045.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000045.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000046.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000046.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000046.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000046.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000047.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000047.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000047.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000047.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000048.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000048.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000048.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000048.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000049.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000049.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000049.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000049.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000050.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000050.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000050.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000050.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000051.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000051.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000051.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000051.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000052.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000052.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000052.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000052.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000053.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000053.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000053.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000053.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000054.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000054.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000054.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000054.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000055.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000055.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000055.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000055.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000056.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000056.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000056.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000056.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000057.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000057.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000057.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000057.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000058.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000058.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000058.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000058.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000059.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000059.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000059.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000059.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000060.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000060.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000060.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000060.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000061.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000061.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000061.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000061.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000062.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000062.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000062.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000062.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000063.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000063.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000063.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000063.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000064.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000064.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000064.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000064.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000065.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000065.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000065.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000065.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000066.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000066.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000066.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000066.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000067.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000067.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000067.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000067.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000068.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000068.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000068.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000068.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000069.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000069.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000069.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000069.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000070.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000070.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000070.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000070.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000071.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000071.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000071.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000071.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000072.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000072.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000072.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000072.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000073.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000073.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000073.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000073.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000074.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000074.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000074.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000074.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000075.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000075.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000075.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000075.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000076.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000076.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000076.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000076.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000077.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000077.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000077.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000077.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000078.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000078.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000078.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000078.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000079.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000079.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000079.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000079.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000080.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000080.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000080.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000080.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000081.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000081.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000081.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000081.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000082.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000082.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000082.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000082.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000083.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000083.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000083.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000083.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000084.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000084.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000084.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000084.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000085.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000085.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000085.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000085.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000086.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000086.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000086.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000086.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000087.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000087.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000087.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000087.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000088.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000088.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000088.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000088.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000089.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000089.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000089.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000089.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000090.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000090.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000090.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000090.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000091.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000091.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000091.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000091.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000092.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000092.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000092.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000092.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000093.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000093.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000093.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000093.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000094.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000094.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000094.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000094.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000095.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000095.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000095.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000095.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000096.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000096.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000096.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000096.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000097.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000097.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000097.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000097.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000098.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000098.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000098.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000098.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000099.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000099.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000099.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000099.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000100.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000100.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000100.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000100.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000101.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000101.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000101.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000101.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000102.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000102.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000102.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000102.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000103.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000103.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000103.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000103.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000104.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000104.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000104.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000104.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000105.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000105.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000105.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000105.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000106.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000106.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000106.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000106.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000107.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000107.jpg -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/0000000107.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/2011_09_26_drive_0001_sync_02/0000000107.npy -------------------------------------------------------------------------------- /datasets/kitti/2011_09_26_drive_0001_sync_02/cam.txt: -------------------------------------------------------------------------------- 1 | 2.416744631239935472e+02 0.000000000000000000e+00 2.041680103059581199e+02 2 | 0.000000000000000000e+00 2.462848682666666491e+02 5.900083200000000261e+01 3 | 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 4 | -------------------------------------------------------------------------------- /datasets/kitti/kitti_test/0000000000.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/kitti_test/0000000000.npz -------------------------------------------------------------------------------- /datasets/kitti/kitti_test/0000000000_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/kitti_test/0000000000_0.png -------------------------------------------------------------------------------- /datasets/kitti/kitti_test/0000000000_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/kitti/kitti_test/0000000000_1.png -------------------------------------------------------------------------------- /datasets/kitti/kitti_test/test.txt: -------------------------------------------------------------------------------- 1 | Test by Rui. 2 | -------------------------------------------------------------------------------- /datasets/kitti/train.txt: -------------------------------------------------------------------------------- 1 | 2011_09_26_drive_0001_sync_02 2 | -------------------------------------------------------------------------------- /datasets/kitti_split/train.txt: -------------------------------------------------------------------------------- 1 | 2011_09_26_drive_0032_sync_02 2 | 2011_10_03_drive_0042_sync_02 3 | 2011_09_26_drive_0101_sync_02 4 | 2011_09_28_drive_0045_sync_02 5 | 2011_09_26_drive_0027_sync_02 6 | 2011_09_30_drive_0027_sync_02 7 | 2011_09_30_drive_0033_sync_02 8 | 2011_09_28_drive_0038_sync_02 9 | 2011_09_26_drive_0017_sync_02 10 | 2011_09_26_drive_0046_sync_02 11 | 2011_09_26_drive_0087_sync_02 12 | 2011_10_03_drive_0027_sync_02 13 | 2011_09_28_drive_0037_sync_02 14 | 2011_09_26_drive_0117_sync_02 15 | 2011_09_29_drive_0004_sync_02 16 | 2011_09_26_drive_0035_sync_02 17 | 2011_09_26_drive_0019_sync_02 18 | 2011_09_30_drive_0028_sync_02 19 | 2011_09_26_drive_0039_sync_02 20 | 2011_09_26_drive_0023_sync_02 21 | 2011_09_26_drive_0029_sync_02 22 | 2011_09_26_drive_0086_sync_02 23 | 2011_09_26_drive_0013_sync_02 24 | 2011_09_26_drive_0015_sync_02 25 | 2011_09_26_drive_0070_sync_02 26 | 2011_09_26_drive_0096_sync_02 27 | 2011_09_26_drive_0051_sync_02 28 | 2011_09_29_drive_0026_sync_02 29 | 2011_09_26_drive_0093_sync_02 30 | 2011_09_28_drive_0034_sync_02 31 | 2011_09_28_drive_0039_sync_02 32 | 2011_09_26_drive_0018_sync_02 33 | 2011_09_28_drive_0043_sync_02 34 | 2011_09_26_drive_0104_sync_02 35 | 2011_09_26_drive_0048_sync_02 36 | 2011_09_26_drive_0022_sync_02 37 | 2011_09_26_drive_0036_sync_02 38 | 2011_09_28_drive_0001_sync_02 39 | 2011_09_26_drive_0095_sync_02 40 | 2011_09_30_drive_0034_sync_02 41 | 2011_09_30_drive_0018_sync_02 42 | 2011_09_26_drive_0014_sync_02 43 | 2011_09_26_drive_0028_sync_02 44 | 2011_09_26_drive_0057_sync_02 45 | 2011_09_30_drive_0020_sync_02 46 | 2011_09_26_drive_0059_sync_02 47 | 2011_09_28_drive_0002_sync_02 48 | 2011_09_26_drive_0009_sync_02 49 | 2011_09_26_drive_0064_sync_02 50 | 2011_09_26_drive_0084_sync_02 51 | 2011_09_26_drive_0056_sync_02 52 | 2011_10_03_drive_0034_sync_02 53 | 2011_09_30_drive_0016_sync_02 54 | 2011_10_03_drive_0047_sync_02 55 | 2011_09_28_drive_0047_sync_02 56 | 2011_09_26_drive_0079_sync_02 57 | 2011_09_26_drive_0113_sync_02 58 | 2011_09_26_drive_0106_sync_02 59 | 2011_09_29_drive_0071_sync_02 60 | 2011_09_26_drive_0061_sync_02 61 | 2011_09_26_drive_0091_sync_02 62 | -------------------------------------------------------------------------------- /datasets/kitti_split/val.txt: -------------------------------------------------------------------------------- 1 | 2011_09_26_drive_0002_sync_02 2 | 2011_09_26_drive_0001_sync_02 3 | 2011_09_26_drive_0020_sync_02 4 | 2011_09_26_drive_0052_sync_02 5 | 2011_09_26_drive_0011_sync_02 6 | 2011_09_26_drive_0005_sync_02 7 | -------------------------------------------------------------------------------- /datasets/patches_dataset.py: -------------------------------------------------------------------------------- 1 | """ 2 | 3 | """ 4 | 5 | import numpy as np 6 | # import tensorflow as tf 7 | import cv2 8 | from pathlib import Path 9 | 10 | import torch 11 | import torch.utils.data as data 12 | 13 | # from .base_dataset import BaseDataset 14 | # from .utils import pipeline 15 | from utils.tools import dict_update 16 | 17 | from models.homographies import sample_homography 18 | from settings import DATA_PATH 19 | 20 | from imageio import imread 21 | def load_as_float(path): 22 | return imread(path).astype(np.float32)/255 23 | 24 | class PatchesDataset(data.Dataset): 25 | default_config = { 26 | 'dataset': 'hpatches', # or 'coco' 27 | 'alteration': 'all', # 'all', 'i' for illumination or 'v' for viewpoint 28 | 'cache_in_memory': False, 29 | 'truncate': None, 30 | 'preprocessing': { 31 | 'resize': False 32 | } 33 | } 34 | 35 | def __init__(self, transform=None, **config): 36 | self.config = self.default_config 37 | self.config = dict_update(self.config, config) 38 | self.files = self._init_dataset(**self.config) 39 | sequence_set = [] 40 | for (img, img_warped, mat_hom) in zip(self.files['image_paths'], self.files['warped_image_paths'], self.files['homography']): 41 | sample = {'image': img, 'warped_image': img_warped, 'homography': mat_hom} 42 | sequence_set.append(sample) 43 | self.samples = sequence_set 44 | self.transform = transform 45 | if config['preprocessing']['resize']: 46 | self.sizer = np.array(config['preprocessing']['resize']) 47 | pass 48 | 49 | def __getitem__(self, index): 50 | """ 51 | 52 | :param index: 53 | :return: 54 | image: 55 | tensor (1,H,W) 56 | warped_image: 57 | tensor (1,H,W) 58 | """ 59 | def _read_image(path): 60 | input_image = cv2.imread(path) 61 | return input_image 62 | 63 | def _preprocess(image): 64 | s = max(self.sizer /image.shape[:2]) 65 | image = cv2.cvtColor(image, cv2.COLOR_RGB2GRAY) 66 | image = image[:int(self.sizer[0]/s),:int(self.sizer[1]/s)] 67 | image = cv2.resize(image, (self.sizer[1], self.sizer[0]), 68 | interpolation=cv2.INTER_AREA) 69 | image = image.astype('float32') / 255.0 70 | if image.ndim == 2: 71 | image = image[:,:, np.newaxis] 72 | if self.transform is not None: 73 | image = self.transform(image) 74 | return image 75 | 76 | def _warp_image(image): 77 | H = sample_homography(tf.shape(input=image)[:2]) 78 | warped_im = tf.contrib.image.transform(image, H, interpolation="BILINEAR") 79 | return {'warped_im': warped_im, 'H': H} 80 | 81 | def _adapt_homography_to_preprocessing(image, H): 82 | # image = zip_data['image'] 83 | # H = tf.cast(zip_data['homography'], tf.float32) 84 | # target_size = np.array(self.config['preprocessing']['resize']) 85 | s = max(self.sizer /image.shape[:2]) 86 | # mat = np.array([[1,1,1/s], [1,1,1/s], [s,s,1]]) 87 | mat = np.array([[1,1,s], [1,1,s], [1/s,1/s,1]]) 88 | # down_scale = np.diag(np.array([1/s, 1/s, 1])) 89 | # up_scale = tf.diag(tf.stack([s, s, tf.constant(1.)])) 90 | # H = tf.matmul(up_scale, tf.matmul(H, down_scale)) 91 | H = H*mat 92 | return H 93 | sample = self.samples[index] 94 | image_original = _read_image(sample['image']) 95 | image = _preprocess(image_original) 96 | warped_image = _preprocess(_read_image(sample['warped_image'])) 97 | to_numpy = False 98 | if to_numpy: 99 | image, warped_image = np.array(image), np.array(warped_image) 100 | homography = _adapt_homography_to_preprocessing(image_original, sample['homography']) 101 | sample = {'image': image, 'warped_image': warped_image, 102 | 'homography': homography} 103 | return sample 104 | 105 | def __len__(self): 106 | return len(self.samples) 107 | 108 | def _init_dataset(self, **config): 109 | dataset_folder = 'COCO/patches' if config['dataset'] == 'coco' else 'HPatches' 110 | base_path = Path(DATA_PATH, dataset_folder) 111 | folder_paths = [x for x in base_path.iterdir() if x.is_dir()] 112 | image_paths = [] 113 | warped_image_paths = [] 114 | homographies = [] 115 | for path in folder_paths: 116 | if config['alteration'] == 'i' and path.stem[0] != 'i': 117 | continue 118 | if config['alteration'] == 'v' and path.stem[0] != 'v': 119 | continue 120 | num_images = 1 if config['dataset'] == 'coco' else 5 121 | file_ext = '.ppm' if config['dataset'] == 'hpatches' else '.jpg' 122 | for i in range(2, 2 + num_images): 123 | image_paths.append(str(Path(path, "1" + file_ext))) 124 | warped_image_paths.append(str(Path(path, str(i) + file_ext))) 125 | homographies.append(np.loadtxt(str(Path(path, "H_1_" + str(i))))) 126 | if config['truncate']: 127 | image_paths = image_paths[:config['truncate']] 128 | warped_image_paths = warped_image_paths[:config['truncate']] 129 | homographies = homographies[:config['truncate']] 130 | files = {'image_paths': image_paths, 131 | 'warped_image_paths': warped_image_paths, 132 | 'homography': homographies} 133 | return files 134 | 135 | 136 | -------------------------------------------------------------------------------- /datasets/tum_split/train.txt: -------------------------------------------------------------------------------- 1 | rgbd_dataset_freiburg1_desk 2 | rgbd_dataset_freiburg1_room 3 | rgbd_dataset_freiburg2_desk 4 | rgbd_dataset_freiburg3_long_office_household 5 | -------------------------------------------------------------------------------- /datasets/tum_split/val.txt: -------------------------------------------------------------------------------- 1 | rgbd_dataset_freiburg1_desk2 2 | rgbd_dataset_freiburg2_xyz 3 | rgbd_dataset_freiburg3_nostructure_texture_far 4 | -------------------------------------------------------------------------------- /datasets/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/datasets/utils/__init__.py -------------------------------------------------------------------------------- /datasets/utils/photometric_augmentation.py: -------------------------------------------------------------------------------- 1 | """ Used to generate synthetic shapes 2 | 3 | """ 4 | 5 | import cv2 as cv 6 | import numpy as np 7 | import tensorflow as tf 8 | 9 | 10 | augmentations = [ 11 | 'additive_gaussian_noise', 12 | 'additive_speckle_noise', 13 | 'random_brightness', 14 | 'random_contrast', 15 | 'additive_shade', 16 | 'motion_blur' 17 | ] 18 | 19 | 20 | def additive_gaussian_noise(image, stddev_range=[5, 95]): 21 | stddev = tf.random.uniform((), *stddev_range) 22 | noise = tf.random.normal(tf.shape(input=image), stddev=stddev) 23 | noisy_image = tf.clip_by_value(image + noise, 0, 255) 24 | return noisy_image 25 | 26 | 27 | def additive_speckle_noise(image, prob_range=[0.0, 0.005]): 28 | prob = tf.random.uniform((), *prob_range) 29 | sample = tf.random.uniform(tf.shape(input=image)) 30 | noisy_image = tf.compat.v1.where(sample <= prob, tf.zeros_like(image), image) 31 | noisy_image = tf.compat.v1.where(sample >= (1. - prob), 255.*tf.ones_like(image), noisy_image) 32 | return noisy_image 33 | 34 | 35 | def random_brightness(image, max_abs_change=50): 36 | return tf.clip_by_value(tf.image.random_brightness(image, max_abs_change), 0, 255) 37 | 38 | 39 | def random_contrast(image, strength_range=[0.5, 1.5]): 40 | return tf.clip_by_value(tf.image.random_contrast(image, *strength_range), 0, 255) 41 | 42 | 43 | def additive_shade(image, nb_ellipses=20, transparency_range=[-0.5, 0.8], 44 | kernel_size_range=[250, 350]): 45 | 46 | def _py_additive_shade(img): 47 | min_dim = min(img.shape[:2]) / 4 48 | mask = np.zeros(img.shape[:2], np.uint8) 49 | for i in range(nb_ellipses): 50 | ax = int(max(np.random.rand() * min_dim, min_dim / 5)) 51 | ay = int(max(np.random.rand() * min_dim, min_dim / 5)) 52 | max_rad = max(ax, ay) 53 | x = np.random.randint(max_rad, img.shape[1] - max_rad) # center 54 | y = np.random.randint(max_rad, img.shape[0] - max_rad) 55 | angle = np.random.rand() * 90 56 | cv.ellipse(mask, (x, y), (ax, ay), angle, 0, 360, 255, -1) 57 | 58 | transparency = np.random.uniform(*transparency_range) 59 | kernel_size = np.random.randint(*kernel_size_range) 60 | if (kernel_size % 2) == 0: # kernel_size has to be odd 61 | kernel_size += 1 62 | mask = cv.GaussianBlur(mask.astype(np.float32), (kernel_size, kernel_size), 0) 63 | shaded = img * (1 - transparency * mask[..., np.newaxis]/255.) 64 | return np.clip(shaded, 0, 255) 65 | 66 | shaded = tf.compat.v1.py_func(_py_additive_shade, [image], tf.float32) 67 | res = tf.reshape(shaded, tf.shape(input=image)) 68 | return res 69 | 70 | 71 | def motion_blur(image, max_kernel_size=10): 72 | 73 | def _py_motion_blur(img): 74 | # Either vertial, hozirontal or diagonal blur 75 | mode = np.random.choice(['h', 'v', 'diag_down', 'diag_up']) 76 | ksize = np.random.randint(0, (max_kernel_size+1)/2)*2 + 1 # make sure is odd 77 | center = int((ksize-1)/2) 78 | kernel = np.zeros((ksize, ksize)) 79 | if mode == 'h': 80 | kernel[center, :] = 1. 81 | elif mode == 'v': 82 | kernel[:, center] = 1. 83 | elif mode == 'diag_down': 84 | kernel = np.eye(ksize) 85 | elif mode == 'diag_up': 86 | kernel = np.flip(np.eye(ksize), 0) 87 | var = ksize * ksize / 16. 88 | grid = np.repeat(np.arange(ksize)[:, np.newaxis], ksize, axis=-1) 89 | gaussian = np.exp(-(np.square(grid-center)+np.square(grid.T-center))/(2.*var)) 90 | kernel *= gaussian 91 | kernel /= np.sum(kernel) 92 | img = cv.filter2D(img, -1, kernel) 93 | return img 94 | 95 | blurred = tf.compat.v1.py_func(_py_motion_blur, [image], tf.float32) 96 | return tf.reshape(blurred, tf.shape(input=image)) 97 | -------------------------------------------------------------------------------- /datasets/utils/pipeline.py: -------------------------------------------------------------------------------- 1 | import tensorflow as tf 2 | import cv2 as cv 3 | import numpy as np 4 | 5 | from datasets.utils import photometric_augmentation as photaug 6 | from models.homographies import (sample_homography, compute_valid_mask, 7 | warp_points, filter_points) 8 | 9 | 10 | def parse_primitives(names, all_primitives): 11 | p = all_primitives if (names == 'all') \ 12 | else (names if isinstance(names, list) else [names]) 13 | assert set(p) <= set(all_primitives) 14 | return p 15 | 16 | -------------------------------------------------------------------------------- /datasets/utils/util.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import math 3 | import matplotlib.pyplot as plt 4 | import matplotlib.image as mpimg 5 | from mpl_toolkits.mplot3d import Axes3D 6 | from matplotlib.patches import ConnectionPatch 7 | 8 | 9 | def toHomogeneous(coords): 10 | tmp = np.expand_dims(np.ones(len(coords)), axis=0) 11 | return np.concatenate((coords, tmp.T), axis=1) 12 | 13 | def fromHomogeneous(coords): 14 | return np.array([np.array([p[0]/p[2], p[1]/p[2]]) for p in coords]) 15 | 16 | def get_inverse(mat): 17 | R = mat[0:3, 0:3].T 18 | t = mat[0:3, 3] 19 | t = -R @ t 20 | z = np.array([[0, 0, 0, 1]]) 21 | tmp = np.concatenate((R, t.reshape(-1, 1)), axis=1) 22 | return np.concatenate((tmp, z), axis=0) 23 | 24 | def plot_corr(img1, img2, img1_pts, img2_pts, vsplit=False, figsize=(20, 15)): 25 | plot1 = 211 26 | plot2 = 212 27 | if vsplit: 28 | plot1 = 121 29 | plot2 = 122 30 | 31 | fig = plt.figure(figsize=figsize) 32 | ax1 = plt.subplot(plot1) 33 | ax1.imshow(img1, cmap='gray', aspect = "auto") 34 | ax1.scatter(img1_pts[:, 0], img1_pts[:, 1], marker='+') 35 | ax1.set_xticklabels([]) 36 | ax1.set_yticklabels([]) 37 | 38 | ax2 = plt.subplot(plot2) 39 | ax2.imshow(img2, cmap='gray', aspect = "auto") 40 | ax2.scatter(img2_pts[:, 0], img2_pts[:, 1], marker='+') 41 | ax2.set_xticklabels([]) 42 | ax2.set_yticklabels([]) 43 | 44 | for i in range(len(img1_pts)): 45 | xy1 = (img1_pts[i,0],img1_pts[i,1]) 46 | xy2 = (img2_pts[i,0],img2_pts[i,1]) 47 | con = ConnectionPatch(xyA=xy2, xyB=xy1, coordsA="data", coordsB="data", 48 | axesA=ax2, axesB=ax1, color='#53F242') 49 | ax2.add_artist(con) 50 | 51 | plt.subplots_adjust(wspace=0, hspace=0) 52 | # plt.tight_layout() 53 | plt.show() 54 | 55 | 56 | def plot_img(img, pts, pts2=None, figsize=(20, 15)): 57 | plt.figure(figsize=figsize) 58 | plt.imshow(img, cmap='gray') 59 | plt.scatter(pts[:, 0], pts[:, 1], c='c', marker='+') 60 | if pts2 is not None: 61 | plt.scatter(pts2[:, 0], pts2[:, 1], c='red', marker='x') 62 | 63 | plt.tight_layout() 64 | plt.show() 65 | 66 | 67 | # CONVENTION FOR QUATERNION: [qx, qy, qz, qw] 68 | _EPS = np.finfo(float).eps * 4.0 69 | def from_quaternion(quaternion): 70 | q = np.array(quaternion, dtype=np.float64, copy=True) 71 | n = np.dot(q, q) 72 | if n < _EPS: 73 | return np.identity(4) 74 | q *= math.sqrt(2.0 / n) 75 | q = np.outer(q, q) 76 | return np.array([ 77 | [1.0-q[1, 1]-q[2, 2], q[0, 1]-q[2, 3], q[0, 2]+q[1, 3]], 78 | [ q[0, 1]+q[2, 3], 1.0-q[0, 0]-q[2, 2], q[1, 2]-q[0, 3]], 79 | [ q[0, 2]-q[1, 3], q[1, 2]+q[0, 3], 1.0-q[0, 0]-q[1, 1]]]) 80 | 81 | def to_quaternion(matrix, isprecise=False): 82 | M = np.array(matrix, dtype=np.float64, copy=False)[:4, :4] 83 | if isprecise: 84 | q = np.empty((4, )) 85 | t = np.trace(M) 86 | if t > M[3, 3]: 87 | q[0] = t 88 | q[3] = M[1, 0] - M[0, 1] 89 | q[2] = M[0, 2] - M[2, 0] 90 | q[1] = M[2, 1] - M[1, 2] 91 | else: 92 | i, j, k = 1, 2, 3 93 | if M[1, 1] > M[0, 0]: 94 | i, j, k = 2, 3, 1 95 | if M[2, 2] > M[i, i]: 96 | i, j, k = 3, 1, 2 97 | t = M[i, i] - (M[j, j] + M[k, k]) + M[3, 3] 98 | q[i] = t 99 | q[j] = M[i, j] + M[j, i] 100 | q[k] = M[k, i] + M[i, k] 101 | q[3] = M[k, j] - M[j, k] 102 | q *= 0.5 / math.sqrt(t * M[3, 3]) 103 | else: 104 | m00 = M[0, 0] 105 | m01 = M[0, 1] 106 | m02 = M[0, 2] 107 | m10 = M[1, 0] 108 | m11 = M[1, 1] 109 | m12 = M[1, 2] 110 | m20 = M[2, 0] 111 | m21 = M[2, 1] 112 | m22 = M[2, 2] 113 | # symmetric matrix K 114 | K = np.array([[m00-m11-m22, 0.0, 0.0, 0.0], 115 | [m01+m10, m11-m00-m22, 0.0, 0.0], 116 | [m02+m20, m12+m21, m22-m00-m11, 0.0], 117 | [m21-m12, m02-m20, m10-m01, m00+m11+m22]]) 118 | K /= 3.0 119 | # quaternion is eigenvector of K that corresponds to largest eigenvalue 120 | w, V = np.linalg.eigh(K) 121 | q = V[[0, 1, 2, 3], np.argmax(w)] 122 | if q[3] < 0.0: 123 | np.negative(q, q) 124 | return q 125 | 126 | def quaternion_multiply(quaternion1, quaternion0): 127 | x0, y0, z0, w0 = quaternion0 128 | x1, y1, z1, w1 = quaternion1 129 | return np.array([x1*w0 + y1*z0 - z1*y0 + w1*x0, 130 | -x1*z0 + y1*w0 + z1*x0 + w1*y0, 131 | x1*y0 - y1*x0 + z1*w0 + w1*z0, 132 | -x1*x0 - y1*y0 - z1*z0 + w1*w0], dtype=np.float64) 133 | 134 | def quaternion_inverse(quaternion): 135 | q = np.array(quaternion, dtype=np.float64, copy=True) 136 | np.negative(q[:3], q[:3]) 137 | return q / np.dot(q, q) 138 | 139 | def dump_pose_TUM(out_file, poses, times): 140 | # First frame as the origin 141 | first_pose = np.linalg.inv(poses[0]) 142 | with open(out_file, 'w') as f: 143 | for p in range(len(times)): 144 | this_pose = poses[p] 145 | this_pose = first_pose @ this_pose 146 | tx = this_pose[0, 3] 147 | ty = this_pose[1, 3] 148 | tz = this_pose[2, 3] 149 | rot = this_pose[:3, :3] 150 | qx, qy, qz, qw = to_quaternion(rot) 151 | # print('%f %f %f %f %f %f %f %f\n' % (times[p], tx, ty, tz, qx, qy, qz, qw)) 152 | f.write('%s %f %f %f %f %f %f %f\n' % (times[p], tx, ty, tz, qx, qy, qz, qw)) 153 | 154 | def build_pose(R, t): 155 | z = np.array([[0, 0, 0, 1]]) 156 | if len(t.shape) == 1: 157 | assert t.shape[0] == 3 158 | tmp = np.concatenate((R, np.expand_dims(t, 1)), axis=1) 159 | return np.concatenate((tmp, z), axis=0) 160 | 161 | if len(t.shape) == 2: 162 | l = [] 163 | for i in range(t.shape[0]): 164 | tmp = np.concatenate((R[i], np.expand_dims(t[i], 1)), axis=1) 165 | l += [np.concatenate((tmp, z), axis=0)] 166 | 167 | return np.array(l) 168 | else: 169 | raise ValueError("translation vector has a shape that is more than 2 dimensions.") 170 | 171 | # def eval(gt_dir, pred_dir): 172 | # pred_files = glob.glob(pred_dir + '/*.txt') 173 | # ate_all = [] 174 | # for i in range(len(pred_files)): 175 | # gtruth_file = os.path.join(gt_dir, os.path.basename(pred_files[i])) 176 | 177 | # if not os.path.exists(gtruth_file): 178 | # print("Ground truth file not found!") 179 | # print('\t> ground truth file: ' + gtruth_file) 180 | # print('\t> pred file: ' + pred_files[i]) 181 | # continue 182 | 183 | # ate = compute_ate(gtruth_file, pred_files[i]) 184 | # if ate == False: 185 | # continue 186 | # ate_all.append(ate) 187 | 188 | # ate_all = np.array(ate_all) 189 | # # print("Predictions dir: %s" % pred_dir) 190 | # print("ATE mean: %.4f, std: %.4f" % (np.mean(ate_all), np.std(ate_all))) -------------------------------------------------------------------------------- /imgs/HPATCHES.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/imgs/HPATCHES.png -------------------------------------------------------------------------------- /imgs/SLAM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/imgs/SLAM.png -------------------------------------------------------------------------------- /imgs/SSp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/imgs/SSp.png -------------------------------------------------------------------------------- /logs/magicpoint_synth20/checkpoints/superPointNet_200000_checkpoint.pth.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/logs/magicpoint_synth20/checkpoints/superPointNet_200000_checkpoint.pth.tar -------------------------------------------------------------------------------- /logs/magicpoint_synth_t2/checkpoints/superPointNet_100000_checkpoint.pth.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/logs/magicpoint_synth_t2/checkpoints/superPointNet_100000_checkpoint.pth.tar -------------------------------------------------------------------------------- /logs/magicpoint_synth_t2/config.yml: -------------------------------------------------------------------------------- 1 | data: 2 | add_augmentation_to_test_set: false 3 | augmentation: 4 | homographic: 5 | enable: true 6 | enable_train: true 7 | enable_val: false 8 | params: 9 | allow_artifacts: true 10 | max_angle: 1.57 11 | patch_ratio: 0.8 12 | perspective: true 13 | perspective_amplitude_x: 0.2 14 | perspective_amplitude_y: 0.2 15 | rotation: true 16 | scaling: true 17 | scaling_amplitude: 0.2 18 | translation: true 19 | translation_overflow: 0.05 20 | valid_border_margin: 2 21 | photometric: 22 | enable: true 23 | enable_train: true 24 | enable_val: false 25 | params: 26 | additive_gaussian_noise: 27 | stddev_range: 28 | - 0 29 | - 15 30 | additive_shade: 31 | kernel_size_range: 32 | - 50 33 | - 100 34 | transparency_range: 35 | - -0.5 36 | - 0.8 37 | additive_speckle_noise: 38 | prob_range: 39 | - 0 40 | - 0.0035 41 | motion_blur: 42 | max_kernel_size: 7 43 | random_brightness: 44 | max_abs_change: 75 45 | random_contrast: 46 | strength_range: 47 | - 0.3 48 | - 1.8 49 | primitives: 50 | - random_brightness 51 | - random_contrast 52 | - additive_speckle_noise 53 | - additive_gaussian_noise 54 | - additive_shade 55 | - motion_blur 56 | cache_in_memory: true 57 | dataset: SyntheticDataset_gaussian 58 | gaussian_label: 59 | enable: false 60 | params: 61 | GaussianBlur: 62 | sigma: 0.2 63 | preprocessing: 64 | blur_size: 21 65 | resize: 66 | - 120 67 | - 160 68 | primitives: all 69 | suffix: v6 70 | truncate: 71 | draw_ellipses: 0.3 72 | draw_stripes: 0.2 73 | gaussian_noise: 0.1 74 | warped_pair: 75 | enable: false 76 | params: 77 | allow_artifacts: true 78 | max_angle: 1.57 79 | patch_ratio: 0.85 80 | perspective: true 81 | perspective_amplitude_x: 0.2 82 | perspective_amplitude_y: 0.2 83 | rotation: true 84 | scaling: true 85 | scaling_amplitude: 0.2 86 | translation: true 87 | valid_border_margin: 3 88 | front_end_model: Train_model_heatmap 89 | model: 90 | batch_size: 64 91 | dense_loss: 92 | enable: false 93 | params: 94 | descriptor_dist: 4 95 | lambda_d: 800 96 | detection_threshold: 0.001 97 | detector_loss: 98 | loss_type: softmax 99 | eval_batch_size: 16 100 | kernel_reg: 0.0 101 | lambda_loss: 0 102 | learning_rate: 0.001 103 | name: SuperPointNet_gauss2 104 | nms: 4 105 | other_settings: train 2d, gauss 0.5 106 | params: {} 107 | sparse_loss: 108 | enable: true 109 | params: 110 | dist: cos 111 | lamda_d: 1 112 | method: 2d 113 | num_masked_non_matches_per_match: 100 114 | num_matching_attempts: 1000 115 | reset_iter: true 116 | retrain: true 117 | save_interval: 2000 118 | seed: 0 119 | tensorboard_interval: 1000 120 | train_iter: 200000 121 | train_show_interval: 1000 122 | validation_interval: 1000 123 | validation_size: 10 124 | -------------------------------------------------------------------------------- /logs/superpoint_coco_2017_ML22/checkpoints/superPointNet_185000_checkpoint.pth.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/logs/superpoint_coco_2017_ML22/checkpoints/superPointNet_185000_checkpoint.pth.tar -------------------------------------------------------------------------------- /logs/superpoint_coco_2017_ML22/config.yml: -------------------------------------------------------------------------------- 1 | data: 2 | augmentation: 3 | homographic: 4 | enable: false 5 | photometric: 6 | enable: true 7 | params: 8 | additive_gaussian_noise: 9 | stddev_range: 10 | - 0 11 | - 10 12 | additive_shade: 13 | kernel_size_range: 14 | - 100 15 | - 150 16 | transparency_range: 17 | - -0.5 18 | - 0.5 19 | additive_speckle_noise: 20 | prob_range: 21 | - 0 22 | - 0.0035 23 | motion_blur: 24 | max_kernel_size: 3 25 | random_brightness: 26 | max_abs_change: 50 27 | random_contrast: 28 | strength_range: 29 | - 0.5 30 | - 1.5 31 | primitives: 32 | - random_brightness 33 | - random_contrast 34 | - additive_speckle_noise 35 | - additive_gaussian_noise 36 | - additive_shade 37 | - motion_blur 38 | cache_in_memory: false 39 | dataset: Coco 40 | gaussian_label: 41 | enable: true 42 | params: 43 | GaussianBlur: 44 | sigma: 0.2 45 | labels: logs/magicpoint_synth_homoAdapt_coco/predictions 46 | preprocessing: 47 | resize: 48 | - 240 49 | - 320 50 | root: null 51 | root_split_txt: null 52 | semantic: false 53 | warped_pair: 54 | enable: true 55 | params: 56 | allow_artifacts: true 57 | max_angle: 1.57 58 | patch_ratio: 0.85 59 | perspective: true 60 | perspective_amplitude_x: 0.2 61 | perspective_amplitude_y: 0.2 62 | rotation: true 63 | scaling: true 64 | scaling_amplitude: 0.2 65 | translation: true 66 | valid_border_margin: 3 67 | front_end_model: Train_model_heatmap_all 68 | model: 69 | batch_size: 16 70 | dense_loss: 71 | enable: false 72 | params: 73 | descriptor_dist: 4 74 | lambda_d: 800 75 | detection_threshold: 0.015 76 | detector_loss: 77 | loss_type: softmax 78 | eval_batch_size: 5 79 | lambda_loss: 1 80 | learning_rate: 0.001 81 | name: SuperPointNet_gauss2 82 | nms: 4 83 | other_settings: train 2d, gauss 0.2 84 | params: {} 85 | real_batch_size: 16 86 | sparse_loss: 87 | enable: true 88 | params: 89 | dist: cos 90 | lamda_d: 1 91 | method: 2d 92 | num_masked_non_matches_per_match: 100 93 | num_matching_attempts: 1000 94 | pretrained: null 95 | reset_iter: true 96 | retrain: true 97 | save_interval: 5000 98 | tensorboard_interval: 200 99 | train_iter: 200000 100 | training: 101 | workers_train: 16 102 | workers_val: 2 103 | validation_interval: 1000 104 | validation_size: 10 105 | -------------------------------------------------------------------------------- /logs/superpoint_coco_ssmall_ML22/checkpoints/superPointNet_180000_checkpoint.pth.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/logs/superpoint_coco_ssmall_ML22/checkpoints/superPointNet_180000_checkpoint.pth.tar -------------------------------------------------------------------------------- /logs/superpoint_coco_ssmall_ML22/config.yml: -------------------------------------------------------------------------------- 1 | data: 2 | augmentation: 3 | homographic: 4 | enable: false 5 | photometric: 6 | enable: true 7 | params: 8 | additive_gaussian_noise: 9 | stddev_range: 10 | - 0 11 | - 10 12 | additive_shade: 13 | kernel_size_range: 14 | - 100 15 | - 150 16 | transparency_range: 17 | - -0.5 18 | - 0.5 19 | additive_speckle_noise: 20 | prob_range: 21 | - 0 22 | - 0.0035 23 | motion_blur: 24 | max_kernel_size: 3 25 | random_brightness: 26 | max_abs_change: 50 27 | random_contrast: 28 | strength_range: 29 | - 0.5 30 | - 1.5 31 | primitives: 32 | - random_brightness 33 | - random_contrast 34 | - additive_speckle_noise 35 | - additive_gaussian_noise 36 | - additive_shade 37 | - motion_blur 38 | cache_in_memory: false 39 | dataset: Coco_sem 40 | gaussian_label: 41 | enable: true 42 | params: 43 | GaussianBlur: 44 | sigma: 0.2 45 | ignore_class: 133 46 | labels: logs/magicpoint_synth_homoAdapt_coco/predictions 47 | preprocessing: 48 | resize: 49 | - 240 50 | - 320 51 | root: null 52 | root_split_txt: null 53 | sem_labels: datasets/COCO/annotations 54 | semantic: true 55 | warped_pair: 56 | enable: true 57 | params: 58 | allow_artifacts: true 59 | max_angle: 1.57 60 | patch_ratio: 0.85 61 | perspective: true 62 | perspective_amplitude_x: 0.2 63 | perspective_amplitude_y: 0.2 64 | rotation: true 65 | scaling: true 66 | scaling_amplitude: 0.2 67 | translation: true 68 | valid_border_margin: 3 69 | front_end_model: Train_model_heatmap_all 70 | model: 71 | batch_size: 16 72 | dense_loss: 73 | enable: false 74 | params: 75 | descriptor_dist: 4 76 | lambda_d: 800 77 | detection_threshold: 0.015 78 | detector_loss: 79 | loss_type: softmax 80 | eval_batch_size: 5 81 | lambda_loss: 1 82 | learning_rate: 0.0025 83 | name: SuperPointNet_gauss2_ssmall 84 | nms: 4 85 | other_settings: train 2d, gauss 0.2 86 | params: 87 | n_classes: 133 88 | real_batch_size: 16 89 | seg_head: 90 | loss: cross_entropy 91 | loss_wheight: 1 92 | metric: mIou 93 | optimizer: AdamB 94 | sparse_loss: 95 | enable: true 96 | params: 97 | dist: cos 98 | lamda_d: 1 99 | method: 2d 100 | num_masked_non_matches_per_match: 100 101 | num_matching_attempts: 1000 102 | pretrained: null 103 | reset_iter: true 104 | retrain: true 105 | save_interval: 5000 106 | tensorboard_interval: 200 107 | train_iter: 200000 108 | training: 109 | workers_train: 16 110 | workers_val: 4 111 | validation_interval: 1000 112 | validation_size: 10 113 | -------------------------------------------------------------------------------- /models/SubpixelNet.py: -------------------------------------------------------------------------------- 1 | """Old version of SuperpointNet. Use it together with 2 | logs/magicpoint_synth20/checkpoints/superPointNet_200000_checkpoint.pth.tar 3 | 4 | """ 5 | 6 | import torch 7 | import torch.nn as nn 8 | from torch.nn.init import xavier_uniform_, zeros_ 9 | from models.unet_parts import * 10 | 11 | # from models.SubpixelNet import SubpixelNet 12 | class SubpixelNet(torch.nn.Module): 13 | """ Pytorch definition of SuperPoint Network. """ 14 | def __init__(self, subpixel_channel=1): 15 | super(SubpixelNet, self).__init__() 16 | c1, c2, c3, c4, c5, d1 = 64, 64, 128, 128, 256, 256 17 | det_h = 65 18 | self.inc = inconv(1, c1) 19 | self.down1 = down(c1, c2) 20 | self.down2 = down(c2, c3) 21 | self.down3 = down(c3, c4) 22 | # self.down4 = down(c4, 512) 23 | self.up1 = up(c4+c3, c2) 24 | self.up2 = up(c2+c2, c1) 25 | self.up3 = up(c1+c1, c1) 26 | self.outc = outconv(c1, subpixel_channel) 27 | self.relu = torch.nn.ReLU(inplace=True) 28 | # self.outc = outconv(64, n_classes) 29 | # Detector Head. 30 | self.convPa = torch.nn.Conv2d(c4, c5, kernel_size=3, stride=1, padding=1) 31 | self.bnPa = nn.BatchNorm2d(c5) 32 | self.convPb = torch.nn.Conv2d(c5, det_h, kernel_size=1, stride=1, padding=0) 33 | self.bnPb = nn.BatchNorm2d(det_h) 34 | # Descriptor Head. 35 | self.convDa = torch.nn.Conv2d(c4, c5, kernel_size=3, stride=1, padding=1) 36 | self.bnDa = nn.BatchNorm2d(c5) 37 | self.convDb = torch.nn.Conv2d(c5, d1, kernel_size=1, stride=1, padding=0) 38 | self.bnDb = nn.BatchNorm2d(d1) 39 | 40 | @staticmethod 41 | def soft_argmax_2d(patches): 42 | """ 43 | params: 44 | patches: (B, N, H, W) 45 | return: 46 | coor: (B, N, 2) (x, y) 47 | 48 | """ 49 | import torchgeometry as tgm 50 | m = tgm.contrib.SpatialSoftArgmax2d() 51 | coords = m(patches) # 1x4x2 52 | return coords 53 | 54 | def forward(self, x, subpixel=False): 55 | """ Forward pass that jointly computes unprocessed point and descriptor 56 | tensors. 57 | Input 58 | x: Image pytorch tensor shaped N x 1 x patch_size x patch_size. 59 | Output 60 | semi: Output point pytorch tensor shaped N x 65 x H/8 x W/8. 61 | desc: Output descriptor pytorch tensor shaped N x 256 x H/8 x W/8. 62 | """ 63 | # Let's stick to this version: first BN, then relu 64 | x1 = self.inc(x) 65 | x2 = self.down1(x1) 66 | x3 = self.down2(x2) 67 | x4 = self.down3(x3) 68 | # x5 = self.down4(x4) 69 | 70 | cPa = self.bnPa(self.relu(self.convPa(x4))) 71 | semi = self.bnPb(self.convPb(cPa)) 72 | # Descriptor Head. 73 | cDa = self.bnDa(self.relu(self.convDa(x4))) 74 | desc = self.bnDb(self.convDb(cDa)) 75 | 76 | dn = torch.norm(desc, p=2, dim=1) # Compute the norm. 77 | desc = desc.div(torch.unsqueeze(dn, 1)) # Divide by norm to normalize. 78 | 79 | # subpixel = True 80 | if subpixel: 81 | x = self.up1(x4, x3) 82 | x = self.up2(x, x2) 83 | x = self.up3(x, x1) 84 | x = self.outc(x) 85 | # print("x: ", x.shape) 86 | return semi, desc, x 87 | 88 | return semi, desc 89 | 90 | 91 | 92 | if __name__ == '__main__': 93 | 94 | device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') 95 | model = SubpixelNet() 96 | model = model.to(device) 97 | 98 | 99 | # check keras-like model summary using torchsummary 100 | from torchsummary import summary 101 | summary(model, input_size=(1, 240, 320)) 102 | -------------------------------------------------------------------------------- /models/__init__.py: -------------------------------------------------------------------------------- 1 | def get_model(name): 2 | mod = __import__('superpoint.models.{}'.format(name), fromlist=['']) 3 | return getattr(mod, _module_to_class(name)) 4 | 5 | 6 | def _module_to_class(name): 7 | return ''.join(n.capitalize() for n in name.split('_')) 8 | -------------------------------------------------------------------------------- /models/classical_detectors_descriptors.py: -------------------------------------------------------------------------------- 1 | import tensorflow as tf 2 | import numpy as np 3 | import cv2 4 | 5 | # from .base_model import BaseModel 6 | # from .utils import box_nms 7 | 8 | def classical_detector_descriptor(im, **config): 9 | im = np.uint8(im) 10 | if config['method'] == 'sift': 11 | sift = cv2.xfeatures2d.SIFT_create(nfeatures=1500) 12 | keypoints, desc = sift.detectAndCompute(im, None) 13 | responses = np.array([k.response for k in keypoints]) 14 | keypoints = np.array([k.pt for k in keypoints]).astype(int) 15 | desc = np.array(desc) 16 | 17 | detections = np.zeros(im.shape[:2], np.float) 18 | detections[keypoints[:, 1], keypoints[:, 0]] = responses 19 | descriptors = np.zeros((im.shape[0], im.shape[1], 128), np.float) 20 | descriptors[keypoints[:, 1], keypoints[:, 0]] = desc 21 | 22 | elif config['method'] == 'orb': 23 | orb = cv2.ORB_create(nfeatures=1500) 24 | keypoints, desc = orb.detectAndCompute(im, None) 25 | responses = np.array([k.response for k in keypoints]) 26 | keypoints = np.array([k.pt for k in keypoints]).astype(int) 27 | desc = np.array(desc) 28 | 29 | detections = np.zeros(im.shape[:2], np.float) 30 | detections[keypoints[:, 1], keypoints[:, 0]] = responses 31 | descriptors = np.zeros((im.shape[0], im.shape[1], 32), np.float) 32 | descriptors[keypoints[:, 1], keypoints[:, 0]] = desc 33 | 34 | detections = detections.astype(np.float32) 35 | descriptors = descriptors.astype(np.float32) 36 | return (detections, descriptors) 37 | 38 | # from models.classical_detector_descriptors import SIFT_det 39 | def SIFT_det(img, img_rgb, visualize=False, nfeatures=2000): 40 | """ 41 | return: 42 | x_all: np [N, 2] (x, y) 43 | des: np [N, 128] (descriptors) 44 | """ 45 | # Initiate SIFT detector 46 | # pip install opencv-python==3.4.2.16, opencv-contrib-python==3.4.2.16 47 | # https://www.pyimagesearch.com/2015/07/16/where-did-sift-and-surf-go-in-opencv-3/ 48 | img = np.uint8(img) 49 | # print("img: ", img) 50 | sift = cv2.xfeatures2d.SIFT_create(contrastThreshold=1e-5) 51 | 52 | # find the keypoints and descriptors with SIFT 53 | kp, des = sift.detectAndCompute(img, None) 54 | # print("# kps: {}, descriptors: {}".format(len(kp), des.shape)) 55 | x_all = np.array([p.pt for p in kp]) 56 | 57 | if visualize: 58 | plt.figure(figsize=(30, 4)) 59 | plt.imshow(img_rgb) 60 | 61 | plt.scatter(x_all[:, 0], x_all[:, 1], s=10, marker='o', c='y') 62 | plt.show() 63 | 64 | # return x_all, kp, des 65 | 66 | return x_all, des 67 | 68 | ''' 69 | class ClassicalDetectorsDescriptors(BaseModel): 70 | input_spec = { 71 | 'image': {'shape': [None, None, None, 1], 'type': tf.float32} 72 | } 73 | default_config = { 74 | 'method': 'sift', # 'orb' 75 | 'threshold': 0.5, 76 | 'nms': 4, 77 | 'top_k': 300, 78 | } 79 | trainable = False 80 | 81 | def _model(self, inputs, mode, **config): 82 | im = inputs['image'] 83 | with tf.device('/cpu:0'): 84 | keypoints, descriptors = tf.map_fn(lambda i: tf.py_func( 85 | lambda x: classical_detector_descriptor(x, **config), 86 | [i], 87 | (tf.float32, tf.float32)), 88 | im, [tf.float32, tf.float32]) 89 | prob = keypoints 90 | prob_nms = prob 91 | if config['nms']: 92 | prob_nms = tf.map_fn(lambda p: box_nms(p, config['nms'], min_prob=0., 93 | keep_top_k=config['top_k']), prob) 94 | pred = tf.cast(tf.greater_equal(prob_nms, config['threshold']), tf.int32) 95 | keypoints = {'prob': prob, 'prob_nms': prob_nms, 'pred': pred} 96 | return {**keypoints, 'descriptors': descriptors} 97 | 98 | def _loss(self, outputs, inputs, **config): 99 | raise NotImplementedError 100 | 101 | def _metrics(self, outputs, inputs, **config): 102 | pred = outputs['pred'] 103 | labels = inputs['keypoint_map'] 104 | precision = tf.reduce_sum(pred*labels) / tf.reduce_sum(pred) 105 | recall = tf.reduce_sum(pred*labels) / tf.reduce_sum(labels) 106 | return {'precision': precision, 'recall': recall} 107 | ''' -------------------------------------------------------------------------------- /models/senner_models.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import torch.nn as nn 3 | import numpy as np 4 | from models.unet_parts import * 5 | 6 | # Unet backbone 7 | class unetback(nn.Module): 8 | def __init__(self): 9 | super(unetback, self).__init__() 10 | c1, c2, c3, c4, c5, d1 = 64, 64, 128, 128, 256, 256 11 | det_h = 65 12 | 13 | self.inc = inconv(1, c1) 14 | self.down1 = down(c1, c2) 15 | self.down2 = down(c2, c3) 16 | self.down3 = down(c3, c4) 17 | self.relu = torch.nn.ReLU(inplace=True) 18 | 19 | def forward(self, x): 20 | # def forward(self, x): 21 | """Forward pass that jointly computes unprocessed point and descriptor 22 | tensors. 23 | Input 24 | x: Image pytorch tensor shaped N x 1 x patch_size x patch_size. 25 | Output 26 | x_hw: image shape 27 | x4: extracted features 28 | """ 29 | x_hw = x.shape[2:] 30 | 31 | # Let's stick to this version: first BN, then relu 32 | x1 = self.inc(x) 33 | x2 = self.down1(x1) 34 | x3 = self.down2(x2) 35 | x4 = self.down3(x3) 36 | 37 | return x4, x_hw 38 | 39 | # interest point detector 40 | class detHead(nn.Module): 41 | def __init__(self): 42 | super(detHead, self).__init__() 43 | c1, c2, c3, c4, c5, d1 = 64, 64, 128, 128, 256, 256 44 | det_h = 65 45 | 46 | self.relu = torch.nn.ReLU(inplace=True) 47 | # Detector Head. 48 | self.convPa = torch.nn.Conv2d(c4, c5, kernel_size=3, stride=1, padding=1) 49 | self.bnPa = nn.BatchNorm2d(c5) 50 | self.convPb = torch.nn.Conv2d(c5, det_h, kernel_size=1, stride=1, padding=0) 51 | self.bnPb = nn.BatchNorm2d(det_h) 52 | 53 | def forward(self, x4, x_hw=0): 54 | # Detector Head. 55 | cPa = self.relu(self.bnPa(self.convPa(x4))) 56 | semi = self.bnPb(self.convPb(cPa)) 57 | 58 | return semi 59 | 60 | # descriptor head 61 | class descHead(nn.Module): 62 | def __init__(self): 63 | super(descHead, self).__init__() 64 | c1, c2, c3, c4, c5, d1 = 64, 64, 128, 128, 256, 256 65 | det_h = 65 66 | 67 | self.relu = torch.nn.ReLU(inplace=True) 68 | 69 | # Descriptor Head. 70 | self.convDa = torch.nn.Conv2d(c4, c5, kernel_size=3, stride=1, padding=1) 71 | self.bnDa = nn.BatchNorm2d(c5) 72 | self.convDb = torch.nn.Conv2d(c5, d1, kernel_size=1, stride=1, padding=0) 73 | self.bnDb = nn.BatchNorm2d(d1) 74 | 75 | def forward(self, x4, x_hw=0): 76 | # Descriptor Head. 77 | cDa = self.relu(self.bnDa(self.convDa(x4))) 78 | desc = self.bnDb(self.convDb(cDa)) 79 | 80 | dn = torch.norm(desc, p=2, dim=1) # Compute the norm. 81 | desc = desc.div(torch.unsqueeze(dn, 1)) # Divide by norm to normalize. 82 | 83 | return desc 84 | 85 | # sematic head 86 | class semHead(nn.Module): 87 | def __init__(self, n_classes=133): 88 | super(semHead, self).__init__() 89 | c1, c2, c3, c4, c5, d1 = 64, 64, 128, 128, 256, 256 90 | det_h = 65 91 | 92 | self.relu = torch.nn.ReLU(inplace=True) 93 | 94 | # Seg Head. 95 | self.convDS = torch.nn.Conv2d(c4, c5, kernel_size=3, stride=1, padding=1) 96 | self.bnS1 = nn.BatchNorm2d(c5) 97 | self.convSout = torch.nn.Conv2d(c5, n_classes, kernel_size=1, stride=1, padding=0) 98 | 99 | def forward(self, x4, x_hw): 100 | sem = self.convDS(x4) 101 | sem = self.bnS1(sem) 102 | sem = self.relu(sem) 103 | sem = self.convSout(sem) 104 | sem = F.interpolate(sem, x_hw, mode="bilinear", align_corners=False) 105 | 106 | return sem 107 | 108 | # model dict for central dir method 109 | def get_senner_model(config, device, semantic): 110 | model = {} 111 | 112 | model["enc"] = unetback() 113 | model["semi"] = detHead() 114 | model["desc"] = descHead() 115 | if semantic: 116 | model["sem"] = semHead() 117 | model["sem"].to(device) 118 | 119 | model["enc"].to(device) 120 | model["semi"].to(device) 121 | model["desc"].to(device) 122 | 123 | return model 124 | -------------------------------------------------------------------------------- /models/unet_parts.py: -------------------------------------------------------------------------------- 1 | """U-net parts used for SuperPointNet_gauss2.py 2 | """ 3 | # sub-parts of the U-Net model 4 | 5 | import torch 6 | import torch.nn as nn 7 | import torch.nn.functional as F 8 | 9 | 10 | class double_conv(nn.Module): 11 | '''(conv => BN => ReLU) * 2''' 12 | def __init__(self, in_ch, out_ch): 13 | super(double_conv, self).__init__() 14 | self.conv = nn.Sequential( 15 | nn.Conv2d(in_ch, out_ch, 3, padding=1), 16 | nn.BatchNorm2d(out_ch), 17 | nn.ReLU(inplace=True), 18 | nn.Conv2d(out_ch, out_ch, 3, padding=1), 19 | nn.BatchNorm2d(out_ch), 20 | nn.ReLU(inplace=True) 21 | ) 22 | 23 | def forward(self, x): 24 | x = self.conv(x) 25 | return x 26 | 27 | 28 | class inconv(nn.Module): 29 | def __init__(self, in_ch, out_ch): 30 | super(inconv, self).__init__() 31 | self.conv = double_conv(in_ch, out_ch) 32 | 33 | def forward(self, x): 34 | x = self.conv(x) 35 | return x 36 | 37 | 38 | class down(nn.Module): 39 | def __init__(self, in_ch, out_ch): 40 | super(down, self).__init__() 41 | self.mpconv = nn.Sequential( 42 | nn.MaxPool2d(2), 43 | double_conv(in_ch, out_ch) 44 | ) 45 | 46 | def forward(self, x): 47 | x = self.mpconv(x) 48 | return x 49 | 50 | 51 | class up(nn.Module): 52 | def __init__(self, in_ch, out_ch, bilinear=True): 53 | super(up, self).__init__() 54 | 55 | # would be a nice idea if the upsampling could be learned too, 56 | # but my machine do not have enough memory to handle all those weights 57 | if bilinear: 58 | self.up = nn.Upsample(scale_factor=2, mode='bilinear', align_corners=True) 59 | else: 60 | self.up = nn.ConvTranspose2d(in_ch//2, in_ch//2, 2, stride=2) 61 | 62 | self.conv = double_conv(in_ch, out_ch) 63 | 64 | def forward(self, x1, x2): 65 | x1 = self.up(x1) 66 | 67 | # input is CHW 68 | diffY = x2.size()[2] - x1.size()[2] 69 | diffX = x2.size()[3] - x1.size()[3] 70 | 71 | x1 = F.pad(x1, (diffX // 2, diffX - diffX//2, 72 | diffY // 2, diffY - diffY//2)) 73 | 74 | # for padding issues, see 75 | # https://github.com/HaiyongJiang/U-Net-Pytorch-Unstructured-Buggy/commit/0e854509c2cea854e247a9c615f175f76fbb2e3a 76 | # https://github.com/xiaopeng-liao/Pytorch-UNet/commit/8ebac70e633bac59fc22bb5195e513d5832fb3bd 77 | 78 | x = torch.cat([x2, x1], dim=1) 79 | x = self.conv(x) 80 | return x 81 | 82 | 83 | class outconv(nn.Module): 84 | def __init__(self, in_ch, out_ch): 85 | super(outconv, self).__init__() 86 | self.conv = nn.Conv2d(in_ch, out_ch, 1) 87 | 88 | def forward(self, x): 89 | x = self.conv(x) 90 | return x 91 | -------------------------------------------------------------------------------- /pretrained/superpoint_v1.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/pretrained/superpoint_v1.pth -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | # torch >= 0.4.1 2 | # torchvision 3 | argparse 4 | scipy 5 | opencv-python==3.4.2.16 6 | opencv-contrib-python==3.4.2.16 7 | matplotlib 8 | imageio 9 | tqdm 10 | tensorflow==1.14.0 11 | tensorboardX 12 | tqdm 13 | pyyaml 14 | imageio 15 | imgaug 16 | jupyter 17 | scikit-learn 18 | 19 | torchgeometry 20 | torchsummary 21 | coloredlogs 22 | -------------------------------------------------------------------------------- /requirements_torch.txt: -------------------------------------------------------------------------------- 1 | torch 2 | torchvision 3 | -------------------------------------------------------------------------------- /run_export.sh: -------------------------------------------------------------------------------- 1 | ## quick script to run export and evaluation 2 | 3 | export_folder='superpoint_coco_heat2_0_170k_nms4_det0.015' 4 | # export_folder='superpoint_kitti_heat2_0' 5 | echo $export_folder 6 | # python3 export.py export_descriptor configs/magicpoint_repeatability_heatmap.yaml $export_folder 7 | python3 evaluation.py /home/yyjau/Documents/deepSfm_test/logs/$export_folder/predictions --repeatibility --homography --outputImg --plotMatching 8 | 9 | -------------------------------------------------------------------------------- /settings.py: -------------------------------------------------------------------------------- 1 | """ 2 | paths defined here are used in many places 3 | """ 4 | 5 | # DATA_PATH = "/media/lasi/disks/documentos/gama/pytorch-superpoint/datasets" # path for datasets 6 | DATA_PATH = "datasets" # path for datasets 7 | EXPER_PATH = "logs" # path for saving checkpoints 8 | SYN_TMPDIR = "./datasets/" # path for dumping synthetic data 9 | DEBUG = False # true: will make synthetic data only uses draw_checkboard and ignore other classes 10 | # DEBUG = False 11 | -------------------------------------------------------------------------------- /test/sample_homography.py: -------------------------------------------------------------------------------- 1 | """Testing file for homography (not sorted yet) 2 | """ 3 | 4 | import numpy as np 5 | import tensorflow as tf 6 | import torch 7 | # corner_img = np.array([(0, 0), (img_w, 0), (0, img_h), (img_w, img_h)]) 8 | import cv2 9 | from utils.utils import warp_points_np 10 | 11 | 12 | def sample_homography(inv_scale=3): 13 | corner_img = np.array([(-1, -1), (-1, 1), (1, -1), (1, 1)]) 14 | offset_r = 1 - 1/inv_scale 15 | img_offset = np.array([(-1, -1), (-1, offset_r), (offset_r, -1), (offset_r, offset_r)]) 16 | corner_map = np.random.rand(4,2)/inv_scale + img_offset 17 | matrix = cv2.getPerspectiveTransform(np.float32(corner_img), np.float32(corner_map)) 18 | return matrix 19 | 20 | 21 | 22 | import matplotlib.pyplot as plt 23 | 24 | def plot_points(matrix, ls='--', lw=1.2, colors=None): 25 | x_points, y_points = matrix[:,0], matrix[:,1] 26 | size = len(x_points) 27 | colors = ['red', 'blue', 'orange', 'green'] if not None else colors 28 | for i in range(size): 29 | plt.plot(x_points[i], y_points[i], color=colors[i], marker='o') 30 | # plt.plot(x_points[i], x_points[(i+1) % size],color=colors[i],linestyle=ls, linewidth=lw) 31 | # plt.plot(x_points[i], x_points[(i + 1) % size], linestyle=ls, linewidth=lw) 32 | # [y_points[i], y_points[(i+1) % size]], 33 | # color=colors[i], 34 | # linestyle=ls, linewidth=lw) 35 | 36 | def printCorners(corner_img, mat_homographies): 37 | points = warp_points_np(corner_img, mat_homographies) 38 | # plot 39 | plot_points(corner_img) 40 | for i in range(points.shape[0]): 41 | plot_points(points[i,:,:]) 42 | plt.show() 43 | 44 | def test_sample_homography(): 45 | batch_size = 30 46 | filename = '../configs/superpoint_coco_train.yaml' 47 | import yaml 48 | with open(filename, 'r') as f: 49 | config = yaml.load(f) 50 | test_tf = False 51 | test_corner_def = True 52 | 53 | if test_tf == True: 54 | from utils.homographies import sample_homography as sample_homography 55 | boundary = 1 56 | # from utils.homographies import sample_homography_np as sample_homography 57 | # mat_homographies = matrix[np.newaxis, :,:] 58 | # mat_homographies = [sample_homography(tf.constant([boundary,boundary]), 59 | mat_homographies = [sample_homography(np.array([boundary,boundary]), 60 | **config['data']['warped_pair']['params']) for i in range(batch_size)] 61 | mat_homographies = np.stack(mat_homographies, axis=0) 62 | corner_img = np.array([[0., 0.], [0., boundary], [boundary, boundary], [boundary, 0.]]) 63 | printCorners(corner_img, mat_homographies) 64 | 65 | if test_corner_def: 66 | corner_img = np.array([(-1, -1), (-1, 1), (1, 1), (1, -1)]) 67 | from utils.homographies import sample_homography_np as sample_homography 68 | boundary = 2 69 | mat_homographies = [sample_homography(np.array([boundary,boundary]), shift=-1, 70 | **config['data']['warped_pair']['params']) for i in range(batch_size)] 71 | mat_homographies = np.stack(mat_homographies, axis=0) 72 | printCorners(corner_img, mat_homographies) 73 | 74 | 75 | else: 76 | from utils.utils import sample_homography 77 | mat_homographies = [sample_homography(1) for i in range(batch_size)] 78 | 79 | # sess = tf.Session() 80 | # with sess.as_default(): 81 | # m = mat_homographies[0].eval() 82 | 83 | print("end") 84 | 85 | def test_valid_mask(): 86 | from utils.utils import pltImshow 87 | batch_size = 1 88 | mat_homographies = [sample_homography(3) for i in range(batch_size)] 89 | mat_H = np.stack(mat_homographies, axis=0) 90 | 91 | 92 | corner_img = np.array([(-1, -1), (-1, 1), (1, -1), (1, 1)]) 93 | # printCorners(corner_img, mat_H) 94 | # points = warp_points_np(corner_img, mat_homographies) 95 | 96 | mat_H = torch.tensor(mat_H, dtype=torch.float32) 97 | mat_H_inv = torch.stack([torch.inverse(mat_H[i, :, :]) for i in range(batch_size)]) 98 | from utils.utils import compute_valid_mask, labels2Dto3D 99 | device = 'cpu' 100 | shape = torch.tensor([240, 320]) 101 | for i in range(1): 102 | r = 3 103 | mask_valid = compute_valid_mask(shape, inv_homography=mat_H_inv, device=device, erosion_radius=r) 104 | pltImshow(mask_valid[0,:,:]) 105 | cell_size = 8 106 | mask_valid = labels2Dto3D(mask_valid.view(batch_size, 1, mask_valid.shape[1], mask_valid.shape[2]), cell_size=cell_size) 107 | mask_valid = torch.prod(mask_valid[:,:cell_size*cell_size,:,:], dim=1) 108 | pltImshow(mask_valid[0,:,:].cpu().numpy()) 109 | 110 | mask = {} 111 | mask.update({'homographies': mat_H, 'masks': mask_valid}) 112 | np.savez_compressed('h2.npz', **mask) 113 | print("finish testing valid mask") 114 | 115 | if __name__ == '__main__': 116 | # test_sample_homography() 117 | test_valid_mask() 118 | 119 | 120 | ''' 121 | x_points = np.array([0, 0, 20, 20]) 122 | y_points = np.array([0, 20, 20, 0]) 123 | matrix = np.array([x_points, y_points]) 124 | # colors = ['red', 'blue', 'magenta', 'green'] 125 | colors = ['r', 'b', 'm', 'g'] 126 | size = len(x_points) 127 | plot_points(matrix, colors) 128 | plt.ylim([-5,25]) 129 | plt.xlim([-5,25]) 130 | plt.axes().set_aspect('equal') 131 | plt.show() 132 | ''' -------------------------------------------------------------------------------- /test/visualize_warping.py: -------------------------------------------------------------------------------- 1 | """Testing file (not sorted yet) 2 | 3 | """ 4 | 5 | import torch 6 | import numpy as np 7 | 8 | 9 | from utils.utils import inv_warp_image_batch 10 | from numpy.linalg import inv 11 | import cv2 12 | import matplotlib.pyplot as plt 13 | from utils.draw import plot_imgs 14 | 15 | from utils.utils import pltImshow 16 | path = '/home/yoyee/Documents/deepSfm/logs/superpoint_hpatches_pretrained/predictions/' 17 | for i in range(10): 18 | data = np.load(path + str(i) + '.npz') 19 | # p1 = '/home/yoyee/Documents/deepSfm/datasets/HPatches/v_abstract/1.ppm' 20 | # p2 = '/home/yoyee/Documents/deepSfm/datasets/HPatches/v_abstract/2.ppm' 21 | # H = '/home/yoyee/Documents/deepSfm/datasets/HPatches/v_abstract/H_1_2' 22 | # img = np.load(p1) 23 | # warped_img = np.load(p2) 24 | 25 | H = data['homography'] 26 | img1 = data['image'][:,:,np.newaxis] 27 | img2 = data['warped_image'][:,:,np.newaxis] 28 | # warped_img_H = inv_warp_image_batch(torch.tensor(img), torch.tensor(inv(H))) 29 | warped_img1 = cv2.warpPerspective(img1, H, (img1.shape[1], img1.shape[0])) 30 | 31 | 32 | # img_cat = np.concatenate((img, warped_img, warped_img_H), axis=1) 33 | # pltImshow(img_cat) 34 | 35 | # from numpy.linalg import inv 36 | # warped_img1 = cv2.warpPerspective(img1, inv(H), (img2.shape[1], img2.shape[0])) 37 | img1 = np.concatenate([img1, img1, img1], axis=2) 38 | warped_img1 = np.stack([warped_img1, warped_img1, warped_img1], axis=2) 39 | img2 = np.concatenate([img2, img2, img2], axis=2) 40 | plot_imgs([img1, img2, warped_img1], titles=['img1', 'img2', 'warped_img1'], dpi=200) 41 | plt.savefig( 'test' + str(i) + '.png') -------------------------------------------------------------------------------- /train4.py: -------------------------------------------------------------------------------- 1 | """Training script 2 | This is the training script for superpoint detector and descriptor. 3 | 4 | Author: You-Yi Jau, Rui Zhu 5 | Date: 2019/12/12 6 | """ 7 | 8 | import argparse 9 | import yaml 10 | import os 11 | import logging 12 | 13 | import torch 14 | import torch.optim 15 | import torch.utils.data 16 | 17 | from tensorboardX import SummaryWriter 18 | 19 | # from utils.utils import tensor2array, save_checkpoint, load_checkpoint, save_path_formatter 20 | from utils.utils import getWriterPath 21 | from settings import EXPER_PATH 22 | 23 | ## loaders: data, model, pretrained model 24 | from utils.loader import dataLoader, modelLoader, pretrainedLoader 25 | from utils.logging import * 26 | 27 | # from models.model_wrap import SuperPointFrontend_torch, PointTracker 28 | 29 | ###### util functions ###### 30 | def datasize(train_loader, config, tag="train"): 31 | logging.info( 32 | "== %s split size %d in %d batches" % (tag, len(train_loader) * config["model"]["batch_size"], len(train_loader)) 33 | ) 34 | pass 35 | 36 | 37 | from utils.loader import get_save_path 38 | 39 | ###### util functions end ###### 40 | 41 | 42 | ###### train script ###### 43 | def train_base(config, output_dir, args): 44 | return train_joint(config, output_dir, args) 45 | pass 46 | 47 | 48 | # def train_joint_dsac(): 49 | # pass 50 | 51 | 52 | def train_joint(config, output_dir, args): 53 | assert "train_iter" in config 54 | 55 | # config 56 | # from utils.utils import pltImshow 57 | # from utils.utils import saveImg 58 | torch.set_default_tensor_type(torch.FloatTensor) 59 | task = config["data"]["dataset"] 60 | 61 | device = torch.device("cuda" if torch.cuda.is_available() else "cpu") 62 | logging.info("train on device: %s", device) 63 | with open(os.path.join(output_dir, "config.yml"), "w") as f: 64 | yaml.dump(config, f, default_flow_style=False) 65 | # writer = SummaryWriter(getWriterPath(task=args.command, date=True)) 66 | writer = SummaryWriter(getWriterPath(task=args.command, exper_name=args.exper_name, date=True)) 67 | ## save data 68 | save_path = get_save_path(output_dir) 69 | 70 | # data loading 71 | # data = dataLoader(config, dataset='syn', warp_input=True) 72 | data = dataLoader(config, dataset=task, warp_input=True) 73 | train_loader, val_loader = data["train_loader"], data["val_loader"] 74 | 75 | datasize(train_loader, config, tag="train") 76 | datasize(val_loader, config, tag="val") 77 | # init the training agent using config file 78 | # from train_model_frontend import Train_model_frontend 79 | from utils.loader import get_module 80 | 81 | train_model_frontend = get_module("", config["front_end_model"]) 82 | 83 | train_agent = train_model_frontend(config, save_path=save_path, device=device) 84 | 85 | # writer from tensorboard 86 | train_agent.writer = writer 87 | 88 | # feed the data into the agent 89 | train_agent.train_loader = train_loader 90 | train_agent.val_loader = val_loader 91 | 92 | # load model initiates the model and load the pretrained model (if any) 93 | train_agent.loadModel() 94 | train_agent.dataParallel() 95 | 96 | try: 97 | # train function takes care of training and evaluation 98 | train_agent.train() 99 | except KeyboardInterrupt: 100 | print("press ctrl + c, save model!") 101 | train_agent.saveModel() 102 | pass 103 | 104 | 105 | if __name__ == "__main__": 106 | # global var 107 | torch.set_default_tensor_type(torch.FloatTensor) 108 | logging.basicConfig(format="[%(asctime)s %(levelname)s] %(message)s", datefmt="%m/%d/%Y %H:%M:%S", level=logging.INFO) 109 | 110 | # add parser 111 | parser = argparse.ArgumentParser() 112 | subparsers = parser.add_subparsers(dest="command") 113 | 114 | # Training command 115 | p_train = subparsers.add_parser("train_base") 116 | p_train.add_argument("config", type=str) 117 | p_train.add_argument("exper_name", type=str) 118 | p_train.add_argument("--eval", action="store_true") 119 | p_train.add_argument("--debug", action="store_true", default=False, help="turn on debuging mode") 120 | p_train.set_defaults(func=train_base) 121 | 122 | # Training command 123 | p_train = subparsers.add_parser("train_joint") 124 | p_train.add_argument("config", type=str) 125 | p_train.add_argument("exper_name", type=str) 126 | p_train.add_argument("--eval", action="store_true") 127 | p_train.add_argument("--debug", action="store_true", default=False, help="turn on debuging mode") 128 | p_train.set_defaults(func=train_joint) 129 | 130 | args = parser.parse_args() 131 | 132 | if args.debug: 133 | logging.basicConfig(format="[%(asctime)s %(levelname)s] %(message)s", datefmt="%m/%d/%Y %H:%M:%S", level=logging.DEBUG) 134 | 135 | with open(args.config, "r") as f: 136 | config = yaml.safe_load(f) 137 | # EXPER_PATH from settings.py 138 | output_dir = os.path.join(EXPER_PATH, args.exper_name) 139 | os.makedirs(output_dir, exist_ok=True) 140 | 141 | # with capture_outputs(os.path.join(output_dir, 'log')): 142 | logging.info("Running command {}".format(args.command.upper())) 143 | args.func(config, output_dir, args) 144 | -------------------------------------------------------------------------------- /train_tutorial.md: -------------------------------------------------------------------------------- 1 | # Training tutorial 2 | - This tutorial can walk through how to load pretrained model and run the training script. 3 | 4 | ## environment 5 | ``` 6 | conda create --name py36-torch python=3.6 7 | pip install -r requirements.txt 8 | ``` 9 | 10 | ## Required package 11 | - roi_pool: 12 | - install the package: https://github.com/open-mmlab/mmdetection/blob/master/INSTALL.md 13 | - https://github.com/open-mmlab/mmdetection/tree/master/mmdet/ops/roi_pool 14 | - put 'roi_pool_cuda.cpython-36m-x86_64-linux-gnu.so' in 'utils/roi_pool/' 15 | 16 | ## Required settings 17 | - check the config file 18 | - check the model path 19 | - set in 'pretrained' 20 | - set 'retrain' to false 21 | - (set 'reset_iter' to false) 22 | - check the data path: (can use hyperlink: ln -s) 23 | - put data in the path 'dataset' 24 | - kitti: 'datasets/kitti_wVal'(default in setting.py) 25 | - the folder name should match the one listed on ['data']['dataset'] 26 | - put the files in 'datasets/kitti_split' to 'datasets/kitti_wVal' 27 | ``` 28 | cp datasets/kitti_split/train.txt datasets/kitti_wVal/ 29 | cp datasets/kitti_split/val.txt datasets/kitti_wVal/ 30 | ``` 31 | - check the labels path 32 | - check the path: ['data']['labels'] 33 | - kitti: logs/magicpoint_synth20_homoAdapt100_kitti_h384/predictions (default) 34 | - the path uses base path EXPER_PATH (listed in settings.py) 35 | 36 | ## Run the code 37 | ``` 38 | python train4.py 39 | python train4.py train_joint --debug configs/superpoint_kitti_train_heatmap.yaml superpoint_kitti --eval 40 | 41 | ``` 42 | 43 | ## Related files 44 | - train4.py: training script (load 'train_model_frontend') 45 | - train_model_frontend.py: class for training 46 | - configs/superpoint_coco_train.yaml: path and parameter settings 47 | 48 | ## Code logic 49 | 50 | ## testing log 51 | - 2019/7/11 52 | - test python train4.py train_joint --debug configs/superpoint_kitti_train_heatmap.yaml superpoint_kitti --eval 53 | - environment: python: 3.6, pytorch: 1.1, cuda:10 54 | -------------------------------------------------------------------------------- /utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/utils/__init__.py -------------------------------------------------------------------------------- /utils/correspondence_tools/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/utils/correspondence_tools/__init__.py -------------------------------------------------------------------------------- /utils/correspondence_tools/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/utils/correspondence_tools/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /utils/correspondence_tools/__pycache__/correspondence_finder.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/utils/correspondence_tools/__pycache__/correspondence_finder.cpython-38.pyc -------------------------------------------------------------------------------- /utils/correspondence_tools/correspondence_plotter.py: -------------------------------------------------------------------------------- 1 | import matplotlib.image as mpimg 2 | import matplotlib.pyplot as plt 3 | from matplotlib.patches import Circle 4 | 5 | def plot_correspondences(images, uv_a, uv_b, use_previous_plot=None, circ_color='g', show=True): 6 | if use_previous_plot is None: 7 | fig, axes = plt.subplots(nrows=2, ncols=2) 8 | else: 9 | fig, axes = use_previous_plot[0], use_previous_plot[1] 10 | 11 | fig.set_figheight(10) 12 | fig.set_figwidth(15) 13 | pixel_locs = [uv_a, uv_b, uv_a, uv_b] 14 | axes = axes.flat[0:] 15 | if use_previous_plot is not None: 16 | axes = [axes[1], axes[3]] 17 | images = [images[1], images[3]] 18 | pixel_locs = [pixel_locs[1], pixel_locs[3]] 19 | for ax, img, pixel_loc in zip(axes[0:], images, pixel_locs): 20 | ax.set_aspect('equal') 21 | if isinstance(pixel_loc[0], int) or isinstance(pixel_loc[0], float): 22 | circ = Circle(pixel_loc, radius=10, facecolor=circ_color, edgecolor='white', fill=True ,linewidth = 2.0, linestyle='solid') 23 | ax.add_patch(circ) 24 | else: 25 | for x,y in zip(pixel_loc[0],pixel_loc[1]): 26 | circ = Circle((x,y), radius=10, facecolor=circ_color, edgecolor='white', fill=True ,linewidth = 2.0, linestyle='solid') 27 | ax.add_patch(circ) 28 | ax.imshow(img) 29 | if show: 30 | plt.show() 31 | return None 32 | else: 33 | return fig, axes 34 | 35 | def plot_correspondences_from_dir(log_dir, img_a, img_b, uv_a, uv_b, use_previous_plot=None, circ_color='g', show=True): 36 | img1_filename = log_dir+"/images/"+img_a+"_rgb.png" 37 | img2_filename = log_dir+"/images/"+img_b+"_rgb.png" 38 | img1_depth_filename = log_dir+"/images/"+img_a+"_depth.png" 39 | img2_depth_filename = log_dir+"/images/"+img_b+"_depth.png" 40 | images = [img1_filename, img2_filename, img1_depth_filename, img2_depth_filename] 41 | images = [mpimg.imread(x) for x in images] 42 | return plot_correspondences(images, uv_a, uv_b, use_previous_plot=use_previous_plot, circ_color=circ_color, show=show) 43 | 44 | def plot_correspondences_direct(img_a_rgb, img_a_depth, img_b_rgb, img_b_depth, uv_a, uv_b, use_previous_plot=None, circ_color='g', show=True): 45 | """ 46 | 47 | Plots rgb and depth image pair along with circles at pixel locations 48 | :param img_a_rgb: PIL.Image.Image 49 | :param img_a_depth: PIL.Image.Image 50 | :param img_b_rgb: PIL.Image.Image 51 | :param img_b_depth: PIL.Image.Image 52 | :param uv_a: (u,v) pixel location, or list of pixel locations 53 | :param uv_b: (u,v) pixel location, or list of pixel locations 54 | :param use_previous_plot: 55 | :param circ_color: str 56 | :param show: 57 | :return: 58 | """ 59 | images = [img_a_rgb, img_b_rgb, img_a_depth, img_b_depth] 60 | return plot_correspondences(images, uv_a, uv_b, use_previous_plot=use_previous_plot, circ_color=circ_color, show=show) 61 | 62 | -------------------------------------------------------------------------------- /utils/cp_labels.py: -------------------------------------------------------------------------------- 1 | """copy labels out of images (step 2) 2 | """ 3 | 4 | import subprocess 5 | from glob import glob 6 | import os 7 | 8 | source_folder = 'magicpoint_synth20_homoAdapt100_kitti_h384' 9 | target_folder = f"{source_folder}_labels" 10 | base_path = '/data/kitti' 11 | middle_path = 'predictions/' 12 | final_folder = 'train' 13 | folders = glob(f'{base_path}/{source_folder}/{middle_path}/{final_folder}/*') 14 | 15 | # print(f"folders: {folders}") 16 | for f in folders: 17 | if os.path.isdir(f) == False: 18 | continue 19 | f_target = str(f).replace(source_folder, target_folder) 20 | command = f'rsync -rh {f}/*.npz {f_target}' 21 | print(f"command: {command}") 22 | subprocess.run(f"{command}", shell=True, check=True) 23 | 24 | print(f"total folders: {len(folders)}") 25 | -------------------------------------------------------------------------------- /utils/d2s.py: -------------------------------------------------------------------------------- 1 | """Module used to change 2D labels to 3D labels and vise versa. 2 | Mimic function from tensorflow. 3 | 4 | """ 5 | 6 | import torch 7 | import torch.nn as nn 8 | class DepthToSpace(nn.Module): 9 | def __init__(self, block_size): 10 | super(DepthToSpace, self).__init__() 11 | self.block_size = block_size 12 | self.block_size_sq = block_size*block_size 13 | 14 | def forward(self, input): 15 | output = input.permute(0, 2, 3, 1) 16 | (batch_size, d_height, d_width, d_depth) = output.size() 17 | s_depth = int(d_depth / self.block_size_sq) 18 | s_width = int(d_width * self.block_size) 19 | s_height = int(d_height * self.block_size) 20 | t_1 = output.reshape(batch_size, d_height, d_width, self.block_size_sq, s_depth) 21 | spl = t_1.split(self.block_size, 3) 22 | stack = [t_t.reshape(batch_size, d_height, s_width, s_depth) for t_t in spl] 23 | output = torch.stack(stack,0).transpose(0,1).permute(0,2,1,3,4).reshape(batch_size, s_height, s_width, s_depth) 24 | output = output.permute(0, 3, 1, 2) 25 | return output 26 | 27 | class SpaceToDepth(nn.Module): 28 | def __init__(self, block_size): 29 | super(SpaceToDepth, self).__init__() 30 | self.block_size = block_size 31 | self.block_size_sq = block_size*block_size 32 | 33 | def forward(self, input): 34 | output = input.permute(0, 2, 3, 1) 35 | (batch_size, s_height, s_width, s_depth) = output.size() 36 | d_depth = s_depth * self.block_size_sq 37 | d_width = int(s_width / self.block_size) 38 | d_height = int(s_height / self.block_size) 39 | t_1 = output.split(self.block_size, 2) 40 | stack = [t_t.reshape(batch_size, d_height, d_depth) for t_t in t_1] 41 | output = torch.stack(stack, 1) 42 | output = output.permute(0, 2, 1, 3) 43 | output = output.permute(0, 3, 1, 2) 44 | return output 45 | -------------------------------------------------------------------------------- /utils/draw.py: -------------------------------------------------------------------------------- 1 | """util functions for visualization 2 | 3 | """ 4 | 5 | import argparse 6 | import time 7 | import csv 8 | import yaml 9 | import os 10 | import logging 11 | from pathlib import Path 12 | 13 | import numpy as np 14 | from tqdm import tqdm 15 | 16 | from tensorboardX import SummaryWriter 17 | import cv2 18 | import matplotlib.pyplot as plt 19 | 20 | 21 | def plot_imgs(imgs, titles=None, cmap='brg', ylabel='', normalize=False, ax=None, dpi=100): 22 | n = len(imgs) 23 | if not isinstance(cmap, list): 24 | cmap = [cmap]*n 25 | if ax is None: 26 | fig, ax = plt.subplots(1, n, figsize=(6*n, 6), dpi=dpi) 27 | if n == 1: 28 | ax = [ax] 29 | else: 30 | if not isinstance(ax, list): 31 | ax = [ax] 32 | assert len(ax) == len(imgs) 33 | for i in range(n): 34 | if imgs[i].shape[-1] == 3: 35 | imgs[i] = imgs[i][..., ::-1] # BGR to RGB 36 | ax[i].imshow(imgs[i], cmap=plt.get_cmap(cmap[i]), 37 | vmin=None if normalize else 0, 38 | vmax=None if normalize else 1) 39 | if titles: 40 | ax[i].set_title(titles[i]) 41 | ax[i].get_yaxis().set_ticks([]) 42 | ax[i].get_xaxis().set_ticks([]) 43 | for spine in ax[i].spines.values(): # remove frame 44 | spine.set_visible(False) 45 | ax[0].set_ylabel(ylabel) 46 | plt.tight_layout() 47 | 48 | 49 | # from utils.draw import img_overlap 50 | def img_overlap(img_r, img_g, img_gray): # img_b repeat 51 | img = np.concatenate((img_gray, img_gray, img_gray), axis=0) 52 | img[0, :, :] += img_r[0, :, :] 53 | img[1, :, :] += img_g[0, :, :] 54 | img[img > 1] = 1 55 | img[img < 0] = 0 56 | return img 57 | 58 | def draw_keypoints(img, corners, color=(0, 255, 0), radius=3, s=3): 59 | ''' 60 | 61 | :param img: 62 | image: 63 | numpy [H, W] 64 | :param corners: 65 | Points 66 | numpy [N, 2] 67 | :param color: 68 | :param radius: 69 | :param s: 70 | :return: 71 | overlaying image 72 | numpy [H, W] 73 | ''' 74 | img = np.repeat(cv2.resize(img, None, fx=s, fy=s)[..., np.newaxis], 3, -1) 75 | for c in np.stack(corners).T: 76 | # cv2.circle(img, tuple(s * np.flip(c, 0)), radius, color, thickness=-1) 77 | cv2.circle(img, tuple((s * c[:2]).astype(int)), radius, color, thickness=-1) 78 | return img 79 | 80 | # def draw_keypoints(img, corners, color=(0, 255, 0), radius=3, s=3): 81 | # ''' 82 | 83 | # :param img: 84 | # np (H, W) 85 | # :param corners: 86 | # np (3, N) 87 | # :param color: 88 | # :param radius: 89 | # :param s: 90 | # :return: 91 | # ''' 92 | # img = np.repeat(cv2.resize(img, None, fx=s, fy=s)[..., np.newaxis], 3, -1) 93 | # for c in np.stack(corners).T: 94 | # # cv2.circle(img, tuple(s * np.flip(c, 0)), radius, color, thickness=-1) 95 | # cv2.circle(img, tuple((s*c[:2]).astype(int)), radius, color, thickness=-1) 96 | # return img 97 | 98 | def draw_matches(rgb1, rgb2, match_pairs, lw = 0.5, color='g', if_fig=True, 99 | filename='matches.png', show=False): 100 | ''' 101 | 102 | :param rgb1: 103 | image1 104 | numpy (H, W) 105 | :param rgb2: 106 | image2 107 | numpy (H, W) 108 | :param match_pairs: 109 | numpy (keypoiny1 x, keypoint1 y, keypoint2 x, keypoint 2 y) 110 | :return: 111 | None 112 | ''' 113 | from matplotlib import pyplot as plt 114 | 115 | h1, w1 = rgb1.shape[:2] 116 | h2, w2 = rgb2.shape[:2] 117 | canvas = np.zeros((max(h1, h2), w1 + w2, 3), dtype=rgb1.dtype) 118 | canvas[:h1, :w1] = rgb1[:,:,np.newaxis] 119 | canvas[:h2, w1:] = rgb2[:,:,np.newaxis] 120 | # fig = plt.figure(frameon=False) 121 | if if_fig: 122 | fig = plt.figure(figsize=(15,5)) 123 | plt.axis("off") 124 | plt.imshow(canvas, zorder=1) 125 | 126 | xs = match_pairs[:, [0, 2]] 127 | xs[:, 1] += w1 128 | ys = match_pairs[:, [1, 3]] 129 | 130 | alpha = 1 131 | sf = 5 132 | # lw = 0.5 133 | # markersize = 1 134 | markersize = 2 135 | 136 | plt.plot( 137 | xs.T, ys.T, 138 | alpha=alpha, 139 | linestyle="-", 140 | linewidth=lw, 141 | aa=False, 142 | marker='o', 143 | markersize=markersize, 144 | fillstyle='none', 145 | color=color, 146 | zorder=2, 147 | # color=[0.0, 0.8, 0.0], 148 | ); 149 | plt.tight_layout() 150 | if filename is not None: 151 | plt.savefig(filename, dpi=300, bbox_inches='tight') 152 | print('#Matches = {}'.format(len(match_pairs))) 153 | if show: 154 | plt.show() 155 | 156 | 157 | 158 | # from utils.draw import draw_matches_cv 159 | def draw_matches_cv(data): 160 | keypoints1 = [cv2.KeyPoint(p[1], p[0], 1) for p in data['keypoints1']] 161 | keypoints2 = [cv2.KeyPoint(p[1], p[0], 1) for p in data['keypoints2']] 162 | inliers = data['inliers'].astype(bool) 163 | matches = np.array(data['matches'])[inliers].tolist() 164 | def to3dim(img): 165 | if img.ndim == 2: 166 | img = img[:, :, np.newaxis] 167 | return img 168 | img1 = to3dim(data['image1']) 169 | img2 = to3dim(data['image2']) 170 | img1 = np.concatenate([img1, img1, img1], axis=2) 171 | img2 = np.concatenate([img2, img2, img2], axis=2) 172 | return cv2.drawMatches(img1, keypoints1, img2, keypoints2, matches, 173 | None, matchColor=(0,255,0), singlePointColor=(0, 0, 255)) 174 | 175 | 176 | def drawBox(points, img, offset=np.array([0,0]), color=(0,255,0)): 177 | # print("origin", points) 178 | offset = offset[::-1] 179 | points = points + offset 180 | points = points.astype(int) 181 | for i in range(len(points)): 182 | img = img + cv2.line(np.zeros_like(img),tuple(points[-1+i]), tuple(points[i]), color,5) 183 | return img 184 | 185 | -------------------------------------------------------------------------------- /utils/loader.py: -------------------------------------------------------------------------------- 1 | """many loaders 2 | # loader for model, dataset, testing dataset 3 | """ 4 | 5 | import os 6 | import logging 7 | from pathlib import Path 8 | 9 | import numpy as np 10 | import torch 11 | import torch.optim 12 | import torch.utils.data 13 | 14 | 15 | from utils.utils import tensor2array, save_checkpoint, load_checkpoint, save_path_formatter 16 | 17 | # from settings import EXPER_PATH 18 | 19 | # from utils.loader import get_save_path 20 | def get_save_path(output_dir): 21 | """ 22 | This func 23 | :param output_dir: 24 | :return: 25 | """ 26 | save_path = Path(output_dir) 27 | save_path = save_path / "checkpoints" 28 | logging.info("=> will save everything to {}".format(save_path)) 29 | os.makedirs(save_path, exist_ok=True) 30 | return save_path 31 | 32 | 33 | def worker_init_fn(worker_id): 34 | """The function is designed for pytorch multi-process dataloader. 35 | Note that we use the pytorch random generator to generate a base_seed. 36 | Please try to be consistent. 37 | 38 | References: 39 | https://pytorch.org/docs/stable/notes/faq.html#dataloader-workers-random-seed 40 | 41 | """ 42 | base_seed = torch.IntTensor(1).random_().item() 43 | # print(worker_id, base_seed) 44 | np.random.seed(base_seed + worker_id) 45 | 46 | 47 | def dataLoader(config, dataset="syn", warp_input=False, train=True, val=True): 48 | import torchvision.transforms as transforms 49 | 50 | training_params = config.get("training", {}) 51 | workers_train = training_params.get("workers_train", 1) # 16 52 | workers_val = training_params.get("workers_val", 1) # 16 53 | 54 | logging.info(f"workers_train: {workers_train}, workers_val: {workers_val}") 55 | data_transforms = { 56 | "train": transforms.Compose( 57 | [ 58 | transforms.ToTensor(), 59 | ] 60 | ), 61 | "val": transforms.Compose( 62 | [ 63 | transforms.ToTensor(), 64 | ] 65 | ), 66 | } 67 | # if dataset == 'syn': 68 | # from datasets.SyntheticDataset_gaussian import SyntheticDataset as Dataset 69 | # else: 70 | Dataset = get_module("datasets", dataset) 71 | print(f"dataset: {dataset}") 72 | 73 | train_set = Dataset( 74 | transform=data_transforms["train"], 75 | task="train", 76 | **config["data"], 77 | ) 78 | train_loader = torch.utils.data.DataLoader( 79 | train_set, 80 | batch_size=config["model"]["batch_size"], 81 | shuffle=True, 82 | pin_memory=True, 83 | num_workers=workers_train, 84 | worker_init_fn=worker_init_fn, 85 | ) 86 | val_set = Dataset( 87 | transform=data_transforms["train"], 88 | task="val", 89 | **config["data"], 90 | ) 91 | val_loader = torch.utils.data.DataLoader( 92 | val_set, 93 | batch_size=config["model"]["eval_batch_size"], 94 | shuffle=True, 95 | pin_memory=True, 96 | num_workers=workers_val, 97 | worker_init_fn=worker_init_fn, 98 | ) 99 | # val_set, val_loader = None, None 100 | return {"train_loader": train_loader, "val_loader": val_loader, "train_set": train_set, "val_set": val_set} 101 | 102 | 103 | def dataLoader_test(config, dataset="syn", warp_input=False, export_task="train"): 104 | import torchvision.transforms as transforms 105 | 106 | training_params = config.get("training", {}) 107 | workers_test = training_params.get("workers_test", 1) # 16 108 | logging.info(f"workers_test: {workers_test}") 109 | 110 | data_transforms = { 111 | "test": transforms.Compose( 112 | [ 113 | transforms.ToTensor(), 114 | ] 115 | ) 116 | } 117 | test_loader = None 118 | if dataset == "syn": 119 | from datasets.SyntheticDataset import SyntheticDataset 120 | 121 | test_set = SyntheticDataset( 122 | transform=data_transforms["test"], 123 | train=False, 124 | warp_input=warp_input, 125 | getPts=True, 126 | seed=1, 127 | **config["data"], 128 | ) 129 | elif dataset == "hpatches": 130 | from datasets.patches_dataset import PatchesDataset 131 | 132 | if config["data"]["preprocessing"]["resize"]: 133 | size = config["data"]["preprocessing"]["resize"] 134 | test_set = PatchesDataset( 135 | transform=data_transforms["test"], 136 | **config["data"], 137 | ) 138 | test_loader = torch.utils.data.DataLoader( 139 | test_set, batch_size=1, shuffle=False, pin_memory=True, num_workers=workers_test, worker_init_fn=worker_init_fn 140 | ) 141 | # elif dataset == 'Coco' or 'Kitti' or 'Tum': 142 | else: 143 | # from datasets.Kitti import Kitti 144 | logging.info(f"load dataset from : {dataset}") 145 | Dataset = get_module("datasets", dataset) 146 | test_set = Dataset( 147 | export=True, 148 | task=export_task, 149 | **config["data"], 150 | ) 151 | test_loader = torch.utils.data.DataLoader( 152 | test_set, batch_size=1, shuffle=False, pin_memory=True, num_workers=workers_test, worker_init_fn=worker_init_fn 153 | ) 154 | return {"test_set": test_set, "test_loader": test_loader} 155 | 156 | 157 | def get_module(path, name): 158 | import importlib 159 | 160 | if path == "": 161 | mod = importlib.import_module(name) 162 | else: 163 | mod = importlib.import_module("{}.{}".format(path, name)) 164 | return getattr(mod, name) 165 | 166 | 167 | def get_model(name): 168 | mod = __import__("models.{}".format(name), fromlist=[""]) 169 | return getattr(mod, name) 170 | 171 | 172 | def modelLoader(model="SuperPointNet", **options): 173 | # create model 174 | logging.info("=> creating model: %s", model) 175 | net = get_model(model) 176 | net = net(**options) 177 | return net 178 | 179 | 180 | # mode: 'full' means the formats include the optimizer and epoch 181 | # full_path: if not full path, we need to go through another helper function 182 | def pretrainedLoader(net, optimizer, epoch, path, mode="full", full_path=False): 183 | # load checkpoint 184 | if full_path == True: 185 | checkpoint = torch.load(path) 186 | else: 187 | checkpoint = load_checkpoint(path) 188 | # apply checkpoint 189 | if mode == "full": 190 | net.load_state_dict(checkpoint["model_state_dict"]) 191 | # optimizer.load_state_dict(checkpoint["optimizer_state_dict"]) 192 | # epoch = checkpoint['epoch'] 193 | epoch = checkpoint["n_iter"] 194 | # epoch = 0 195 | else: 196 | net.load_state_dict(checkpoint) 197 | # net.load_state_dict(torch.load(path,map_location=lambda storage, loc: storage)) 198 | return net, optimizer, epoch 199 | 200 | 201 | if __name__ == "__main__": 202 | net = modelLoader(model="SuperPointNet") 203 | -------------------------------------------------------------------------------- /utils/logging.py: -------------------------------------------------------------------------------- 1 | """colorful logging 2 | # import the whole file 3 | """ 4 | 5 | import coloredlogs, logging 6 | logging.basicConfig() 7 | logger = logging.getLogger() 8 | coloredlogs.install(level='INFO', logger=logger) 9 | 10 | from termcolor import colored, cprint 11 | # from sty import fg, bg, ef, rs 12 | 13 | def toRed(text): 14 | return colored(text, 'red', attrs=['reverse']) 15 | 16 | def toCyan(text): 17 | return colored(text, 'cyan', attrs=['reverse']) 18 | -------------------------------------------------------------------------------- /utils/loss_functions/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/utils/loss_functions/__init__.py -------------------------------------------------------------------------------- /utils/loss_functions/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/utils/loss_functions/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /utils/loss_functions/__pycache__/pixelwise_contrastive_loss.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/utils/loss_functions/__pycache__/pixelwise_contrastive_loss.cpython-38.pyc -------------------------------------------------------------------------------- /utils/loss_functions/__pycache__/sparse_loss.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/utils/loss_functions/__pycache__/sparse_loss.cpython-38.pyc -------------------------------------------------------------------------------- /utils/loss_functions/loss_composer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gabriel-SGama/Semantic-SuperPoint/fead485a792aa2bcc4e1bc4d32c2e73d5ba6b807/utils/loss_functions/loss_composer.py -------------------------------------------------------------------------------- /utils/photometric_augmentation.py: -------------------------------------------------------------------------------- 1 | """ deprecated: photometric augmentation from tensorflow implementation 2 | # not used in our pipeline 3 | # need to verify if synthetic generation uses it. 4 | """ 5 | import cv2 as cv 6 | import numpy as np 7 | import tensorflow as tf 8 | 9 | 10 | augmentations = [ 11 | 'additive_gaussian_noise', 12 | 'additive_speckle_noise', 13 | 'random_brightness', 14 | 'random_contrast', 15 | 'additive_shade', 16 | 'motion_blur' 17 | ] 18 | 19 | 20 | def additive_gaussian_noise(image, stddev_range=[5, 95]): 21 | stddev = tf.random.uniform((), *stddev_range) 22 | noise = tf.random.normal(tf.shape(input=image), stddev=stddev) 23 | noisy_image = tf.clip_by_value(image + noise, 0, 255) 24 | return noisy_image 25 | 26 | 27 | def additive_speckle_noise(image, prob_range=[0.0, 0.005]): 28 | prob = tf.random.uniform((), *prob_range) 29 | sample = tf.random.uniform(tf.shape(input=image)) 30 | noisy_image = tf.compat.v1.where(sample <= prob, tf.zeros_like(image), image) 31 | noisy_image = tf.compat.v1.where(sample >= (1. - prob), 255.*tf.ones_like(image), noisy_image) 32 | return noisy_image 33 | 34 | 35 | def random_brightness(image, max_abs_change=50): 36 | return tf.clip_by_value(tf.image.random_brightness(image, max_abs_change), 0, 255) 37 | 38 | 39 | def random_contrast(image, strength_range=[0.5, 1.5]): 40 | return tf.clip_by_value(tf.image.random_contrast(image, *strength_range), 0, 255) 41 | 42 | 43 | def additive_shade(image, nb_ellipses=20, transparency_range=[-0.5, 0.8], 44 | kernel_size_range=[250, 350]): 45 | 46 | def _py_additive_shade(img): 47 | min_dim = min(img.shape[:2]) / 4 48 | mask = np.zeros(img.shape[:2], np.uint8) 49 | for i in range(nb_ellipses): 50 | ax = int(max(np.random.rand() * min_dim, min_dim / 5)) 51 | ay = int(max(np.random.rand() * min_dim, min_dim / 5)) 52 | max_rad = max(ax, ay) 53 | x = np.random.randint(max_rad, img.shape[1] - max_rad) # center 54 | y = np.random.randint(max_rad, img.shape[0] - max_rad) 55 | angle = np.random.rand() * 90 56 | cv.ellipse(mask, (x, y), (ax, ay), angle, 0, 360, 255, -1) 57 | 58 | transparency = np.random.uniform(*transparency_range) 59 | kernel_size = np.random.randint(*kernel_size_range) 60 | if (kernel_size % 2) == 0: # kernel_size has to be odd 61 | kernel_size += 1 62 | mask = cv.GaussianBlur(mask.astype(np.float32), (kernel_size, kernel_size), 0) 63 | shaded = img * (1 - transparency * mask[..., np.newaxis]/255.) 64 | return np.clip(shaded, 0, 255) 65 | 66 | shaded = tf.compat.v1.py_func(_py_additive_shade, [image], tf.float32) 67 | res = tf.reshape(shaded, tf.shape(input=image)) 68 | return res 69 | 70 | 71 | def motion_blur(image, max_kernel_size=10): 72 | 73 | def _py_motion_blur(img): 74 | # Either vertial, hozirontal or diagonal blur 75 | mode = np.random.choice(['h', 'v', 'diag_down', 'diag_up']) 76 | ksize = np.random.randint(0, (max_kernel_size+1)/2)*2 + 1 # make sure is odd 77 | center = int((ksize-1)/2) 78 | kernel = np.zeros((ksize, ksize)) 79 | if mode == 'h': 80 | kernel[center, :] = 1. 81 | elif mode == 'v': 82 | kernel[:, center] = 1. 83 | elif mode == 'diag_down': 84 | kernel = np.eye(ksize) 85 | elif mode == 'diag_up': 86 | kernel = np.flip(np.eye(ksize), 0) 87 | var = ksize * ksize / 16. 88 | grid = np.repeat(np.arange(ksize)[:, np.newaxis], ksize, axis=-1) 89 | gaussian = np.exp(-(np.square(grid-center)+np.square(grid.T-center))/(2.*var)) 90 | kernel *= gaussian 91 | kernel /= np.sum(kernel) 92 | img = cv.filter2D(img, -1, kernel) 93 | return img 94 | 95 | blurred = tf.compat.v1.py_func(_py_motion_blur, [image], tf.float32) 96 | return tf.reshape(blurred, tf.shape(input=image)) 97 | -------------------------------------------------------------------------------- /utils/print_tool.py: -------------------------------------------------------------------------------- 1 | """tools to print object shape or type 2 | 3 | """ 4 | 5 | 6 | # from utils.print_tool import print_config 7 | def print_config(config, file=None): 8 | print('='*10, ' important config: ', '='*10, file=file) 9 | for item in list(config): 10 | print(item, ": ", config[item], file=file) 11 | 12 | print('='*32) 13 | 14 | # from utils.print_tool import print_dict_attr 15 | def print_dict_attr(dictionary, attr=None, file=None): 16 | for item in list(dictionary): 17 | d = dictionary[item] 18 | if attr == None: 19 | print(item, ": ", d, file=file) 20 | else: 21 | if hasattr(d, attr): 22 | print(item, ": ", getattr(d, attr), file=file) 23 | else: 24 | print(item, ": ", len(d), file=file) 25 | 26 | import logging 27 | # from utils.print_tool import datasize 28 | def datasize(train_loader, config, tag='train'): 29 | logging.info('== %s split size %d in %d batches'%\ 30 | (tag, len(train_loader)*config['model']['batch_size'], len(train_loader))) 31 | pass -------------------------------------------------------------------------------- /utils/tools.py: -------------------------------------------------------------------------------- 1 | """tools to combine dictionary 2 | 3 | """ 4 | import collections 5 | 6 | 7 | def dict_update(d, u): 8 | """Improved update for nested dictionaries. 9 | 10 | Arguments: 11 | d: The dictionary to be updated. 12 | u: The update dictionary. 13 | 14 | Returns: 15 | The updated dictionary. 16 | """ 17 | for k, v in u.items(): 18 | if isinstance(v, collections.Mapping): 19 | d[k] = dict_update(d.get(k, {}), v) 20 | else: 21 | d[k] = v 22 | return d 23 | -------------------------------------------------------------------------------- /utils/var_dim.py: -------------------------------------------------------------------------------- 1 | """change the dimension of tensor/ numpy array 2 | """ 3 | 4 | import numpy as np 5 | import torch 6 | 7 | 8 | # from utils.var_dim import to3dim 9 | def to3dim(img): 10 | if img.ndim == 2: 11 | img = img[:, :, np.newaxis] 12 | return img 13 | 14 | 15 | # torch 16 | # from utils.var_dim import tensorto4d 17 | def tensorto4d(inp): 18 | if len(inp.shape) == 2: 19 | inp = inp.view(1, 1, inp.shape[0], inp.shape[1]) 20 | elif len(inp.shape) == 3: 21 | inp = inp.view(1, inp.shape[0], inp.shape[1], inp.shape[2]) 22 | return inp 23 | 24 | # torch 25 | # from utils.var_dim import squeezeToNumpy 26 | def squeezeToNumpy(tensor_arr): 27 | return tensor_arr.detach().cpu().numpy().squeeze() 28 | 29 | # from utils.var_dim import toNumpy 30 | def toNumpy(tensor): 31 | return tensor.detach().cpu().numpy() --------------------------------------------------------------------------------