Datasets:
Tasks:
Graph Machine Learning
Formats:
csv
Size:
10K - 100K
Tags:
structure-from-motion
view-graph
pose-graph
rotation-averaging
translation-averaging
pose-graph-optimization
License:
|
Download README.md from ezharjan/ViewGraphBench: direct link, hf CLI and curl.
- Browser
- Download file 37.4 kB
-
https://huggingface.co/datasets/ezharjan/ViewGraphBench/resolve/main/README.md
- Command line
-
hf download hf://datasets/ezharjan/ViewGraphBench/README.md
-
curl -L -o README.md https://huggingface.co/datasets/ezharjan/ViewGraphBench/resolve/main/README.md
37.4 kB
| license: mit | |
| pretty_name: "ViewGraphBench" | |
| tags: | |
| - structure-from-motion | |
| - view-graph | |
| - pose-graph | |
| - rotation-averaging | |
| - translation-averaging | |
| - pose-graph-optimization | |
| - outlier-detection | |
| - 3d-vision | |
| - synthetic | |
| - benchmark | |
| task_categories: | |
| - graph-ml | |
| size_categories: | |
| - 10K<n<100K | |
| annotations_creators: | |
| - machine-generated | |
| source_datasets: | |
| - original | |
| configs: | |
| - config_name: index | |
| data_files: | |
| - split: graphs | |
| path: index.csv | |
| default: true | |
| - config_name: graph_statistics | |
| data_files: | |
| - split: graphs | |
| path: stats/graphs.csv | |
| # ViewGraphBench | |
| Synthetic view graphs with exact ground truth for the global stage of Structure-from-Motion. | |
| [Toolkit and generator on GitHub](https://github.com/Ezharjan/ViewGraphForge) | [`viewgraphforge` on PyPI](https://pypi.org/project/viewgraphforge/) | [Citation](#citation) | MIT license | |
| ViewGraphBench is a benchmark for rotation averaging, translation averaging, SE(3) pose-graph optimisation and the detection of outlier edges. A node of a view graph is a calibrated camera with a known pose. An edge is a measured relative pose between two cameras (rotation, unit translation direction and a metric translation for pose-graph optimisation) together with its standard deviations, the number of feature matches behind it, geometric covariates, its true error and a label that says whether and how it is corrupted. | |
| Each graph is the output of a simulated global-SfM front end on a procedural 3-D scene. The cameras follow one of seven capture patterns and observe the scene points, the edges follow from co-visibility and an image-retrieval step, and the measurement errors depend on the number of matches and on the viewing geometry. Scenes with repeated structure (symmetric objects and monuments, periodic facades and corridors, twin buildings) produce wrong relative poses that agree with each other around cycles, which cycle-consistency checks cannot detect. | |
| The graphs were generated with [ViewGraphForge](https://github.com/Ezharjan/ViewGraphForge), an open-source toolkit (package `viewgraphforge`, command `vgf`) that also reads the files, runs the baseline solvers and the benchmark, and regenerates the dataset from its configuration. | |
| | quantity | value | | |
| |---|---| | |
| | graphs | 45,495 in 16 splits | | |
| | cameras | 15,167,170 in total, 12 to 100,000 per graph | | |
| | relative-pose measurements (edges) | 290,885,926, 19.2 % of them labelled as outliers | | |
| | camera-network families, scene types | 7, 7 | | |
| | files | 51,061: 45,495 graphs (`.npz`), 5,432 pose graphs (`.g2o`), tables and figures | | |
| | size | 102 GB | | |
| | generator | `viewgraphforge` 1.0.0, global seed 20260909 | | |
|  | |
| *One graph of each camera-network family (`bench_topology`, top views): cameras in blue, inlier edges in grey, random outliers in red, pink and purple, gross errors of the noise model in yellow.* | |
| ## Quick start | |
| ``` | |
| pip install -U "viewgraphforge[hub]" | |
| hf download ezharjan/ViewGraphBench --repo-type dataset --local-dir ViewGraphBench --include "index.csv" --include "dataset_info.json" --include "splits/bench_topology/*" | |
| ``` | |
| ```python | |
| import viewgraphforge as vgf | |
| from viewgraphforge.benchmark import metrics, rotation_averaging, translation_averaging | |
| g = vgf.load_graph("ViewGraphBench/splits/bench_topology/g0000_orbit_object_n300_r0.npz") | |
| print(g.n_nodes, g.n_edges, g.is_outlier.mean()) # cameras, edges, outlier fraction | |
| R = rotation_averaging.l1_irls(g) # global rotations from the relative ones | |
| print(metrics.rotation_metrics(R, g.R_wc)["rot_median_deg"]) # median error in degrees | |
| C = translation_averaging.lud(g, R) # camera centres up to a similarity | |
| print(metrics.position_metrics(C, g.centers)["pos_median_rel"]) | |
| ``` | |
| The full dataset is 102 GB. `--include` and `--exclude` select parts of it with shell-style patterns (`*` also matches `/`); with huggingface_hub 1.0 or newer, which the `hub` extra installs, both options can be repeated: | |
| ``` | |
| hf download ezharjan/ViewGraphBench --repo-type dataset --local-dir ViewGraphBench --include "splits/bench_*" --include "*.csv" --include "*.json" --include "manifest_sha256.txt" | |
| hf download ezharjan/ViewGraphBench --repo-type dataset --local-dir ViewGraphBench --exclude "splits/train/*" | |
| hf download ezharjan/ViewGraphBench --repo-type dataset --local-dir ViewGraphBench | |
| ``` | |
| The first command fetches the benchmark splits with the tables and the checksums, the second everything except the training split and the third the complete dataset. | |
| `index.csv` lists every graph with its split, family, scene, size, noise and outlier settings, file path and checksum, so graphs can be selected before they are downloaded. The dataset viewer shows it, and `datasets.load_dataset("ezharjan/ViewGraphBench", "index", split="graphs")` loads it as a table. | |
| ## Why synthetic view graphs | |
| Global SfM back ends are usually evaluated on view graphs of real photo collections, whose reference poses are themselves reconstructions, or on synthetic graphs with random topology, isotropic noise and uniformly random outliers, which lack what makes real graphs difficult: weak edges with few matches and short baselines, long sequences with little overlap and outliers that agree with each other. This dataset provides | |
| * exact ground truth for every camera, relative pose, measurement error and outlier, including the outlier type and, for repeated structure, the symmetry that caused it; | |
| * measurements from a model of the front end: co-visibility from projection, occlusion and feature detection, retrieval-style edge selection, errors driven by the number of matches and the baseline-to-depth ratio, and optionally a simulated two-view estimator; | |
| * sweeps that vary one factor at a time (size, noise, outlier ratio, outlier type, repeated structure, density, heavy tails, match threshold, scale noise), so that robustness can be reported as curves; | |
| * a training split of 40,000 graphs, with validation and test splits from the same distribution, for learned outlier filters and graph neural networks; | |
| * the [toolkit](https://github.com/Ezharjan/ViewGraphForge) that generated it, with loaders, baseline solvers, metrics, the benchmark protocol, validation and the figures of this page. | |
| ## Splits | |
| | split | graphs | cameras per graph | design | varies | | |
| |---|---:|---:|---|---| | |
| | `train` | 40,000 | 12 to 800 | 40,000 random draws, 30 to 800 cameras requested (log-uniform) | training; family, size, pixel noise, outlier ratio and type, retrieval depth, detection rate, noise model, heavy tails, scale noise and repeated structure drawn at random | | |
| | `val` | 2,000 | 18 to 799 | 2,000 random draws, 30 to 800 cameras requested (log-uniform) | validation, same distribution as `train` | | |
| | `test_wild` | 2,000 | 15 to 800 | 2,000 random draws, 30 to 800 cameras requested (log-uniform) | test, same distribution as `train` | | |
| | `test_wild_large` | 200 | 800 to 4,801 | 200 random draws, 800 to 5,000 cameras requested (log-uniform), analytic noise model only | test with larger graphs than in training | | |
| | `bench_scale` | 231 | 30 to 100,000 | `n_nodes` in {50, 100, 250, 500, 1000, 2500, 5000, 10000, 25000, 50000, 100000} × 7 families × 3 repetitions | number of cameras | | |
| | `bench_noise` | 147 | 295 to 300 | `pixel_noise` in {0.25, 0.5, 1, 2, 4, 8, 16} × 7 families × 3 repetitions; `n_nodes` 300 | pixel noise of the image points | | |
| | `bench_outliers` | 168 | 293 to 300 | `outlier_ratio` in {0, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6} × 7 families × 3 repetitions; `n_nodes` 300 | fraction of random outliers | | |
| | `bench_outlier_mode` | 63 | 276 to 300 | `outlier_mode` in {translation, rotation, both} × 7 families × 3 repetitions; `n_nodes` 300, `outlier_ratio` 0.3 | part of the measurement a random outlier replaces | | |
| | `bench_symmetry` | 126 | 295 to 300 | `symmetry_confusability` in {0, 0.1, 0.2, 0.35, 0.5, 0.75} × 7 cases with repeated structure × 3 repetitions; `n_nodes` 300, `outlier_ratio` 0 | confusability of repeated structure | | |
| | `bench_density` | 126 | 262 to 300 | `retrieval_k` in {3, 5, 10, 20, 40, 80} × 7 families × 3 repetitions; `n_nodes` 300 | retrieval depth (views kept per camera) | | |
| | `bench_heavytail` | 84 | 296 to 300 | `heavy_tail_df` in {0, 5, 3, 2} × 7 families × 3 repetitions; `n_nodes` 300, `outlier_ratio` 0 | Student-t noise (degrees of freedom, 0 = Gaussian) | | |
| | `bench_matches` | 84 | 96 to 300 | `min_matches` in {10, 20, 40, 80} × 7 families × 3 repetitions; `n_nodes` 300 | minimum number of matches per edge | | |
| | `bench_topology` | 70 | 297 to 300 | 7 families × 10 repetitions; `n_nodes` 300 | camera-network family at the default settings | | |
| | `bench_twoview` | 63 | 100 to 1,000 | `n_nodes` in {100, 300, 1000} × 7 families × 3 repetitions; `noise_model` twoview | number of cameras, simulated two-view estimator | | |
| | `bench_twoview_symmetry` | 28 | 294 to 300 | `symmetry_confusability` in {0.2, 0.5} × 7 cases with repeated structure × 2 repetitions; `n_nodes` 300, `noise_model` twoview, `outlier_ratio` 0 | confusability of repeated structure, simulated two-view estimator | | |
| | `bench_pgo` | 105 | 497 to 500 | `scale_noise` in {0.01, 0.03, 0.1, 0.2, 0.4} × 7 families × 3 repetitions; `n_nodes` 500, `outlier_ratio` 0.1 | noise of the metric baseline lengths (SE(3) variant) | | |
| Settings that a split does not fix take the generator defaults: 1 px image noise, the analytic noise model, retrieval depth 20, at least 20 matches per edge, 10 % random outliers of mixed type (more often on edges with few matches), Gaussian noise, feature detection probability 0.8 and 5 % log-normal noise on the metric baseline lengths. In `wild` splits the sampler draws these settings for every graph, except the minimum number of matches. Only the largest connected component of a view graph is kept, so some graphs have fewer cameras than requested; the graph id records the requested number. | |
| In the sweep splits, the seed of a graph depends on the case and the repetition but not on the level of the swept factor. All levels therefore share the scene, the cameras and the random numbers up to the step where the factor acts, and differences between levels are caused by the factor (in `bench_scale` and `bench_twoview` the factor is the number of cameras, so the cameras differ between levels, and the corridor, urban and terrain scenes also grow with it). | |
| Statistics of each split (`stats/splits.csv`): | |
| | split | cameras | edges | mean degree | outlier fraction | symmetry-induced edges | inlier rotation error [deg] | inlier direction error [deg] | | |
| |---|---:|---:|---:|---:|---:|---:|---:| | |
| | `train` | 9,322,257 | 167,127,204 | 28.8 | 0.249 | 12,751,910 | 0.088 | 0.135 | | |
| | `val` | 474,777 | 8,220,231 | 28.5 | 0.243 | 598,787 | 0.089 | 0.142 | | |
| | `test_wild` | 483,442 | 8,602,980 | 29.4 | 0.248 | 633,759 | 0.088 | 0.134 | | |
| | `test_wild_large` | 454,699 | 10,550,698 | 45.5 | 0.232 | 617,323 | 0.056 | 0.152 | | |
| | `bench_scale` | 4,082,251 | 89,462,079 | 38.4 | 0.102 | 0 | 0.086 | 0.190 | | |
| | `bench_noise` | 44,044 | 844,109 | 38.3 | 0.115 | 0 | 0.181 | 0.252 | | |
| | `bench_outliers` | 50,288 | 965,432 | 38.4 | 0.269 | 0 | 0.083 | 0.110 | | |
| | `bench_outlier_mode` | 18,825 | 362,601 | 38.5 | 0.301 | 0 | 0.076 | 0.107 | | |
| | `bench_symmetry` | 37,728 | 892,434 | 47.3 | 0.149 | 138,512 | 0.074 | 0.112 | | |
| | `bench_density` | 37,704 | 681,482 | 36.1 | 0.101 | 0 | 0.089 | 0.135 | | |
| | `bench_heavytail` | 25,176 | 483,856 | 38.4 | 0.002 | 0 | 0.109 | 0.143 | | |
| | `bench_matches` | 24,737 | 456,406 | 36.6 | 0.101 | 0 | 0.083 | 0.113 | | |
| | `bench_topology` | 20,988 | 404,234 | 38.5 | 0.101 | 0 | 0.084 | 0.116 | | |
| | `bench_twoview` | 29,394 | 585,337 | 36.2 | 0.103 | 0 | 0.076 | 0.143 | | |
| | `bench_twoview_symmetry` | 8,380 | 204,173 | 48.8 | 0.183 | 36,456 | 0.074 | 0.094 | | |
| | `bench_pgo` | 52,480 | 1,042,670 | 39.7 | 0.101 | 0 | 0.078 | 0.106 | | |
| Cameras, edges and symmetry-induced edges are totals over the graphs of a split; degree and outlier fraction are means over its graphs; the errors are the median over its graphs of the median error of the inlier edges of each graph. | |
|  | |
| *Composition of the dataset: families, splits, graph sizes, degrees, outlier fractions and inlier errors.* | |
| ## What a graph contains | |
| Each graph is a compressed numpy archive (`.npz`) with the arrays below and a `meta_json` string that holds the generation parameters, the seed and summary statistics. A graph has `n` cameras and `m` edges; every camera pair is stored once, with `i < j`. | |
| | array | shape | type | content | | |
| |---|---|---|---| | |
| | `node_q_wc` | (n,4) | float64 | world-to-camera rotation `R_i` as a unit quaternion | | |
| | `node_t_wc` | (n,3) | float64 | world-to-camera translation `t_i` [m], so that `x_cam = R_i X + t_i` | | |
| | `node_center` | (n,3) | float64 | camera centre `C_i = -R_i^T t_i` [m] | | |
| | `node_K` | (n,4) | float64 | intrinsics fx, fy, cx, cy [px] | | |
| | `node_image_size` | (n,2) | int32 | width, height [px] | | |
| | `node_seq_index` | (n,) | int32 | acquisition order (a random permutation for the unordered `crowd` family) | | |
| | `node_n_visible` | (n,) | int32 | scene points observed by the camera | | |
| | `node_gravity_cam` | (n,3) | float64 | world up direction in the camera frame, `R_i [0,0,1]^T` | | |
| | `edge_i, edge_j` | (m,) | int32 | camera indices, `i < j` | | |
| | `edge_q_meas` | (m,4) | float64 | measured relative rotation `R_ij` | | |
| | `edge_tdir_meas` | (m,3) | float64 | measured unit translation direction `tdir_ij`, in the frame of camera j | | |
| | `edge_t_meas` | (m,3) | float64 | measured metric relative translation `t_ij` [m] (SE(3) variant) | | |
| | `edge_q_true, edge_tdir_true, edge_t_true` | (m,4), (m,3), (m,3) | float64 | the same quantities computed from the ground-truth poses | | |
| | `edge_sigma_rot, edge_sigma_dir` | (m,) | float32 | reported noise level per axis of the rotation vector and per tangent axis of the direction [rad]: a standard deviation, or the scale of the Student-t distribution when `heavy_tail_df > 0` | | |
| | `edge_sigma_trans` | (m,) | float32 | approximate standard deviation of the metric translation per axis [m] | | |
| | `edge_n_matches, edge_n_covis` | (m,) | int32 | matches supporting the measured relative pose; co-visible scene points | | |
| | `edge_baseline, edge_median_depth` | (m,) | float32 | length of `C_j - C_i`; mean of the two cameras' median point depths [m] | | |
| | `edge_view_angle_deg` | (m,) | float32 | angle between the optical axes [deg] | | |
| | `edge_overlap_i, edge_overlap_j` | (m,) | float32 | fraction of each camera's points that the other camera also observes | | |
| | `edge_err_rot_deg, edge_err_dir_deg, edge_err_trans` | (m,) | float32 | true error of the measurement [deg, deg, m] | | |
| | `edge_outlier_type, edge_is_outlier` | (m,) | int8, bool | outlier type (table below); `edge_outlier_type != 0` | | |
| | `edge_symmetry_id` | (m,) | int32 | row of the `sym_*` arrays for symmetry-induced outliers, otherwise -1 | | |
| | `points_xyz, points_module, points_copy` | (P,3), (P,), (P,) | float32, int32 | scene points [m] (at most 20,000; not stored in `bench_scale`) and their repeated-structure labels (-1 for a unique point) | | |
| | `sym_R, sym_t, sym_module, sym_copy_from, sym_copy_to` | (S,3,3), (S,3), (S,) | float64, int32 | the `S` symmetry transforms `X_to = R X_from + t` behind the symmetry-induced outliers (only in graphs with such outliers) | | |
| | `obs_cam, obs_point, obs_xy` | (K,), (K,), (K,2) | int32, float32 | image observations of the stored points in normalised coordinates, with the pixel noise of the graph (graphs with stored points and up to 2,000 cameras, at most 300 per camera) | | |
| | `edge_outlier_type` | name | measurement | | |
| |---:|---|---| | |
| | 0 | `none` | the true relative pose with noise (inlier) | | |
| | 1 | `random_both` | random rotation and random direction | | |
| | 2 | `random_rotation` | random rotation; the direction is the noisy true one | | |
| | 3 | `random_translation` | random direction; the rotation is the noisy true one | | |
| | 4 | `symmetry` | the relative pose, with noise, to a virtual camera: the true camera moved by a symmetry of the scene, as when a matcher confuses two copies of a repeated structure; consistent around cycles (for the translational symmetries of periodic facades and corridors, the rotation is correct and only the direction is wrong) | | |
| | 5 | `gross_error` | not injected: a measurement of the noise model whose error exceeds 10 deg in rotation or 20 deg in direction | | |
| Random rotations and directions are uniformly distributed. Because the true error of every edge is stored, other definitions of an outlier can be applied directly; the benchmark, for example, uses a rotation error above 5 deg (a direction error above 10 deg for the direction residual), so the outliers of translational symmetries count only for the direction residual. | |
| Among the cases with repeated structure, the urban scene with twin buildings (`manhattan` family) produces few symmetry-induced edges. | |
| Conventions: metres; world frame with +z up; OpenCV camera frame (x right, y down, z forward). Relative poses map camera i to camera j, `R_ij = R_j R_i^T` and `t_ij = t_j - R_ij t_i` (`x_j = R_ij x_i + t_ij`), so `E_ij = [t_ij]_x R_ij` satisfies `x_j^T E_ij x_i = 0` and the baseline direction in the world frame is `(C_j - C_i) / |C_j - C_i| = -R_j^T tdir_ij`. Quaternions are stored scalar-last, (qx, qy, qz, qw), the order of SciPy and of the g2o format, with qw >= 0. | |
| The `.g2o` files contain `VERTEX_SE3:QUAT` camera-to-world poses `(R_i^T, C_i)`, initialised by chaining the measured relative poses along a maximum spanning tree weighted by the number of matches (not the ground truth), and `EDGE_SE3:QUAT` measurements `Z_ij = T_i^-1 T_j = (R_ij^T, -R_ij^T t_ij)` with the information matrix `diag(I/sigma_trans^2, I/sigma_rot^2)` in the order (x, y, z, qx, qy, qz). `sigma_rot` refers to the rotation vector, as GTSAM and SE-Sync read the block; g2o's own `EdgeSE3` applies it to the vector part of the quaternion, about half the rotation vector, so multiply the rotation block by 4 for the same weighting in g2o. They exist for the graphs of up to 20,000 cameras of every split except `train`; `vgf.write_g2o(graph, path)` writes one for any graph. | |
|  | |
| *One graph in detail: top and 3-D view, adjacency pattern and the measurement errors of each edge class.* | |
|  | |
| *Repeated structure (`bench_symmetry`): the orange edges are relative poses to a camera moved by a symmetry of the scene. They agree with each other around cycles.* | |
| ## Files | |
| ``` | |
| README.md, LICENSE | |
| index.csv one row per graph: split, family, scene, size, settings, files, SHA-256 | |
| dataset_info.json counts per split and the complete configuration | |
| manifest_sha256.txt SHA-256 of every .g2o and .npz file | |
| splits/<split>/<graph_id>.npz a graph (splits with up to 3,000 graphs) | |
| splits/<split>/<graph_id>.g2o the graph as an SE(3) pose graph, without the ground truth (see above) | |
| splits/<split>/_split.json design record: specification of the split, seed and parameters of every graph | |
| splits/train/<a>-<b>/ graphs a to b of train, 1,000 per folder (00000-00999, 01000-01999, ...) | |
| stats/ graphs.csv (one row per graph), splits.csv, summary.json, summary.md | |
| benchmarks/ results.csv (one row per graph and method), leaderboard.csv/.md, sweeps.csv, run.json | |
| figures/ the figures of this page, galleries of every split, overviews of single graphs | |
| ``` | |
| Graph ids have the form `g<index>_<family>_<scene>_n<cameras requested>[_<factor><value>]_r<repetition>`, for example `g0012_orbit_object_n300_conf0.5_r0`, where the factor is a short code (`px` pixel noise, `out` outlier ratio, `om` outlier mode, `conf` confusability, `k` retrieval depth, `df` degrees of freedom, `mm` minimum matches, `sc` scale noise); sweeps over the number of cameras add no suffix. An id is unique within its split but can occur in several splits, so tables are joined on the pair (`split`, `graph_id`). The graphs of `train` come without `.g2o` files to keep the download small; `vgf.write_g2o` creates them from the `.npz` files. | |
| ## Loading the data | |
| With the toolkit, after downloading the benchmark splits: | |
| ```python | |
| import viewgraphforge as vgf | |
| index = vgf.read_index("ViewGraphBench") # pandas DataFrame, one row per graph | |
| rows = index[(index.split == "bench_outliers") & (index.outlier_ratio_target == 0.3)] | |
| graphs = [vgf.load_graph(f"ViewGraphBench/{p}") for p in rows.npz_path] | |
| g = graphs[0] | |
| R_true, C_true = g.R_wc, g.centers # ground truth: (n,3,3) rotations, (n,3) centres | |
| R_ij, tdir_ij = g.R_meas, g.tdir_meas # measurements (m,3,3), (m,3) of the edges g.edges (m,2) | |
| ``` | |
| With numpy only: | |
| ```python | |
| import json | |
| import numpy as np | |
| d = np.load("ViewGraphBench/splits/bench_topology/g0000_orbit_object_n300_r0.npz") | |
| meta = json.loads(str(d["meta_json"])) # parameters, seed, statistics | |
| i, j, q = d["edge_i"], d["edge_j"], d["edge_q_meas"] | |
| ``` | |
| The `.g2o` files can be read by g2o and by GTSAM (`readG2o`) as they are. Their first line is a comment, which the reader of SE-Sync does not accept; remove it for SE-Sync. | |
| ## How a graph is generated | |
| Every graph is generated with a random generator seeded from its own seed: | |
| 1. Scene: a procedural point cloud with surface normals (object, facade, corridor, urban block, room, terrain or plaza). The corridor, urban, terrain and facade scenes grow with the number of cameras. Scenes with repeated structure contain identical copies of a module: the sectors of a symmetric object, facade columns, corridor segments, twin buildings or the faces of a monument. | |
| 2. Cameras: exactly `n` pinhole cameras (1600 x 1200 px) of one family: `orbit` (a ring around an object), `dome` (several rings on a hemisphere), `corridor` (forward motion along a street), `lawnmower` (an aerial survey), `crowd` (unordered photos of a landmark with varying focal lengths), `walk` (hand-held motion in a room) or `manhattan` (a vehicle on a street grid, with loop closures). | |
| 3. Visibility: a point is observed when it lies within the depth range, projects into the image, faces the camera (incidence angle below 80 deg), passes a z-buffer occlusion test and is detected (probability 0.8 by default); at most 3,000 points per image are kept. | |
| 4. Edges: in graphs of up to 400 cameras every camera pair is a candidate; larger graphs take the nearest neighbours in camera position and viewing direction, the three previous and next cameras in acquisition order and, for repeated structure, random pairs of cameras that see copies of the same module. Match counts are binomial in the number of co-visible points, with a probability that falls with the angle between the views and the scale change; repeated structure adds competing hypotheses, and the reported relative pose is drawn among those with at least `min_matches` matches, with a preference for the one with the most support. Each camera keeps the `retrieval_k` candidates with the most co-visible points (and up to `cand_sym_k` that look alike through repeated structure), and a candidate becomes an edge when its reported pose has at least `min_matches` matches. The largest connected component is kept. | |
| 5. Measurements: the reported relative pose plus noise, either from a closed-form model (`analytic`) or from a simulated two-view estimator (`twoview`). The analytic model is calibrated against the estimator: its errors scale with the pixel noise over the focal length and with 1/sqrt(matches), vary with the baseline-to-depth ratio `rho` as exp(b1 L + b2 L^2) with L = log(rho) and `rho` clipped to [0.08, 10] (below 0.08 the direction error also grows as 1/rho) and carry a log-normal per-edge factor, optionally with Student-t tails (`heavy_tail_df`, analytic model only); a direction that the baseline cannot determine is replaced by a random one. The estimator runs the normalised 8-point algorithm on the noisy correspondences, refines its solution and, separately, the reported pose (standing in for a minimal solver inside RANSAC) by Levenberg-Marquardt minimisation of the Sampson error, keeps the solution with the lower error and reports covariances from the Fisher information; an edge on which it fails keeps the analytic measurement. | |
| 6. Outliers: a fraction of the edges, chosen with probability inversely proportional to their number of matches, receives random rotations and/or directions; symmetry-induced outliers come from step 4. The metric translation for the SE(3) variant is the measured direction times the length of the reported relative translation with log-normal noise, and every error is recorded. | |
| ## Baselines | |
| `vgf benchmark` runs the baselines on the graphs of up to 3,000 cameras (pose-graph optimisation up to 1,500 cameras). Rotation errors are measured after a robust alignment of the global rotation. Positions are compared after a similarity alignment (translation averaging) or a rigid alignment (pose-graph optimisation) and divided by the diagonal of the bounding box of the true camera centres. Outlier detection is scored against the edges with a rotation error above 5 deg (a direction error above 10 deg for the direction residual). The tables give the mean over the graphs of a split of the per-graph median error or F1 score; graphs without labelled outliers are left out of the F1 means, and graphs on which a method failed are left out of its means. | |
| This leaderboard covers 3,329 graphs of the splits `test_wild`, `test_wild_large`, `bench_scale`, `bench_noise`, `bench_outliers`, `bench_outlier_mode`, `bench_symmetry`, `bench_density`, `bench_heavytail`, `bench_matches`, `bench_topology`, `bench_twoview`, `bench_twoview_symmetry` and `bench_pgo`. The complete tables are in `benchmarks/leaderboard.md` and the per-graph results in `benchmarks/results.csv`. | |
| Rotation averaging, median rotation error [deg] (best value of each split in bold): | |
| | split | `spanning_tree` | `chordal_l2` | `chordal_l2+irls_cauchy` | `l1_irls` | `l1_irls_info` | | |
| |---|---:|---:|---:|---:|---:| | |
| | `test_wild` | 31.9 | 16.3 | 9.94 | **7.63** | 8.88 | | |
| | `test_wild_large` | 64.5 | 23.2 | 11.3 | **8.76** | 12.2 | | |
| | `bench_scale` | 37.9 | 3.64 | 0.102 | 0.102 | **0.0541** | | |
| | `bench_noise` | 41.2 | 2.44 | 0.216 | 0.216 | **0.106** | | |
| | `bench_outliers` | 64.5 | 7.72 | 0.763 | **0.0921** | 6.42 | | |
| | `bench_outlier_mode` | 68.6 | 11.4 | 0.106 | **0.105** | 2.26 | | |
| | `bench_symmetry` | **0.271** | 20.9 | 22.3 | 5.92 | 5.15 | | |
| | `bench_density` | 34 | 5.71 | **0.0932** | 0.0933 | 3.86 | | |
| | `bench_heavytail` | 0.396 | 0.116 | 0.0929 | 0.0929 | **0.0297** | | |
| | `bench_matches` | 35.5 | 2.83 | **0.0773** | **0.0773** | 1.21 | | |
| | `bench_topology` | 32.9 | 2.71 | 0.0783 | 0.0783 | **0.0406** | | |
| | `bench_twoview` | 28.8 | 2.86 | 0.0803 | 0.0803 | **0.0375** | | |
| | `bench_twoview_symmetry` | 0.304 | 29 | 29.1 | 0.153 | **0.044** | | |
| | `bench_pgo` | 25.5 | 2.51 | 0.0796 | 0.0796 | **0.0352** | | |
| Translation averaging, median position error [% of the diagonal] (best value of each split in bold): | |
| | split | `linear_cross@gt_rot` | `linear_cross@l1_irls` | `lud@gt_rot` | `lud@l1_irls` | | |
| |---|---:|---:|---:|---:| | |
| | `test_wild` | 16.9 | 16.9 | **6.2** | 6.41 | | |
| | `test_wild_large` | 15.5 | 15.5 | **5.65** | 5.93 | | |
| | `bench_scale` | 13.5 | 13.4 | **1.24** | 1.32 | | |
| | `bench_noise` | 15 | 15 | 1.39 | **1.38** | | |
| | `bench_outliers` | 13.8 | 13.8 | **2.32** | 2.37 | | |
| | `bench_outlier_mode` | 12 | 12.2 | **2.32** | 2.38 | | |
| | `bench_symmetry` | 14.3 | 14.2 | **6.21** | 7.86 | | |
| | `bench_density` | 15.2 | 15.1 | **1.41** | **1.41** | | |
| | `bench_heavytail` | 0.778 | 0.821 | **0.168** | 0.177 | | |
| | `bench_matches` | 14.5 | 14.5 | **1.58** | 1.63 | | |
| | `bench_topology` | 14.5 | 14.5 | **1.33** | **1.33** | | |
| | `bench_twoview` | 14 | 14.1 | **1.26** | **1.26** | | |
| | `bench_twoview_symmetry` | 17.9 | 17.6 | **7.33** | 7.72 | | |
| | `bench_pgo` | 13.2 | 13.3 | **0.607** | 0.612 | | |
| Pose-graph optimisation, median position error [% of the diagonal] (best value of each split in bold): | |
| | split | `chain_init` | `lm_l2` | `lm_huber` | `lm_cauchy` | `lm_cauchy@rotavg_init` | | |
| |---|---:|---:|---:|---:|---:| | |
| | `test_wild` | 7.62 | 12.7 | 5.51 | 6.23 | **3.76** | | |
| | `test_wild_large` | 13.6 | 14.3 | 4.53 | 11.9 | **3.47** | | |
| | `bench_scale` | 6.45 | 5.97 | 0.221 | 5.49 | **0.134** | | |
| | `bench_noise` | 6.95 | 5.65 | 0.206 | 4.66 | **0.112** | | |
| | `bench_outliers` | 12.5 | 11.5 | 0.864 | 11.6 | **0.114** | | |
| | `bench_outlier_mode` | 14.4 | 13.2 | 0.59 | 12.7 | **0.113** | | |
| | `bench_symmetry` | 0.649 | 15 | 10.5 | **0.107** | 4.23 | | |
| | `bench_density` | 7.65 | 6.64 | 0.585 | 6.24 | **0.11** | | |
| | `bench_heavytail` | 0.806 | 0.117 | 0.0987 | 0.0904 | **0.0901** | | |
| | `bench_matches` | 7.86 | 6.11 | 0.544 | 6.51 | **0.424** | | |
| | `bench_topology` | 6.29 | 6.15 | 0.187 | 5.02 | **0.0964** | | |
| | `bench_twoview` | 5.74 | 5.86 | 0.191 | 4.45 | **0.104** | | |
| | `bench_twoview_symmetry` | 0.704 | 18.4 | 15.3 | **0.124** | 6.68 | | |
| | `bench_pgo` | 7.88 | 5.96 | 1.38 | 5.23 | **1.04** | | |
| Outlier detection, F1 score (best value of each split in bold): | |
| | split | `cycle_consistency` | `rot_residual@l1_irls` | `dir_residual@lud` | | |
| |---|---:|---:|---:| | |
| | `test_wild` | 0.784 | **0.851** | 0.787 | | |
| | `test_wild_large` | 0.775 | **0.849** | 0.768 | | |
| | `bench_scale` | 0.997 | **0.999** | 0.902 | | |
| | `bench_noise` | 0.950 | **0.991** | 0.905 | | |
| | `bench_outliers` | 0.995 | **0.996** | 0.868 | | |
| | `bench_outlier_mode` | 0.910 | **0.993** | 0.788 | | |
| | `bench_symmetry` | 0.238 | **0.671** | 0.514 | | |
| | `bench_density` | 0.978 | **0.997** | 0.883 | | |
| | `bench_heavytail` | 0.813 | **0.945** | 0.740 | | |
| | `bench_matches` | 0.996 | **0.999** | 0.910 | | |
| | `bench_topology` | 0.998 | **0.999** | 0.908 | | |
| | `bench_twoview` | 0.982 | **0.996** | 0.907 | | |
| | `bench_twoview_symmetry` | 0.332 | **0.891** | 0.518 | | |
| | `bench_pgo` | 0.997 | **0.999** | 0.921 | | |
| Rotation averaging: `spanning_tree` chains the relative rotations along a maximum spanning tree weighted by the number of matches; `chordal_l2` is the chordal least-squares solution (Martinec and Pajdla 2007), refined by Cauchy-weighted IRLS in `chordal_l2+irls_cauchy`; `l1_irls` is L1 averaging followed by IRLS (Chatterjee and Govindu 2013, 2018), with information weights in `l1_irls_info`. | |
| Translation averaging: `linear_cross` (Govindu 2001) and `lud` (Özyeşil and Singer 2015) estimate the camera centres from the ground-truth rotations (`@gt_rot`) or from the `l1_irls` rotations (`@l1_irls`). | |
| Pose-graph optimisation: `chain_init` is the spanning-tree chaining of the metric measurements alone; `lm_l2`, `lm_huber` and `lm_cauchy` are Levenberg-Marquardt optimisation with the named loss started from it, and `lm_cauchy@rotavg_init` starts from the `l1_irls` rotations and robustly solved centres (Carlone et al. 2015). | |
| Outlier detection: `cycle_consistency` flags an edge when none of its triangles closes within 5 deg (at most 30 sampled triangles; edges without a triangle are kept), a simple form of the loop test of Zach et al. 2010; `rot_residual@l1_irls` and `dir_residual@lud` flag the measurements that disagree with the averaged rotations by more than 5 deg or with the averaged positions by more than 10 deg. | |
| <p> | |
| <img src="https://huggingface.co/datasets/ezharjan/ViewGraphBench/resolve/main/figures/sweeps/bench_outliers_rotation.png" alt="Rotation averaging against the fraction of random outliers" width="49%"> | |
| <img src="https://huggingface.co/datasets/ezharjan/ViewGraphBench/resolve/main/figures/sweeps/bench_symmetry_outlier.png" alt="Outlier detection against the confusability of repeated structure" width="49%"> | |
| <img src="https://huggingface.co/datasets/ezharjan/ViewGraphBench/resolve/main/figures/sweeps/bench_noise_rotation.png" alt="Rotation averaging against the pixel noise" width="49%"> | |
| <img src="https://huggingface.co/datasets/ezharjan/ViewGraphBench/resolve/main/figures/sweeps/bench_scale_rotation.png" alt="Rotation averaging against the number of cameras (up to 2,500)" width="49%"> | |
| </p> | |
| *From left to right and top to bottom: rotation averaging against the fraction of random outliers; outlier detection against the confusability of repeated structure; rotation averaging against the pixel noise; rotation averaging against the number of cameras (up to 2,500). Each point is the mean over the graphs of one level (for the F1 score, over its graphs with labelled outliers).* | |
| ## Regenerating and extending the dataset | |
| These commands regenerate the dataset and the files of this repository: | |
| ``` | |
| pip install viewgraphforge | |
| vgf config full | |
| vgf generate --config full --out data_full --workers 16 | |
| vgf validate --data data_full --workers 16 | |
| vgf stats --data data_full --workers 16 | |
| vgf benchmark --data data_full --splits "bench_*" "test_*" --workers 16 | |
| vgf visualize --data data_full | |
| vgf export --data data_full --out data_hub | |
| vgf card --data data_hub | |
| ``` | |
| `vgf config full` prints the configuration of this dataset, `vgf generate` continues where it stopped when it is run again after an interruption, and the last two commands produce the layout of this repository and this page. | |
| The seed of every graph is derived from the global seed, the split and the place of the graph in the design (its index in a `wild` split, its case and repetition in a sweep or grid), so the result depends neither on the number of workers nor on the order of execution. With the same platform and library versions a regenerated graph is identical array by array; only the generation times in its metadata differ, so the file hashes differ between runs. Elsewhere the last bits of floating-point results can differ. That can flip a visibility or matching decision, after which the graph continues with a different random stream and becomes another sample of the same distribution. Regenerated on Linux with numpy 2.5.3 and scipy 1.18.1, 61 benchmark graphs of this copy (made on Windows) kept their edges, match counts and labels, while 3 of 7 training graphs (two with the `twoview` estimator, one with more than 400 cameras) did not; with numpy 2.4.4 and scipy 1.17.1, 26 of the 61 benchmark graphs differed as well. Regenerated copies are therefore compared with `vgf validate` and the statistics, not by file hash. | |
| Generating the published copy took about 13 hours with 16 worker processes on a laptop with 16 logical CPUs and 32 GB of RAM. The 100,000-camera graphs of `bench_scale` take from 3 minutes to 2.7 hours each and up to 4.3 GB of memory; `vgf generate` schedules the graphs against a memory budget. | |
| A configuration is a YAML file that lists the splits and their factor levels; `vgf config smoke > my.yaml` writes a small one to start from, and `vgf generate --config my.yaml --out my_data` builds a dataset in the same format. | |
| ## Validation | |
| `vgf validate --data <folder>` checks every graph: array shapes, index ranges and duplicate edges; unit quaternions and directions; the centres, gravity vectors, true relative poses, baselines and errors against the ground-truth poses and the measurements; that `edge_is_outlier` agrees with `edge_outlier_type`; the image observations against the poses and points; the `.g2o` file against the arrays (measurements, information matrices and initial poses); the row of the graph in `index.csv`; and the SHA-256 of its files listed in `manifest_sha256.txt`. Every file listed in the index or the manifest must exist, so run it on complete splits downloaded together with `index.csv` and `manifest_sha256.txt`. | |
| ## Limitations | |
| * There are no images. Feature detection and matching are statistical models, and appearance enters only through the confusability of repeated structure. | |
| * The cameras are ideal pinhole cameras with known intrinsics, without lens distortion, rolling shutter or motion blur. | |
| * The scenes are procedural layouts of seven types, not reconstructions of real places. | |
| * The analytic noise model is calibrated against the simulated two-view estimator, not against real image pairs; the `twoview` graphs use the estimator itself, which sees only correct correspondences with Gaussian pixel noise (mismatched features and RANSAC are not simulated). | |
| * Random outliers are uniform over rotations or directions, and symmetry-induced outliers follow the symmetry exactly; real matchers also produce partly wrong and mixed measurements. | |
| ## Citation | |
| If you use the dataset, please cite: | |
| ```bibtex | |
| @misc{viewgraphbench2026, | |
| title = {ViewGraphBench: Physically-Grounded Synthetic View Graphs for Global Structure-from-Motion Calibration}, | |
| author = {Aiersilan, Aizierjiang}, | |
| year = {2026}, | |
| note = {Dataset version 1.0.0, generated with ViewGraphForge}, | |
| howpublished = {Hugging Face Hub}, | |
| url = {https://huggingface.co/datasets/ezharjan/ViewGraphBench} | |
| } | |
| ``` | |
| The references of the baseline methods are listed in the [toolkit README](https://github.com/Ezharjan/ViewGraphForge#15-references). | |
| ## License | |
| MIT License, Copyright (c) 2026 Aizierjiang Aiersilan. See `LICENSE`. | |