class

GS::MASt3R::MASt3RInference

Inherits Reference < Object

Full MASt3R model for inference

Constructors

new(device : Tensor::Device = Tensor::Device::CPU)
Source

Instance methods

decoder
Source
device
Source
dpt_head1
Source
dpt_head2
Source
encoder
Source
forward_pair(img1 : Tensor, img2 : Tensor) : Tuple(Tensor, Tensor, Tensor, Tensor)

Inference on image pair img1, img2: Tensor [batch, height, width, 3] in range [0, 1] Returns: {points1, conf1, points2, conf2} points: [batch, H4, W4, 3] - 3D coordinates (upsampled) conf: [batch, H4, W4, 1] - confidence

Source
forward_single(img : Tensor) : Tuple(Tensor, Tensor)

Inference on single image (no cross-attention)

Source
frames_to_pointcloud(frames : Array(Video::Frame), conf_threshold : Float32 = 0.3_f32) : Tuple(Tensor, Tensor)

Convert frames to point cloud frames: Array of Tensor [height, width, 3] Returns: points [N, 3], confidences [N]

Source
load_weights!(path : String)

Load pretrained weights

Source
weights_loaded?
Source