Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

714 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sidewalk-validator-ai

Training pipeline for the AI models that validate crowdsourced sidewalk accessibility labels in Project Sidewalk
Makeability Lab, University of Washington

💻 Code · 🤗 Models · 🗃️ Datasets · 🚀 Serving API · 🌐 Platform · 📄 Papers · 📚 Docs

sidewalk-validator-ai trains the models that let Project Sidewalk check its own crowd. For each of five label types (curb ramp, missing curb ramp, obstacle, surface problem, crosswalk) it pulls every label and its votes from the public v3 API, keeps the labels the crowd clearly endorsed or clearly rejected, renders a label-centred, tilt-corrected, depth-sized crop from the panorama, and fine-tunes a DINOv2-Large classifier to predict correct or incorrect. A calibration step maps model confidence to measured precision. sidewalk-ai-api serves the models, and SidewalkWebpage calls it nightly for up to 800 labels per city with {label_type, panorama_id, x, y, city}, the camera pose and coord_frame; a verdict whose estimated accuracy is at least 0.92 (ai-validation-min-accuracy) is cast as a vote by the SidewalkAI account, anything below is recorded as Unsure, and every assessment is stored in label_ai_assessment (SidewalkWebpage/docs/ai-subsystems.md).

Since 2026-10-27 production runs the October 2026 models ("round 3"), trained on a panorama-grouped split with tilt-corrected crops and human votes only, published to Hugging Face on 2026-10-26 and served by sidewalk-ai-api 1.2.0. The models they replaced (2025-08) are the "previous production" row in the first table below.

Results

Every leg with full coverage (14 of 17: the two validator rounds and 12 of the 15 open-weight vision-language model (VLM) legs) is scored on the same 13,144 held-out crops of the round-3 split (the training deployments' test share plus three deployments held out of training entirely). AUC is of the incorrect score; macro-AUC gives each label type equal weight; the interval is a 95% label bootstrap; Δ is the paired difference against round 3; bold is the best AUC in a column. The previous-production row is optimistic: those models were trained in 2025-08 on an unrecorded label set that may overlap the test-share crops. The block is generated from docs/vlm-scoreboard/board.csv and drift-checked in CI; the full board with seventeen legs, within-city AUC, latency and per-deployment rows is docs/vlm-scoreboard.md.

model macro-AUC [95% CI] CurbRamp NoCurbRamp Obstacle SurfaceProblem Crosswalk Δ vs round 3 [95% CI]
Round 3 (DINOv2-L, 2026-10) 0.915 [0.910, 0.919] 0.953 0.920 0.873 0.855 0.972 —
Previous production (DINOv2-L, 2025-08) 0.899 [0.894, 0.905] 0.942 0.925 0.814 0.846 0.970 -0.015 [-0.020, -0.011]
Gemma 4 31B, 8-shot 0.775 [0.768, 0.783] 0.865 0.745 0.557 0.772 0.938 -0.139 [-0.147, -0.132]
Gemma 4 31B 0.756 [0.748, 0.763] 0.825 0.659 0.584 0.756 0.954 -0.159 [-0.167, -0.151]
GLM-5.3-Flash (FP8, vLLM) 0.754 [0.746, 0.762] 0.801 0.674 0.574 0.777 0.944 -0.160 [-0.169, -0.153]

The heatmaps below are built with the board (every full-coverage leg, pooled AUC; the CSVs behind them are in docs/vlm-scoreboard/). Round 3 leads every VLM on every label type (the 2025-08 models edge it on NoCurbRamp, 0.925 against 0.920). The VLMs come closest on Crosswalk, where their AUCs run 0.89–0.95 against 0.97, and are near chance on Obstacle, 0.51–0.61 against 0.87.

Heatmap: AUC by model and label type

Round 3 is ahead of every VLM in every scoreable severity slice. The VLMs lose ground as severity rises on CurbRamp (the 8-shot Gemma leg falls from 0.87 at severity 1 to 0.76 at severity 3, where round 3 stays above 0.91) and are near chance on Obstacle at every severity (0.50–0.70). Crosswalk severity 3 is too thin to score (five correct crops of 96).

Heatmap: AUC by model, label type and severity

By tag, round 3's weak spots are rare or badly transferring slices: Obstacle stairs (0.44 on 57 crops, 35 training crops), SurfaceProblem brick/cobblestone (0.63) and sand/gravel (0.75). Its largest gain over the 2025-08 models is Obstacle parked scooter/motorcycle, 0.87 against 0.52. Per deployment, the best VLM beats round 3 in one deployment only, a 33-crop single-type one (per_deployment.png).

Heatmap: AUC by model, label type and tag

The pooled AUC hides what a new deployment would see. Round 3 on the training deployments' test share against the three unseen deployments, with the within-deployment AUC that cannot be raised by telling deployments apart (docs/retrain-2026-10.md, one seed, panorama-bootstrap intervals):

type test AUC unseen-deployment AUC within-city AUC, unseen n test / unseen
CurbRamp 0.968 [0.958, 0.976] 0.907 [0.877, 0.933] 0.838 1,479 / 546
NoCurbRamp 0.934 [0.924, 0.943] 0.881 [0.854, 0.908] 0.861 2,613 / 743
Obstacle 0.883 [0.869, 0.896] 0.868 [0.847, 0.888] 0.788 2,266 / 1,812
SurfaceProblem 0.896 [0.881, 0.910] 0.710 [0.675, 0.745] 0.682 2,255 / 847
Crosswalk 0.980 [0.961, 0.993] 0.941 [0.897, 0.980] 0.946 445 / 138

Every type ranks labels well where it was trained; on unseen deployments CurbRamp, NoCurbRamp and Crosswalk lose 0.04 to 0.06 of AUC, Obstacle 0.02 and SurfaceProblem 0.19. The deployment outside the US is the weakest for every type but Crosswalk, so the report recommends gating AI votes per deployment before enabling them in a new one (#52).

What is served. Each model ships an isotonic confidence-to-accuracy map fitted on the validation split and reweighted to the deployment class prior. The shipped maps hold every Disagree verdict below the 0.92 gate by policy (#57) until the prior is settled (#56) and production outcomes exist, so the AI casts Agree votes only, for all five types. That includes SurfaceProblem, whose Agree map went live although the retrain report recommended holding both of its verdicts back (shadow by map cap is this repo's call; the only shadow SidewalkWebpage offers today is switching AI validation off per city). The per-deployment check the report wants before Agree votes in an unseen deployment does not exist in SidewalkWebpage yet (#52). Where the 2025-08 models stood against production outcomes, per type and per city, is in docs/calibration-2026-10.md and docs/per-city-calibration-2026-10.md; the pre-deploy red team of the round-3 chain is docs/deploy-checklist-2026-10.md. Every other study (VLM explanations, routing, distillation, road and segmentation priors, the AI Disagree reversal and re-label) is indexed in docs/README.md.

How it works

/v3/api/rawLabels (every deployment)   data_generation.py
        │                                     │
        ▼                                     ▼
 [1] select labels      human votes only · net ≥3 agree → correct · net ≥2 disagree → incorrect · expert votes break the rest
        │               (AI votes excluded; pre-downsampling counts → deployment_priors.json; correct downsampled to 55%)
        ▼
 [2] read panorama      pano store <city>/<pano_id[:2]>/<pano_id>.jpg → 8192×4096 equirectangular
        ▼
 [3] perspective view   90° FOV, 2048², centred on the label, rig-tilt corrected (sidewalk-panorama-tools, β = 0.95 for GSV)
        ▼
 [4] depth-sized crop   Depth Anything V2 (metric, ViT-B) at the centre → crop_half = 6100 / depth_m px → 640 px WebP
        ▼
 <label_type>/{correct,incorrect}/<city>_<label_id>.webp  +  <label_type>/manifest.csv (one row per label)
        │
        ▼
 [5] split              split_data.py      grouped by panorama + labels ≤3 m apart, 70 / 15 / 15 (+ held-out cities)  →  split.csv
        ▼
 [6] fine-tune          fine_tune_classifier.py   facebook/dinov2-large on split.csv, best val macro-F1  →  <label_type>/dinov2/
        ▼
 [7] evaluate           evaluate.py        split.csv → predictions.csv, metrics on test / test_heldout / hard
        ▼
 [7b] calibrate         calibration/calibrate.py   val split reweighted to deployment_priors.json → accuracy map
        ▼
 [8] publish            publish_to_hf.py   cards + inference files + crops  →  Hugging Face
        ▼
        sidewalk-ai-api /process  →  SidewalkWebpage nightly actor (≤ 800 labels/city, gate 0.92)

The rules behind steps 1 and 3 to 5 (vote margins, expert accounts, exclusions, soft targets, crop geometry) are in docs/training-data.md. One rule matters for anyone touching the data: the AI's own votes sit in the API's agree_count / disagree_count like anyone else's, so training counts votes from the validations column, by validator_type. Counting the aggregates would train the model on its own output.

file role
data_generation.py, data_generation.slurm Steps 1–5: label selection, deployment priors, panoramas from the pano store, views, depth-sized crops, a resumable manifest.csv; the job then runs the split
split_data.py Step 5: train/val/test by panorama, nearby panoramas merged, optional held-out cities, the hard flag
fine_tune_classifier.py, fine_tune.slurm Step 6: Hugging Face Trainer on facebook/dinov2-large; hard, soft or reliability-weighted targets; --split trains on a variant split (a fold held out, rows dropped or flipped; analysis/confident_learning.py); --init-from and --region-conditioning (region_model.py, regions.py; analysis/region_transfer.py)
evaluate.py, get_stats.slurm Step 7: predictions and metrics per split, per city and on the hard and gold slices; the job then calibrates
calibration/ Step 7b: isotonic confidence→accuracy maps in the API's format, from a retrained model's val split or from production outcomes; per-city checks
publish_to_hf.py, hf_cards.py Step 8: staged, checked uploads with generated cards (docs/publishing.md)
ai_label_holdout.py Step 1, AI-placed labels: the seeded share held out of training before selection (--ai-holdout-frac), written to ai_label_holdout.csv and recorded in generation_run.json (#79)
retype.py, fine_tune_retype.py, retype.slurm Experiment, not yet run: one 8-class model over label types, inherited round-3 split, binary verdict as p(claimed type) scored by the unchanged evaluate.py (docs/retype-2026-11.md)
hard_examples.py, validator_reliability.py Labels the deployed AI got wrong against a unanimous crowd or an expert; per-validator reliability for weighted targets
context_crops.py, context_model.py Issue #14, more context: a 4x wider crop and the whole view per label (data_generation.py --context-crops, or context_crops.py backfill for an existing dataset), and four context arms (the fourth, side_info_nohq, an ablation) for fine_tune_classifier.py --context-arm (docs/context-arms-2026-11.md)
backbones.py Issue #119: the backbone registry (pinned revisions, the fixed 256/224 preprocessing, a DINOv3 classifier, RampNet's ConvNeXt V2 converted to the native class) behind fine_tune_classifier.py --backbone and --learning-rate (docs/backbone-2026-11.md)
fine_tune_classifier.py --input-res The input-resolution study: train, evaluate and export at 448 or 518 px instead of 224, with the resize scaled so the field of view is unchanged; the default stays 224 (docs/resolution-2026-11.md)
export_onnx.py, explain.py ONNX export, int8 quantisation and benchmarks; saliency maps and the masked rating packet
analysis/backbone_comparison.py Issue #119: the read-only data view the backbone runs train on, and the report that applies the pre-registered rule (within-city paired Δ, the 0.92 gate under majority2, slices)
analysis/ The scripts behind every study in docs/ (analysis/README.md); their data stays outside the repo
Depth-Anything-V2/ Git submodule of upstream Depth-Anything-V2, pinned to the commit sidewalk-ai-api uses

Published models and datasets

Everything lives under the projectsidewalk organisation on Hugging Face. Each model repo holds the inference files, confidence_precision_map.json with its calibration report, metrics.json, training_run.json and a generated card. sidewalk-ai-api pins these revisions and serves its own copy of each map, checked by sha256 against the hub file at startup (sidewalk-ai-api#25).

label type model (revision of 2026-10-26) dataset
CurbRamp sidewalk-validator-ai-curbramp 6791a64 2025-08 upload ⚠️ a copy of the Crosswalk set
NoCurbRamp sidewalk-validator-ai-nocurbramp ca7167d 2025-08 upload
Obstacle sidewalk-validator-ai-obstacle 64b082c 2025-08 upload
SurfaceProblem sidewalk-validator-ai-surfaceproblem b5497b7 2025-08 upload
Crosswalk sidewalk-validator-ai-crosswalk b8498b8 2025-08 upload

Each model is Dinov2ForImageClassification with id2label = {0: correct, 1: incorrect} and ships its preprocessor_config.json. The dataset repos are still the 2025-08 uploads: the round-3 crops have not been published (they include private deployments, which the publisher strips, and the crops live on the cluster), so the datasets do not match the models until the dataset half of #7 is done.

Quick start

git clone --recurse-submodules https://github.com/ProjectSidewalk/sidewalk-validator-ai
conda env create -f environment.yml && conda activate sidewalk-validator-ai
wget https://huggingface.co/depth-anything/Depth-Anything-V2-Metric-VKITTI-Base/resolve/e96fd0c8cedf1825a55b9c61309f754982948df0/depth_anything_v2_metric_vkitti_vitb.pth

PANO_STORE=/path/to/Panoramas sbatch data_generation.slurm   # steps 1–5, all five label types
sbatch fine_tune.slurm                                        # step 6
sbatch get_stats.slurm                                        # steps 7 and 7b
python publish_to_hf.py --label_type CurbRamp --out ROOT      # step 8: stage only; --push for a dry run, --push --yes to upload

Panoramas are read from the lab's pano store, never downloaded. Job files are written for klone's gpu-l40s partition; the resume rules, outputs, smoke tests and the held-out-city recipe are in docs/running-on-hyak.md. The CPU tests run with pip install -r requirements.txt && pytest -q.

Status and open issues

The October 2026 audit (docs/audit-2026-10-14.md) found that the published metrics rested on a split that leaked across panoramas, a confidence map fitted under the wrong class prior, and a crop pipeline that differed between training and serving. The round-3 retrain addressed those: the split is by panorama (#3, open for the re-measurement items), training and serving share one geometry package and depth checkpoint (#5, closed), and the maps are reweighted to the deployment prior (#4, open until the prior itself is settled). What is still open:

  • The deployment prior the served maps are reweighted to comes from the asymmetric training rule and puts the incorrect share 10–15 points too high for three types. data_generation.py now records the prior under four vote rules and defaults to the ≥ 2-vote human majority; the maps are not refitted yet, and the Disagree hold-back stays (#56, docs/deployment-prior-2026-11.md).
  • Transfer to unseen deployments is not reliable (SurfaceProblem 0.71 AUC, the non-US deployment weakest), so AI votes in a new deployment need a per-deployment check that SidewalkWebpage does not have yet (#52, #33).
  • Datasets on Hugging Face are the 2025-08 uploads, with the CurbRamp set a copy of Crosswalk (#7); cards, DOIs and licences are #2.
  • Non-GSV imagery (Mapillary, Panoramax) is included in training with a per-provider pose and frame (#72, docs/decisions.md); serving is still GSV-only until sidewalk-ai-api applies the same pose and SidewalkWebpage lifts its GSV filters (#72 steps 3 and 4).
  • AI Disagree votes cast by the 2025-08 models hide labels on their own in production; the reversal and a masked expert re-label are in review (SidewalkWebpage#5793, #62, #66).
  • Experiments with a first run spelled out: re-typing (#13), more context (#14), leave-one-city-out runs (#15), temporal validation (#17), rating the saliency overlays (#19), the depth-source ablation (#21), region-specific models (#33), frontier-model baselines (#47) and merging the tagger pipeline into this repo (#26). Earlier ideas are in #1; the history purge of the old vendored tree stays opt-in (#11, docs/repo-hygiene.md).

Lineage and related work

Automatic validation of crowd labels is the easier half of the lab's Crowd+AI sidewalk work, and this repo is its third generation:

year work what it established
2014 Hara et al., Tohme, UIST'14 (doi) Crowd + CV curb-ramp detection with a workflow controller that routes to humans only when the model is likely wrong.
2019 Saha et al., Project Sidewalk, CHI'19 (doi) The platform and the label/validation data this repo trains on.
2019 Weld et al., ASSETS'19 (doi, code) First deep-learning auto-validation of Project Sidewalk labels: ResNet on depth-sized crops plus geo features, panorama-level splits, DC → Seattle/Newberg transfer.
2022 Duan et al., ASSETS'22 (doi, code) Validated vs unvalidated training data (helps curb ramps, not the rest) and leave-one-city-out transfer; the direct ancestor of this pipeline.
2022 Hosseini et al., CVPR-W AVA'22 (arXiv) The global-scale Crowd+AI agenda this work sits in.
2024 Liu, Wu et al., ASSETS'24 (doi, code) The sibling tagger models (33 condition tags) served by the same API.
2024 Li et al., LabelAId, CHI'24 (doi) Just-in-time AI feedback to labelers; the UX side of label quality.
2025 O'Meara et al., RampNet, ICCV'25 workshop (arXiv, code) The harder half: finding curb ramps in whole panoramas, deployed through sidewalk-auto-labeler.

Sibling repositories: sidewalk-ai-api (serves these models), sidewalk-tagger-ai (tag models), sidewalk-panorama-tools (the pano store and the shared crop geometry), SidewalkWebpage (platform, orchestration, dashboards). The org-wide map of AI repos is SidewalkWebpage/docs/ai-subsystems.md.

Citation

There is no paper for this repository yet. If you use the models, datasets or code, please cite Project Sidewalk and link this repo:

@inproceedings{saha2019projectsidewalk,
  author    = {Saha, Manaswi and Saugstad, Michael and Maddali, Hanuma Teja and Zeng, Aileen and Holland, Ryan and Bower, Steven and Dash, Aditya and Chen, Sage and Li, Anthony and Hara, Kotaro and Froehlich, Jon},
  title     = {Project Sidewalk: A Web-based Crowdsourcing Tool for Collecting Sidewalk Accessibility Data at Scale},
  booktitle = {Proceedings of the 2019 CHI Conference on Human Factors in Computing Systems},
  year      = {2019},
  doi       = {10.1145/3290605.3300292}
}
Project Sidewalk. sidewalk-validator-ai: training pipeline for AI validation of crowdsourced sidewalk
accessibility labels. https://github.com/ProjectSidewalk/sidewalk-validator-ai

License

The code in this repository is released under the MIT License. The Depth-Anything-V2/ submodule (upstream code) keeps its own Apache-2.0 license (see its LICENSE). Licenses for the released datasets and models are tracked separately in #2.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages