loftr 0.1.1

Native Rust/tch implementation of LoFTR feature matching
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use thiserror::Error;

/// Errors returned by the public `loftr` API.
///
/// These errors cover invalid model configuration, invalid runtime inputs, and
/// failures bubbled up from the underlying `tch` bindings.
#[derive(Debug, Error)]
pub enum LoftrError {
    /// The `LoFTR` configuration is internally inconsistent or unsupported.
    #[error("invalid LoFTR config: {0}")]
    InvalidConfig(String),
    /// The provided input tensors do not match the supported image layout.
    #[error("invalid LoFTR input: {0}")]
    InvalidInput(String),
    /// An error returned by the underlying `tch` or libtorch runtime.
    #[error("tch error: {0}")]
    Tch(#[from] tch::TchError),
}