A rotation invariant SuperGlue matching algorithm for cross modality image also see here, https://gitee.com/ssacn/RISG-image-matching
Python 3.7+ is recommended for running our code. Conda can be used to install the required packages:
- PyTorch-GPU 1.10.0+
- OpenCV
- SciPy
- Matplotlib
- pyymal
- pickle
We collected a set of test data, including images from space-borne SAR and visible light sensors, drone thermal infrared sensors, and Google Earth images. You may find them in the directory "test" in this repository.
risgmatching.py
contains the majority of the code. Run test_risg.py
for testing:
python3 test_risg.py
with open('./config.yaml', 'r') as f:
config = yaml.safe_load(f)
risg = RISGMatcher(config)
img_filename0 = 'test/01/pair1.jpg'
img_filename1 = 'test/01/pair2.jpg'
img0 = cv2.imread(img_filename0)
img1 = cv2.imread(img_filename1)
# rotate is number of directions
mkpts0, mkpts1, conf, main_dir = risg.match(img0,img1,nrotate = 5)