{"id":21945855,"url":"https://github.com/mrnerf/aliked_cpp","last_synced_at":"2025-04-09T17:23:41.561Z","repository":{"id":264712252,"uuid":"894153925","full_name":"MrNeRF/ALIKED_CPP","owner":"MrNeRF","description":"CPP Implementation of  \"ALIKED: A Lighter Keypoint and Descriptor Extraction Network via Deformable Transformation\"","archived":false,"fork":false,"pushed_at":"2024-12-05T13:21:46.000Z","size":18303,"stargazers_count":82,"open_issues_count":1,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-02T12:05:11.821Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Cuda","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MrNeRF.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-25T21:10:58.000Z","updated_at":"2025-03-22T11:58:22.000Z","dependencies_parsed_at":"2025-01-27T17:55:09.217Z","dependency_job_id":null,"html_url":"https://github.com/MrNeRF/ALIKED_CPP","commit_stats":null,"previous_names":["mrnerf/aliked_cpp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrNeRF%2FALIKED_CPP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrNeRF%2FALIKED_CPP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrNeRF%2FALIKED_CPP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrNeRF%2FALIKED_CPP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MrNeRF","download_url":"https://codeload.github.com/MrNeRF/ALIKED_CPP/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248075435,"owners_count":21043587,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-29T04:19:45.297Z","updated_at":"2025-04-09T17:23:41.519Z","avatar_url":"https://github.com/MrNeRF.png","language":"Cuda","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ALIKED C++ Implementation\n\nThis is a C++ implementation of ALIKED (Attentive Local and Implicit Keypoint Detector) using LibTorch and OpenCV. The implementation provides a high-performance, production-ready version of the ALIKED model for keypoint detection and matching.\n\nIf you are interested in collaborating on this project, would like to reach out to me, or are considering to contribute to the discussion of the overall NeRF/GS pipeline, please join the Discord: https://discord.gg/NqwTqVYVmj\n\n## Features\n\n- Complete C++ implementation of ALIKED model\n- CUDA-accelerated computations\n- OpenCV integration for image processing\n- Real-time keypoint detection and matching\n- Multiple model configurations (aliked-t16, aliked-n16, aliked-n16rot, aliked-n32)\n- Move semantics optimization for better performance\n- Simple tracking demo application\n\n## Prerequisites\n\n- CMake (\u003e= 3.26)\n- CUDA Toolkit (\u003e= 12.1)\n- LibTorch (with CUDA support)\n- OpenCV\n- C++20 compatible compiler\n\n## Directory Structure\n\n```\n.\n├── include/               # Header files\n├── src/                  # Source files\n├── examples/             # Example applications\n├── models/               # Pre-trained model weights\n├── external/            \n│   └── libtorch/        # LibTorch directory\n└── CMakeLists.txt       # CMake configuration\n```\n\n## Setup Instructions\n\n1. Download and extract LibTorch:\n   ```bash\n   mkdir -p external\n   cd external\n   wget https://download.pytorch.org/libtorch/cu121/libtorch-cxx11-abi-shared-with-deps-2.1.0%2Bcu121.zip\n   unzip libtorch-cxx11-abi-shared-with-deps-2.1.0+cu121.zip\n   cd ..\n   ```\n\n2. Build the project:\n   ```bash\n   mkdir build \u0026\u0026 cd build\n   cmake -DCMAKE_BUILD_TYPE=Release ..\n   make -j$(nproc)\n   ```\n\n## Usage\n\nThe demo application performs keypoint detection and matching between consecutive images:\n\n```bash\n./aliked /path/to/image/directory [options]\n```\n\n### Options\n\n- `model_name`: Model configuration (default: \"aliked-n32\")\n- `device`: Computation device (default: \"cuda\")\n- `top_k`: Number of top keypoints (-1 for threshold-based selection, default: -1)\n- `scores_th`: Score threshold for keypoint selection (default: 0.2)\n- `n_limit`: Maximum number of keypoints (default: 5000)\n\n### Example Code\n\n```cpp\n#include \"ALIKED.hpp\"\n\n// Initialize model\nauto model = std::make_shared\u003cALIKED\u003e(\"aliked-n32\", \"cuda\");\n\n// Load and process image\ncv::Mat img = cv::imread(\"image.jpg\");\ncv::Mat img_rgb;\ncv::cvtColor(img, img_rgb, cv::COLOR_BGR2RGB);\n\n// Run inference\nauto pred = model-\u003erun(img_rgb);\nauto keypoints = pred.at(\"keypoints\");\nauto descriptors = pred.at(\"descriptors\");\n```\n\n## Model Configurations\n\n| Model Name    | Description                               |\n|--------------|-------------------------------------------|\n| aliked-t16   | Tiny model with 16 descriptor dimensions  |\n| aliked-n16   | Normal model with 16 descriptor dimensions|\n| aliked-n16rot| Rotation-invariant model                  |\n| aliked-n32   | Normal model with 32 descriptor dimensions|\n\n## Performance Optimizations\n\nThe implementation includes several optimizations:\n\n- Link Time Optimization (LTO/IPO)\n- CPU architecture-specific optimizations\n- CUDA optimizations\n- Fast math operations\n- Position-independent code\n\n## Custom Model Directory\n\nYou can specify a custom location for model weights during build:\n\n```bash\ncmake -DCMAKE_BUILD_TYPE=Release -DALIKED_MODELS_DIR=/path/to/models ..\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit pull requests, create issues, or suggest improvements.\n\n## Acknowledgements\n\n- Original ALIKED paper and implementation\n- LibTorch and PyTorch teams\n- OpenCV team","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrnerf%2Faliked_cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrnerf%2Faliked_cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrnerf%2Faliked_cpp/lists"}