API: Datasets
Raw dataset readers.
Public names
VisualGeometryToolkitEval.Datasets — Module
DatasetsRaw dataset readers. Each returns VisualGeometryToolkitCore StereoRawPairs in pixels, from which a scoring pool is drawn: PhotoTourism (load_pt_pairs), the homography benchmark HEB (load_heb_pairs) and consolidated RoMa or SuperPoint+LightGlue correspondences (load_roma_pairs). The module also produces those consolidated files from depth-validated stereo datasets (ETH3D, ScanNet1500, KITTI, SevenScenes) through stereo_pairs, load_sparse_matches, load_validation_data and consolidate_correspondences.
The read thresholds default to configs/default.toml ([pool.<dataset>]).
VisualGeometryToolkitEval.Datasets.CONSOLIDATED_FORMAT — Constant
The version of the consolidated correspondences record consolidate_correspondences writes.
VisualGeometryToolkitEval.Datasets.PT_SCENES — Constant
PT_SCENES :: Vector{Tuple{String,Symbol}}The PhotoTourism scenes with both matches (matches.h5 + match_conf.h5) and a COLMAP reconstruction on disk, each with its source tag: which tree of PtRawTrees holds them. The scene SPLITS are configs/splits.toml's.
VisualGeometryToolkitEval.Datasets.AbstractStereoDataset — Type
AbstractStereoDatasetA depth-validated stereo benchmark: a value carrying its on-disk root, on which stereo_pairs, load_validation_data and gt_config dispatch, and which consolidate_correspondences drives.
VisualGeometryToolkitEval.Datasets.ETH3D — Type
ETH3D(scenes_root; min_covisibility = [datasets.eth3d] min_covisibility)The ETH3D high-resolution multi-view benchmark with laser depth. scenes_root holds one directory per scene with images/dslr_images_undistorted/, dslr_calibration_undistorted/, dslr_calibration_jpg/ and ground_truth_depth/dslr_images/. A pair needs min_covisibility co-visible triangulated points.
VisualGeometryToolkitEval.Datasets.GTConfig — Type
GTConfig(; gt_method, metric_tol, rel_tol, bidirectional)
GTConfig(table::AbstractString)How correspondences are validated against ground-truth depth and pose (VisualGeometryToolkitCore validate_gt_inliers): gt_method (a provenance label, :depth_warp_eth3d_laser), metric_tol (the 3D disagreement at the surface below which a correspondence is an inlier, a length quantity: metric, so one number is portable across resolutions and focal lengths), rel_tol (the relative depth-consistency check applied first) and bidirectional (check both warp directions).
GTConfig(table) reads the values of record of [<table>] in configs/default.toml ("gt.eth3d.splg"; metric_tol_mm in millimetres).
VisualGeometryToolkitEval.Datasets.HebPair — Type
HebPair <: StereoRawPairOne raw HEB pair, in pixels: correspondences, SNN ratios and the dataset's GT inlier flags (post-SNN filter), the pixel calibrations, image sizes and the extrinsic GT relative pose x₂ = R·x₁ + t.
VisualGeometryToolkitEval.Datasets.KITTI — Type
KITTI(root; sequences = [datasets.kitti] sequences)The KITTI odometry benchmark, consecutive left-grayscale (image_0) frames. root holds sequences/<seq>/{image_0,velodyne,calib.txt} and poses/<seq>.txt.
VisualGeometryToolkitEval.Datasets.PtPair — Type
PtPair <: StereoRawPairRaw PhotoTourism pair data (post-SNN filter), in pixels: correspondences from matches.h5, COLMAP intrinsics, the composed relative pose, the GT-inlier mask (pixel Sampson under the GT F), and the SfM-track-paired SIFT detections (from points3D.bin) — the σ̂²_p noise-scale source.
VisualGeometryToolkitEval.Datasets.PtRawTrees — Type
PtRawTrees(; matches_tutorial_val, matches_tutorial_train, matches_ef_test,
recon_tutorial, recon_ef_test, recon_special = Dict{String,String}())The raw PhotoTourism trees, supplied by the caller. This package ships no data directory to default to — the rule the HEB and RoMa readers follow (their files are arguments), and which PT alone used to break: these five trees were once absolute paths on one machine. Two consequences, both real: a registered package carried one machine's paths, so PT pools could not be generated anywhere else; and a pool producer cell could not DECLARE its raw inputs in _provenance.toml, because no config key named them — every other input of the accv2026 campaign is declared and hashed, and PT-E's was not.
matches_* hold <scene>/{matches.h5,match_conf.h5}; recon_* hold <scene>/dense/sparse COLMAP models. recon_special maps a scene to a COMPLETE recon directory (it already ends at the model), for the IMC-PT TestData scenes whose model does not sit under recon_ef_test.
VisualGeometryToolkitEval.Datasets.RomaPair — Type
RomaPair <: StereoRawPairOne raw RoMa / SP+LG pair, in pixels: correspondences, snn = 1 − confidence, the consolidated GT inlier mask, the pixel calibrations, image sizes and the GT relative pose, with its source scene (VisualGeometryToolkitCore's pair_scene). A raw pair is a pool's input, so it is plain data: t_gt is plain metres (the consolidated record strips the dataset's rig once).
VisualGeometryToolkitEval.Datasets.ScanNet1500 — Type
ScanNet1500(root)The ScanNet-1500 evaluation split (1500 pairs over 100 scenes; the pair list of LoFTR and RoMa). root holds test.npz and scans_test/<scene>/{color,depth,intrinsic}.
VisualGeometryToolkitEval.Datasets.SevenScenes — Type
SevenScenes(root; split = :test, scene = :all, interval, stride)Microsoft 7-Scenes (Kinect). root holds <scene>/<sequence>/frame-*.{color,depth}.png and frame-*.pose.txt. split is :test or :train (SuperANSAC's sequence lists, [datasets.seven_scenes]); scene is :all or one scene name; the pairs are (frame[i], frame[i + interval]) for i = 1, 1 + stride, ….
VisualGeometryToolkitEval.Datasets.StereoPair — Type
StereoPairOne image pair of a AbstractStereoDataset: the scene, the two image names (source_name, target_name) and paths (source_img_path, target_img_path, under the dataset's root), and the GT rig (VisualGeometryToolkitCore.StereoRig) in the frame of the images the matcher sees, its translations FlexUnits lengths in metres.
VisualGeometryToolkitEval.Datasets.consolidate_correspondences — Method
consolidate_correspondences(ds::AbstractStereoDataset, matcher::Symbol; match_dir, out_dir,
scenes = nothing) -> Vector{String}Consolidate the sparse matches of every pair of ds (one load_sparse_matches file <match_dir>/<scene>__<src>__<tgt>.h5 per pair; a pair without one is skipped) into <out_dir>/<scene>.jld2, one file per scene (a / in a scene id becomes __), each pair's GT inlier mask from load_validation_data under gt_config(ds, matcher). scenes, when given, restricts the run to those scene ids. Returns the paths written. The record is documented in src/datasets/consolidate.jl.
VisualGeometryToolkitEval.Datasets.eth3d_pairs — Method
eth3d_pairs(scenes_root; min_covisibility = [datasets.eth3d] min_covisibility) -> Vector{StereoPair}Every unordered pair of undistorted DSLR images of every scene under scenes_root with at least min_covisibility co-visible triangulated points (SuperANSAC's ETH3D protocol), its rig from the undistorted calibration.
VisualGeometryToolkitEval.Datasets.gt_config — Function
gt_config(ds::AbstractStereoDataset, matcher::Symbol) -> GTConfigThe GT-validation tolerances of record for (dataset, matcher) (:roma, :splg): configs/default.toml [gt.<dataset>.<matcher>]. A combination without a calibrated table is a MethodError.
VisualGeometryToolkitEval.Datasets.kitti_pairs — Method
kitti_pairs(root; sequences = [datasets.kitti] sequences) -> Vector{StereoPair}The cam0 frame pairs of each KITTI odometry sequence under root with poses, by the [datasets.kitti] pair rule (consecutive frames). A sequence missing its directory or pose file is skipped with a warning.
VisualGeometryToolkitEval.Datasets.load_heb_pairs — Method
load_heb_pairs(h5_path; min_correspondences, max_pairs_per_scene, subsample_overdraw,
subsample_seed, snn_threshold = [pool.heb] snn_threshold) -> Vector{HebPair}Iterate all corr_* groups of the raw HEB scene file h5_path that have a pose and both calibrations, in a seeded subsample (_seeded_key_subsample, keyed by the file name) of at most max_pairs_per_scene kept pairs; apply the SNN threshold and drop pairs with fewer than min_correspondences correspondences. The subsample sizes and seed are the caller's (its pool configuration).
VisualGeometryToolkitEval.Datasets.load_pt_pairs — Method
load_pt_pairs(scene, source; trees::PtRawTrees, min_correspondences, max_pairs_per_scene,
subsample_overdraw, subsample_seed,
snn_threshold = [pool.phototourism] snn_threshold,
min_track_pairs = [pool.phototourism] min_track_pairs,
gt_inlier_sampson_px = [pool.phototourism] gt_inlier_sampson_px) -> Vector{PtPair}Resolve the scene's (matchesdir, recondir) via _scene_paths, read the scene's COLMAP recon once, then iterate over matches.h5 keys (with the seeded subsample _seeded_key_subsample to max_pairs_per_scene) and assemble PtPairs (_load_pt_pair). Drops pairs with too few SfM-track-paired observations to give a stable σ̂²p (`mintrack_pairs). The subsample sizes and seed are the caller's (its pool configuration); the read thresholds default to configs/default.toml[pool.phototourism]`.
VisualGeometryToolkitEval.Datasets.load_roma_pairs — Method
load_roma_pairs(path) -> Vector{RomaPair}Every pair of one consolidated RoMa / SP+LG correspondences scene file (<dir>/<scene>.jld2), in pixels.
VisualGeometryToolkitEval.Datasets.load_sparse_matches — Method
load_sparse_matches(path) -> CorrespondencesThe correspondences (pixels, Float32 as written) of one sparse-match HDF5 file of the match extractor, RoMa v2 or SuperPoint + LightGlue by its matcher attribute, each carrying its confidence (higher = better) as the attribute column confidence (withattrs; read cs.confidence).
VisualGeometryToolkitEval.Datasets.load_validation_data — Function
load_validation_data(ds::AbstractStereoDataset, p::StereoPair, correspondences)
-> (; rig, correspondences, depth_src, depth_tgt)What GT validation of correspondences (pixels of the images p names) needs: the rig and correspondences in the frame of the depth maps, and the two depth maps (metres, NaN invalid). Only ETH3D changes frame — its laser depth lives in the distorted DSLR images, its matches in the undistorted ones; every other dataset returns p.rig and correspondences unchanged.
VisualGeometryToolkitEval.Datasets.pt_scene_files — Method
pt_scene_files(scene, trees::PtRawTrees) -> Vector{String}The raw files load_pt_pairs opens for PhotoTourism scene (one of PT_SCENES), under the caller's trees: its matches.h5 and match_conf.h5 and the COLMAP model's cameras.bin, images.bin and points3D.bin. The one statement of the reader's path rule outside the reader (the data-artifact catalog derives its file lists from it).
VisualGeometryToolkitEval.Datasets.scannet1500_pairs — Method
scannet1500_pairs(root) -> Vector{StereoPair}The 1500 ScanNet evaluation pairs of <root>/test.npz, each scene's calibration from scans_test/<scene>/intrinsic/intrinsic_color.txt.
VisualGeometryToolkitEval.Datasets.seven_scenes_pairs — Method
seven_scenes_pairs(root; split = :test, scene = :all, interval, stride) -> Vector{StereoPair}The (frame[i], frame[i + interval]) pairs, i = 1, 1 + stride, …, of every sequence of split (:test, :train) under root, for every scene or the one named by scene. The scene id of a pair is "<scene>/<sequence>".
VisualGeometryToolkitEval.Datasets.stereo_pairs — Function
stereo_pairs(ds::AbstractStereoDataset) -> Vector{StereoPair}Every evaluation pair of the dataset, by the dataset's own pair rule.
Internals
These names are not public; they are listed for contributors.
VisualGeometryToolkitEval.Datasets._load_pt_pair — Method
_load_pt_pair(matches_f, conf_f, recon, pair_key; snn_threshold, min_correspondences,
gt_inlier_sampson_px = [pool.phototourism] gt_inlier_sampson_px)
-> PtPair | nothingLoad one pair from already-open matches/conf HDF5 handles plus the per-scene recon = (cameras, images, track_index) (built once per scene). Apply the SNN filter (match_conf < snn_threshold; 0=good, 1=bad), extract SfM-track-paired SIFT detections, compose the GT relative pose from the COLMAP per-image (q, t), and mark the GT inliers (pixel Sampson under the GT F below gt_inlier_sampson_px).
VisualGeometryToolkitEval.Datasets._row_major_pose — Method
_row_major_pose(v) -> (R::SMatrix{3,3,Float64,9}, t::SVector{3,Float64})The rotation block and the last column of a 3×4 matrix [R | t] stored ROW-MAJOR as 12 numbers (R₁₁ R₁₂ R₁₃ t₁ R₂₁ … t₃) — the layout of the HEB pose_* datasets (and of KITTI's calib.txt/poses/*.txt and ScanNet-1500's rel_pose). The one parser of it.
VisualGeometryToolkitEval.Datasets._seeded_key_subsample — Method
_seeded_key_subsample(keys, tag; max_pairs_per_scene, subsample_overdraw, subsample_seed) -> keys′The per-scene pair subsample of the raw readers: when the scene has more pair keys than max_pairs_per_scene, a seeded subsample_overdraw × overdraw (shuffle under StableRNG(stable_seed(subsample_seed, tag)), order preserved) that the reader trims to the cap after its own rejections; otherwise every key. Stable across Julia versions: the seed is a fixed SHA-256 derivation and the stream StableRNGs'.
VisualGeometryToolkitEval.Datasets._snn_filtered_matches — Method
_snn_filtered_matches(m, snn, snn_threshold) -> (correspondences, snn_kept, kept)The SNN filter of every raw reader: keep the matches with snn < snn_threshold (SNN = Lowe's dNN/d2NN, low = good; a match AT the threshold is dropped). m holds one match per column with the pixel coordinates in rows 1–4 (x₁ y₁ x₂ y₂); returns the kept pixel correspondences, their SNN, and the kept column indices (for any per-match column the reader carries along).