Skip to content

I-24 MOTION

This page is for anyone who wants lane-level trajectories of a US freeway from the I-24 MOTION data with trajlab. It says what you can reliably do with the result, how to get there with one call, and where the limits are.

I-24 MOTION is a 4.2-mile section of Interstate 24 near Nashville, Tennessee, recorded by about 300 pole cameras (Gloudemans et al. 2023). The provider delivers the trajectories of both directions in road coordinates, cut into fragments: one piece of trajectory per camera view, at 25 Hz. trajlab reads a time window of a provider day file, corrects the lateral error of each camera, separates the ramp traffic from the main lanes and assigns the four main lanes. Joining the fragments of one vehicle again (stitching) is experimental.

Terms used on this page. WB and EB are the westbound and eastbound directions. A window is a time slice of one direction, usually 10 min, named by its start time (for example WB 09:10 is westbound 09:10-09:20). The development windows are the windows of 2022-11-22 on which the preparation was built and calibrated; the evaluation windows of later days were fixed in advance and run once. The median strip is the central reservation between the two directions; "median" alone means the statistic.

What the results support

In short: lane labels, lateral positions and flows are reliable; lane-change events need a check of your own; event analyses that need several vehicles over many seconds, such as gap acceptance, do not reach the minimum data quality.

Supported Not supported
Flows and flow balances at sections and ramps yes
Lateral positions and lane centers yes
Lane labels on the main carriageway yes
Counts and places of merges, and whether a merge lies in one track yes (WB Bell Road on-ramp: 81-90 % in one track with stitching, development windows)
Single-vehicle kinematics within a track, in short windows yes
Lane-change events with a check of your own
Gap acceptance with lead and lag, follower reaction, tactical states no: below the minimum by a factor of 4 to over 100

The numbers behind this table are in What I-24 supports, in detail below.

Obtaining the data

Request the data at i24motion.org/data. trajlab was developed on the release INCEPTION v1.0 (November 2022): one zip archive per day (e.g. 11-22-2022.zip, about 6 GB), holding a JSON array of about 18 GB with one document per fragment. trajlab reads it without unpacking; keep the archives in a folder of your own and give its path to read_i24motion_day (the example scripts read it from the environment variable TRAJLAB_I24_DIR). trajlab downloads nothing.

The data use agreement of I-24 MOTION allows academic and commercial use and the sharing of derived products under its terms, prohibits any attempt to re-identify individuals, and requires this citation in published work:

Gloudemans, D., Wang, Y., Ji, J., Zachár, G., Barbour, W., Hall, E., Cebelak, M., Smith, L., & Work, D. B. (2023). I-24 MOTION: An instrument for freeway traffic science. Transportation Research Part C: Emerging Technologies, 155, 104311. doi:10.1016/j.trc.2023.104311

The lateral tables and the stitching parameters shipped with trajlab are derived products of INCEPTION v1.0 (2022-11-22): aggregates per camera section and lane, no vehicle.

Workflow

Two calls read a window, and one call prepares it and runs the pipeline:

from trajlab.datasets import i24

# 1. one window of one direction (-1 = westbound, +1 = eastbound) from the day file; it is written to out_dir as
#    files of one time slice each, so it is read from the archive only once (about 5 min for a 6-GB archive)
folder = i24.read_i24motion_day(
    "I24MOTION/11-22-2022.zip", "2022-11-22 09:10", "2022-11-22 09:20", out_dir="windows/wb_0910", direction=-1
)
window = i24.read_i24motion_window(folder, -1)  # meters, vehicle center, fixed origin of the corridor

# 2. lateral correction, preparation, the pipeline with the preset "i24_motion", labels of the settling at the ends
result = i24.run_i24motion(window, "i24_motion")
tracks, events = result.tracks, result.events

"i24_motion" is the name of the preset. It holds the options of the runner under the key dataset:

dataset:
  stitching: none      # or: experimental
  table: reference     # or: estimate

A complete script is examples/i24/run_window.py; it ends with the data-quality gate on the result, a check of whether an event has every vehicle it needs, observed long enough.

What run_i24motion does

Each step is a public function you can also call on its own (API reference: Datasets, Experimental).

  1. Lateral table. The traffic state of the window decides which table of camera errors is used: congested if the duration-weighted median of the fragment speeds is below 40 km/h (estimate_i24motion_window_state). The shipped table of that state is read with read_i24motion_reference_table. With I24MotionOptions(table="estimate") the table is estimated on the window itself instead (estimate_i24motion_lateral_offsets).
  2. Preparation (run_i24motion_preparation). It removes whole fragments that lie on the other carriageway and single positions more than 1.5 lane widths outside the band of the main lanes. It then subtracts the lateral error of the camera (compute_i24motion_corrected_lateral), cuts the positions beyond the edge at the median strip, and finds duplicate fragments (removed only with remove_duplicates=True). The single tests are detect_i24motion_other_carriageway, detect_i24motion_off_band, detect_i24motion_median_side and detect_i24motion_duplicates.
  3. Stitching, only with stitching: experimental: stitch_i24motion and compute_i24motion_bridges, see Stitching.
  4. Main carriageway. detect_i24motion_off_mainline sets the ramps, auxiliary lanes and implausible fragments apart. The pipeline then runs with the preset i24_motion (four main lanes, lane assignment with the hidden Markov model, no perspective correction, no alignment, the pipeline's own stitching off) in time chunks of 2 min with an overlap of 30 s.
  5. After the run. compute_i24motion_edge_labels gives the first and last 2 s of every fragment of at least 6 s the lane of its interior and marks them in edge_settling (see settling). The positions off the main carriageway are appended without a lane (off_mainline), and detect_i24motion_off_coverage marks the road sections at the ends of the cameras' coverage.

Interchanges. The provider maps every detection to the coordinates of the main carriageway, so a ramp that curves away appears as a curve in (pos_lon, pos_lat). For the zones of the auxiliary lanes, trajlab offers a frame that follows the ramp instead: there a merging vehicle keeps one continuous coordinate from the ramp into lane 1. read_i24motion_interchange_zones lists the zones of a direction, compute_i24motion_excerpt cuts and prepares the fragments around one zone, and compute_i24motion_ramp_frame maps the ramp part into the ramp frame (with estimate_i24motion_ramp_line and project_i24motion_ramp). compute_i24motion_detector_count counts tracks at a virtual detector, a line across the road at a position you choose.

Why the preparation

Lateral error per camera. The lane centers form a saw-tooth along the road: within the section of one camera they drift by a few decimeters and step back where the next camera takes over (up to 3 m at one hand-over). All lanes move together, so it is an error of the camera's mapping to the road, not of the road. The pipeline's alignment smooths along the road and keeps most of this error: on 2022-11-22 eastbound, the 95th percentile of the lane-center deviation was 0.38 m with the alignment and 0.22 m without it. trajlab therefore corrects each camera on its own. estimate_i24motion_lateral_offsets finds the camera breaks (peaks of the density of fragment ends, and common steps of all four lane centers above 0.5 m) and models the error per camera section and lane as a surface of 10-m cells; compute_i24motion_corrected_lateral subtracts it.

Lane-center deviation along the road before and after the correction

Mean deviation of the four lane centers (20-m sections) from their running median over 500 m, westbound 2022-11-22 09:10-09:20 (development window), (a) as delivered by the provider, (b) after the correction with the shipped table. Dashed: camera breaks of the table. The direction of travel is from left to right.

Tables by traffic state. The error depends on the traffic state: in congestion the vehicles stand in other places of the camera image. trajlab ships three tables of 2022-11-22 (REFERENCE_TABLES): westbound congested (07:30-07:40), westbound free flow (09:10-09:20) and eastbound (07:30-07:40, free flow, also used for congested eastbound windows). They are valid for INCEPTION v1.0, November 2022. Applied to 2022-11-23, the cells moved by a median of 0.03-0.05 m (p90 0.09-0.16 m) and the lane-center deviation stayed at p95 0.16-0.27 m.

Other carriageway, band and median strip. Whole fragments of one direction lie on the other carriageway (2 % of the eastbound positions at 07:30); the lane geometry would put a lane on them. Other fragments start and end at lateral positions of 38-40 m next to the median strip, 0.5-1.0 lane widths beyond the band of the main lanes. The cut at the median strip removes them, so that the stitching does not start from them.

Settling at the fragment ends. The provider's lateral positions move about twice as fast in the first and last 1-2 s of a fragment as in its middle (median 0.30 against 0.15 m/s), an artifact of the camera entry and exit. This is the settling. A label change there is mostly not a lane change; edge_settling marks these samples.

What I-24 supports with trajlab, and what not

The lane labels were measured on the 2022-11-22 development windows (WB 07:30 congested, WB 09:10 free, EB 07:30 free) and evaluated once on 2022-11-23 with criteria fixed in advance. On 2022-11-23 the WB 07:30 window was not congested, so the evaluation of the lane labels has no congested window.

Lane labels on the main carriageway are reliable, with one target missed narrowly: four of the five criteria are met in all three windows. The fifth compares the rate of label changes near a camera break with the rate elsewhere; it lies just above its target in two windows (evaluation on 2022-11-23):

Criterion Target WB 07:30 WB 09:10 EB 07:30
lane-center deviation, p95 ≤ 0.3 m 0.19 m 0.15 m 0.21 m
steps > 0.3 m at a camera break 0 1 (0.47 m) 0 0
sections without four lanes, phantom lanes 0 0 0 0
flicker per vehicle-km ≤ 0.1 0.004 0.004 0.008
label changes at camera breaks against elsewhere, ratio of the rates (rate at breaks / elsewhere, per vehicle-km) ≤ 1.5 1.54 (0.97 / 0.63) 1.37 (0.76 / 0.56) 1.53 (1.13 / 0.74)

Each rate has its own exposure: the label changes within 30 m of a camera break per vehicle-km driven within 30 m of a break, and the other label changes per vehicle-km driven elsewhere. The criterion is their ratio, so the two rates do not add up to it. Over the whole window there are 0.76, 0.63 and 0.89 label changes per vehicle-km.

Four lanes are found everywhere, and the correction is stable across days (above). The step of 0.47 m at one camera break in WB 07:30 is a known remainder of the correction.

Lane-change events are less reliable. In the visual check of a stratified sample of label changes, 58-75 % were real lane changes. The rest are settling at the fragment ends and short fragments. Use lane-change events of I-24 only with a check of your own.

Event-level analyses need every involved vehicle observed over the whole event. The data-quality gate (trajlab.analysis.quality.gate) counts, among the events that can be analyzed at all, the share whose vehicles are observed long enough and without gaps. The minimum is 0.6, the level of NGSIM; the reference datasets with known good quality pass 62-100 %. On I-24 (2022-11-22 development windows, with and without the experimental stitching):

Analysis Raw fragments With stitching (development windows) Main failure
gap acceptance at on-ramps (lead and lag) 0-3 % at most 14 % (WB Bell Road on-ramp, congested) the track of a required vehicle ends inside the window (48-87 % of the usable events)
follower reaction 0-3 % at most 3 % track ends, vehicles appearing or vanishing
tactical states of merges (the positions of the vehicles around a merging vehicle) 0-3 % at most 12 % track ends, bridged positions
discretionary lane changes with target-lane neighbors 0-3 % at most 7 % track ends

The causes, in order (2022-11-22 development windows): the tracks of required vehicles end inside the window; vehicles vanish and appear inside camera sections (0-0.015 per vehicle-km on the reference datasets); too few tracks survive the camera breaks. A scene of 3-4 vehicles needs about 0.98 of them to survive each break, so that all are still observed one or two breaks later. Survival per camera break in the evaluation of 2022-11-29, with and without the experimental stitching, is in the next section.

Stitching (experimental)

The API of trajlab.experimental.i24_stitching may change, and its results are not validated like the rest of trajlab. It joins the fragments of a prepared window into vehicles with the cascade of trajlab.processing.stitching and the shipped parameter set, calibrated on 2022-11-22 (file i24_stitching_n2v3_k.json; the status page calls it N2v3_K).

In words: where two cameras see the same vehicle at the same time, it removes the known offset between the two cameras and joins the two pieces. Where there is a gap of up to 5 s between the end of one fragment (the tail) and the start of the next (the head), it accepts the pair only if speed, position and lateral position fit, with limits that depend on the traffic state. In free flow it predicts where the head should be from how the tail's neighbors moved. The vehicle class counts only as a cost, because neighboring cameras often label one vehicle differently. Links whose tail ends below 5 m/s are flagged (low_speed_link, detect_i24motion_low_speed_links): stitching in standing queues is not validated. The values of all limits are on the status page, with the methods tried, the variants and their measures, what did not help and the upper bound.

Time-space diagram of one lane, provider fragments and stitched vehicles

Lane 2 over 800 m and 120 s, westbound 2022-11-22 09:10 (development window): (a) the provider's fragments, (b) the vehicles of the shipped parameter set; crosses mark the joints.

Evaluation (2022-11-29, criteria fixed in advance). The shipped parameter set (parameter file sha256 d44db645…; values identical to the file used in the evaluation, verified by bit-identical outputs) was evaluated once on 2022-11-29, with code, parameters, windows and criteria fixed before any data of that day were read. Windows: WB 06:40-06:50 (the first 10-min westbound window from 06:30 whose duration-weighted median fragment speed was below 40 km/h, chosen from the document headers only; congested), WB 09:10-09:20 and EB 07:30-07:40 (free flow).

The criteria were:

  • (a) links found: two kinds of test cases, each per traffic state of the tail. The first kind are hand-over pairs, two fragments of one camera hand-over that clearly belong to one vehicle, cut to gaps of 0.5-5 s. The second kind are artificial gaps of 0.5-5 s cut into other fragments. Of the links made, at least 0.95 must be correct (precision), and at least 0.70 of the cuts must be re-linked (recall). Congested hand-over pairs count only from a tail speed of 5 m/s. A state with fewer than 30 cut fragments ("cuts") is reported, not scored.
  • (b) a visual check of 30 links per window: no link across lanes without matching lateral motion, at most 2 of 30 wrong.
  • (c) less settling: the share of samples in the settling at the fragment ends (edge_settling) at most half that of the unstitched run of the same window.

Result: the shipped parameter set does not meet the fixed criteria in full.

  • (a) fails for the hand-over part in congestion: WB 06:40, precision 0.928 < 0.95 at recall 0.843 (1 079 cuts). It passes in every other scored part and state.
  • (b) met on WB 06:40 and WB 09:10 (2 wrong each), not met on EB 07:30 (3 wrong, limit 2); no link across lanes without lateral motion; 8, 8 and 16 of 30 could not be judged from the panels (gap longer than the plot window, or overlap offsets that are probably camera timing).
  • (c) fails in all three windows: edge_settling falls to 0.57-0.65 of the unstitched run, not to ≤ 0.5.

Precision / recall per window, part and state (the cuts of two random seeds pooled; their number in brackets):

Window Part Congested Transition Free
WB 06:40 hand-over 0.928 / 0.843 (1 079), fail 0.970 / 0.878 (2 406) 0.951 / 0.826 (820)
WB 06:40 artificial gaps 0.979 / 0.925 (2 772) 0.980 / 0.887 (1 459) 0.972 / 0.845 (621)
WB 09:10 hand-over 0.970 / 0.841 (189) 0.962 / 0.883 (1 264) 0.970 / 0.882 (3 986)
WB 09:10 artificial gaps 0.978 / 0.890 (1 007) 0.982 / 0.906 (1 243) 0.973 / 0.879 (3 299)
EB 07:30 hand-over reported, < 30 cuts (0) reported, < 30 cuts (1) 0.974 / 0.828 (3 166)
EB 07:30 artificial gaps reported, < 30 cuts (4) reported, < 30 cuts (15) 0.951 / 0.849 (3 147)

Congested hand-over pairs with a tail speed below 5 m/s, reported separately: precision / recall 0.380 / 0.258 (WB 06:40, 547 cuts) and 0.444 / 0.291 (WB 09:10, 110 cuts). The flag low_speed_link (tail below 5 m/s) marks 28.4 % of the links in WB 06:40 (3 326 of 11 693), 5.4 % in WB 09:10 (460 of 8 553) and none in EB 07:30.

The hand-over test cases are optimistic: they are the pairs that clearly belong together, so they are the easy hand-overs. Their recall of 0.83-0.88 lies far above the share of tracks that really survive a camera break (0.40 in congestion up to 0.72 in free flow, below).

Survival per camera break is the share of the tracks seen 100 m before a break that reach 100 m after it. On 2022-11-29, unstitched → stitched, by the traffic state of the track before the break (pooled over all breaks; this split was computed after the evaluation from its outputs and is reported only):

Window Congested Transition Free
WB 06:40 0.18 → 0.40 0.21 → 0.51 0.35 → 0.60
WB 09:10 0.31 → 0.51 0.36 → 0.61 0.45 → 0.72
EB 07:30 too few tracks too few tracks 0.44 → 0.68

Median over the breaks of a window: WB 06:40 0.23 → 0.53, WB 09:10 0.51 → 0.72, EB 07:30 0.52 → 0.70. Even with stitching, 30-50 % of the tracks break at a typical camera break, against the 0.98 a scene of a few vehicles needs.

Studied and left out: a lane rule as an additional filter, and a joint assignment of the ends beyond 5 s. Both are described with their measures on the status page.

Open problems

These are open, and contributions are welcome; the status page gives the measures of the stitching experiment behind the first two.

  • Ambiguity is the limit of the stitching. Beyond 5 s many fragment ends have several plausible partners, and none of the assignments tried told them apart reliably.
  • Tracks that begin or end inside camera sections, not only at the camera breaks. In congestion many of them have a counterpart a few seconds and meters away: the same vehicle, lost and found again.
  • Settling at the fragment ends. 23-29 % of the main-carriageway samples lie in the first or last 2 s of a fragment (evaluation of 2022-11-23, unstitched).
  • Class and dimension differences between cameras: neighboring cameras measure one vehicle with different lengths and classes.
  • The correction depends on the traffic state. One table per state works on the days tested; a model of the error as a function of the state (or of the position in the camera image) would replace the choice of a table.
  • The start of a lane change on the auxiliary lane. From the lateral start to the line crossing, merges take a median of 4.2-4.4 s on I-24 against 2.3-2.5 s on exiD (2022-11-22 development windows): the start detector probably fires early on the noisy lateral position of the auxiliary lane.
  • Standing queues are not validated: the hand-over test cases count congested pairs only from 5 m/s.

Known issues

Kept in this release so that the outputs equal those of the evaluated version; a fix is planned for the next patch release:

  • run_i24motion can repeat an (id, datum): the positions off the main carriageway are rounded onto the 0.1-s grid and can meet a pipeline row of the same fragment (ramp vehicles at the edge of the band).
  • compute_i24motion_edge_labels gives a sample with lane -1 (unassigned) at a fragment end the lane of the interior.
  • read_i24motion_table returns columns such as lon, which should be float, as int64 when all their values are whole numbers; the values themselves are exact.

Development windows and figures

All values on this page that are not marked otherwise come from INCEPTION v1.0, 2022-11-22 (development) and 2022-11-23 (evaluation of the lane labels). The figures show 2022-11-22 and are drawn by docs/scripts/make_i24_figures.py from a window of your own; they are derived products under the data use agreement of I-24 MOTION.