-
CUDA Toolkits: if you use GPU.
-
pytorch c++ API: the easiest way is to reuse build binary provided from pytorch official website. Here is the sample script to use the build binary. For convenience, this repo assumes torch c++ api is installed into /opt/libtorch
-
other dependencies:
sudo apt-get install -y --no-install-recommends \ libopencv-dev# build library make default # build examples make apps -j`nproc` # build gpu examples make gpu_apps -j`nproc`SuperPoint and SuperGlue
Usage
- Script pre-trained superpoint and superglue weights
git submodule update --init --recursive export ROOT_DIR="$(pwd)" cd $ROOT_DIR/scripts/superglue/SuperGluePretrainedNetwork/ git apply ../jit_patch.patch python3 -m pip install -r $ROOT_DIR/scripts/superglue/SuperGluePretrainedNetwork/requirements.txt cd $ROOT_DIR python3 $ROOT_DIR/scripts/superglue/jit_superglue_model.py python3 $ROOT_DIR/scripts/superglue/jit_superpoint_model.py- Test inference apps
./build/examples/match_images_superglue/match_images_superglue_app path/to/superpoint_model.pt path/to/superglue_model.pt ./data/images/VisionCS_0a.png ./data/images/VisionCS_0b.png