Metadata-Version: 2.1
Name: superMatch
Version: 0.0.3
Summary: Local Feature Extractors and Matchers Network Library for PyTorch
Home-page: https://git.woa.com/matching-benchmark/SuperMatch.git
Author: mumuychen
Author-email: mumuychen@tencent.com
License: UNKNOWN
Download-URL: https://git.woa.com/matching-benchmark/SuperMatch.git/archive/0.0.3.tar.gz
Keywords: deep-learningpytorch,image-matching,superpoint-superglue,loftr-cort-aslfeat-r2d2
Platform: UNKNOWN
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: numpy
Requires-Dist: tqdm
Requires-Dist: scipy
Requires-Dist: scikit-learn
Requires-Dist: tensorflow-gpu (==1.15.2)
Requires-Dist: opencv-contrib-python
Requires-Dist: h5py
Requires-Dist: PyYAML
Requires-Dist: kornia

# dloc - the deeplearning localization toolbox

This is `dloc`, a modular toolbox for state-of-the-art local feature extaction and matching. 

## Support

## Reference 
- [d2net](https://arxiv.org/abs/1905.03561): extract keypoint from 1/8 feature map
- [superpoint](https://arxiv.org/abs/1712.07629): could extract in corner points, pretrained with magicpoint
- [superglue](https://arxiv.org/abs/1911.11763): excellent matching algorithm but pretrained model only support superpoint, we have implementation superglue with sift/superpoint in megadepth datasets.
- [disk](https://arxiv.org/abs/2006.13566): add reinforcement for keypoints extraction
- [aslfeat](https://arxiv.org/abs/2003.10071): build multiscale extraction network
- [cotr](https://arxiv.org/abs/2103.14167): build transformer network for points matching
- [loftr](https://arxiv.org/abs/2104.00680): dense extraction and matching with end-to-end network
- [r2d2](https://arxiv.org/abs/1906.06195): add repeatability and reliability for keypoints extraction
- [contextdesc](https://arxiv.org/abs/1904.04084): keypoints use sift, use full image context to enhence descriptor. expensive calculation.
- [NGRANSAC](https://arxiv.org/abs/1905.04132)

If you are interested in local feature, https://drive.weixin.qq.com/s?k=AJEAIQdfAAo0ta3HBsAKMA9AatACk is useful. 
## Installation

```
git submodule update --init --recursive --remote
```

`dloc` could run on mirrors.tencent.com/xlab/colmap:v2.0 with python3.

## Debugging and Visualization
Download https://drive.weixin.qq.com/s?k=AJEAIQdfAAob00fTSEAKMA9AatACk datasets to assets.

Weights could be download from https://drive.weixin.qq.com/s?k=AJEAIQdfAAo97Nnovq.

## industrial visualization and debug 

### superpoint+superglue

```
python3 match_pairs.py --resize 1600 --resize_float --input_dir assets/industrial_sample_images/ --input_pairs assets/industrial_sample_pairs.txt --output_dir industrial_vis/ --viz --matcher superglue_outdoor --extractor superpoint_aachen
```

### d2net+NN

```
python3 match_pairs.py --resize 1600 --resize_float --input_dir assets/industrial_sample_images/ --input_pairs assets/industrial_sample_pairs.txt --output_dir industrial_vis/ --viz --matcher NN --extractor d2net-ss
```


### r2d2+NN

```
python3 match_pairs.py --resize 1600 --resize_float --input_dir assets/industrial_sample_images/ --input_pairs assets/industrial_sample_pairs.txt --output_dir industrial_vis/ --viz --matcher NN --extractor r2d2-desc
```


### contextdesc(tf)+NN

```
python3 match_pairs.py --resize 1600 --resize_float --input_dir assets/industrial_sample_images/ --input_pairs assets/industrial_sample_pairs.txt --output_dir industrial_vis/ --viz --matcher NN --extractor disk-desc
```

### ASLFeat(tf)+NN

```
python3 match_pairs.py --resize 1600 --resize_float --input_dir assets/industrial_sample_images/ --input_pairs assets/industrial_sample_pairs.txt --output_dir industrial_vis/ --viz --matcher NN --extractor aslfeat-desc
```

### DISK
```
python3 match_pairs.py --resize 1600 --resize_float --input_dir assets/industrial_sample_images/ --input_pairs assets/industrial_sample_pairs.txt --output_dir industrial_vis/ --viz --matcher superglue_disk --extractor disk-desc --resize 1280 720
```

### loftr
```
python3 eval_benchmark.py --input_dir /youtu/xlab-team4/share/datasets/2020visuallocalization/fuchi_registration/ --input_pairs ../image-matching-evaluation/assets/fuchi/fuchi_pair.txt --output_dir output/fuchi/ --matcher loftr --direct --resize 1280 960
```

### cort
```
python3 eval_benchmark.py --input_dir /youtu/xlab-team4/share/datasets/2020visuallocalization/fuchi_registration/ --input_pairs ../image-matching-evaluation/assets/fuchi/fuchi_pair.txt --output_dir output/fuchi/ --matcher cotr --extractor landmark --direct --resize 1280 960 --landmark[option]
```

## TODO
- [x] debug d2net extract with nn matching
- [x] debug context desc extract with nn matching
- [x] pose estimation(homogrpahy&affine2D)
- [x] add r2d2, aslfeat extractor
- [x] add disk and swin-disk extractor
- [x] add cotr matching with landmarks
- [x] add loftr for extract and matching
- [] NGRANSAC for outlier filter


