OpenTrace ML is an Apache-2.0 open-source library for experiments that connect computer-vision observations, traffic forecasts, GPS traces, and map data.
Update — September 12, 2026: the latest changes are merged into main. This is still pre-alpha work, not a new packaged release.
Repository · Contributor guide · Open issues
What changed
-
Experimental neural forecasting in Python.
NeuralTrafficForecasteruses a CPU-based scikit-learn MLP with lag and calendar features. It produces recursive point forecasts and is trained in batches. - Baselines and reproducible evaluation. Persistence and seasonal-naive models make it easier to test whether a more complex model helps. Rolling backtests validate chronology, regular spacing, and forecast timestamp alignment. Benchmark JSON records errors by forecast lead, convergence warnings, versions, and data provenance.
- Train a linear model in Python, run inference in Go. The portable data-only JSON format supports native Go single-step and recursive forecasts, with Python/Go conformance tests. Neural-model export is a separate open design task.
-
Contributor detection metrics are merged. Per-class detection results support normal Python mapping operations as well as
.as_dict().
These additions build on road-damage annotation parsing, model-agnostic detector adapters, detection-to-GPS interpolation, GeoJSON export, consent-gated GPX preparation, map-matcher contracts, and transparent route-signal scoring.
Try a small local experiment
From the latest main branch:
git clone https://github.com/vrajpatell/opentrace-ml.git
cd opentrace-ml
python -m venv .venv
source .venv/bin/activate
python -m pip install -e '.[dev]'
python examples/benchmark_traffic_models.py --synthetic-demo
python -m pytest -q
The synthetic benchmark needs no external dataset or routing service. It checks the workflow; it does not establish real-world accuracy.
For public-data experiments, the benchmark also accepts --csv /path/to/Metro_Interstate_Traffic_Volume.csv. For --uci, install the optional data dependency first with python -m pip install -e '.[data]'. See the neural forecasting guide for the exact evaluation setup.
What the public-data result does—and does not—show
On one documented September 2018 window from UCI's Metro Interstate Traffic Volume dataset, the neural model recorded MAE 470.01, compared with 543.00 for the 24-hour seasonal baseline. The seasonal baseline had the better MAPE, and all ten neural fits reached the iteration limit.
That is a reason to investigate further, not evidence that the neural model consistently wins. The next useful experiment is to evaluate predeclared windows across seasons and report all models and warnings.
External data keeps its own license. The repository does not bundle third-party datasets or pretrained detector weights; source and attribution details are in DATA_LICENSES.md.
Small projects you can build now
- Forecast comparison notebook: compare persistence, seasonal, online-linear, and neural forecasts, and plot errors by forecast lead.
- Road-observation map: use the original annotation and GPS fixtures to place observations in GeoJSON and inspect them in a map viewer.
- Python/Go inference example: train and export a linear model, then compare the Go predictions with Python.
- Detector evaluation report: calculate per-class metrics for your own legally usable annotations and predictions.
This is a library for building experiments. It does not yet ship a pretrained road-damage detector, hosted live service, complete routing engine, or automatic OSM editing workflow. Trace pseudonyms alone do not make location data anonymous.
Where contributors can help
- #20: Evaluate forecasting across public-data windows
- #21: Investigate online-learning and scaling behavior
- #22: Design portable neural-model export
- #3: Add a tiny offline OSM integration fixture
- #4: Build an optional MMDetection/RTMDet adapter
Reproductions, failing test cases, documentation improvements, and small pull requests are welcome. Pick an issue and describe a small proposed approach so we can coordinate.
Which experiment would be most useful to you: public-data forecast evaluation, Python/Go inference, or a map-matching example?
Disclosure: This announcement was drafted with AI assistance.
Top comments (0)