| Name | Message | Date |
|---|---|---|
| 📄 database.rs | 2 days ago | |
| 📄 exhaustive_matcher.rs | 2 days ago | |
| 📄 feature_extractor.rs | 2 days ago | |
| 📄 main.rs | 2 days ago | |
| 📄 models.rs | 2 days ago | |
| 📄 ransac.rs | 2 days ago |
📄
src/main.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
mod database; mod exhaustive_matcher; mod feature_extractor; mod models; mod ransac; use std::path::PathBuf; use anyhow::Result; use clap::{Parser, Subcommand}; use models::Device; /// COLMAP-compatible feature extraction and matching using ALIKED + LightGlue. #[derive(Parser)] #[command(name = "aliked-colmap")] struct Cli { #[command(subcommand)] command: Command, } #[derive(Subcommand)] enum Command { /// Extract ALIKED keypoints/descriptors for all images and populate a COLMAP database. #[command(name = "feature_extractor")] FeatureExtractor { #[arg(long)] database_path: PathBuf, #[arg(long)] image_path: PathBuf, #[arg(long, default_value = "./models/aliked-n16rot-top2k-640.onnx")] aliked_model: PathBuf, #[arg(long, default_value_t = 2048)] top_k: usize, #[arg(long, default_value_t = 640)] image_size: u32, #[arg(long, value_enum, default_value_t = Device::Gpu)] device: Device, }, /// Exhaustively match all image pairs with LightGlue and geometrically verify them. #[command(name = "exhaustive_matcher")] ExhaustiveMatcher { #[arg(long)] database_path: PathBuf, #[arg(long, default_value = "./models/lightglue_for_aliked.onnx")] lightglue_model: PathBuf, #[arg(long, default_value_t = 0.0)] min_score: f32, #[arg(long, value_enum, default_value_t = Device::Gpu)] device: Device, }, } fn main() -> Result<()> { let cli = Cli::parse(); match cli.command { Command::FeatureExtractor { database_path, image_path, aliked_model, top_k, image_size, device, } => feature_extractor::run(feature_extractor::FeatureExtractorConfig { database_path, image_path, aliked_model, top_k, image_size, device, }), Command::ExhaustiveMatcher { database_path, lightglue_model, min_score, device, } => exhaustive_matcher::run(exhaustive_matcher::ExhaustiveMatcherConfig { database_path, lightglue_model, min_score, device, }), } }