/LiKL

A Lightweight CNN model for joint detection and description of Keypoint and Line

Primary LanguagePythonMIT LicenseMIT

LiKL

A Lightweight CNN model for joint detection and description of Keypoint and Line, which is capable of simultaneously extracting keypoint and line features in an image and inferring feature descriptors in a single process.

Todo

Demo

Usage

Dependency

pip install -r requirements.txt

Pre-trained model

You can download pre-trained model from Baidu (kcdd) or Onedrive

How to use it

  1. Set pre-trained model path in likl/config/extract_cfg.yaml
  2. You can use notebooks/extract_feature.ipynb to use the model and visualize the results.

Convert model to other formats

  • torchscript
  • onnx
python convert_model.py --weight <path-to-pretrained-weights> --file <path-to-converted-file> --fmt "onnx or torchscript"

Known issue

A bug is raised when using dynamic_axes, this would be due to deform_conv2d_onnx_exporter. DeformConv was added in opset 19, but torch.onnx (Pytorch 2.3) currently only supports opset 17.