Batch processing¶
geotrax batch is the primary entry point. It runs every stage in order for one video or for every video below a folder:
- Extract: detection, tracking and stabilization (guide).
- Georeference: registration against an orthophoto (guide), unless
--no-geo. - Visualize: annotated videos (guide).
- Plot: trajectory and distribution plots (guide).
Aggregate and export are not part of batch; run them afterwards on the finished tree.
Examples¶
# Full pipeline on one video, with lane IDs in the annotated video
# (master frames and segmentations are read from the orthophoto folder's sub-folders)
geotrax batch path/to/video.mp4 -orf path/to/orthophotos --show-lanes
# The same without master frames
geotrax batch path/to/video.mp4 -orf path/to/orthophotos --no-master
# Pixel coordinates only, with class names and confidences in the annotated video
geotrax batch data/U_video_cut.mp4 --no-geo --show-class-names --show-conf
# Preview what a directory run would do, without executing anything
geotrax batch path/to/PROCESSED/ --dry-run --verbose
# Recompute everything in a tree, without confirmation prompts
geotrax batch path/to/PROCESSED/ --overwrite --yes
# Use a preset and skip videos whose name contains 'test' or 'tmp'
geotrax batch path/to/videos/ -c lenient --exclude-patterns test tmp --no-geo
Re-runs and stage selection¶
Each stage first checks whether its output already exists and skips the video if it does, so an interrupted run resumes where it stopped. Tracks, transforms and georeferenced CSVs are written atomically (to a hidden temporary name, then renamed), so one that exists is always complete. Annotated videos are the exception: one stopped with q or Ctrl+C is kept as a partial video and counts as done, so render it again with --viz-only --overwrite. Pass --overwrite to recompute, and --yes to skip the confirmation.
To run or repeat a subset of the stages:
| Flag | Runs |
|---|---|
--no-geo |
everything except georeferencing |
--geo-only |
georeferencing only (needs the tracks from a previous run) |
--viz-only |
visualization only (needs the tracks from a previous run) |
--plot-only |
plotting only |
Georeferencing and visualization both need the tracks file from extraction. A video in which nothing was detected has none, but it is not a failure: its run metadata records zero vehicles, so later runs count its extraction as done (pass --overwrite to repeat it) and skip its other stages. A video that was never extracted, by contrast, fails --geo-only and --viz-only. A failure in one video does not stop the batch: the video is marked failed, its later stages are skipped, and the run continues.
Directory mode¶
Given a folder, batch collects every video below it. Two filters narrow the scan:
--folders-excludeskips folders by name, together with everything nested inside them. The configured output folder (defaultresults) is always excluded on top of this list, so the annotated videos of an earlier run are never picked up as input.--exclude-patternsskips videos whose filename contains any of the given substrings.
In directory mode --cut-frame-right is ignored (with a warning if you passed it), so every video is processed to its last frame.
For multi-drone projects, the recommended folder layout lets batch find the orthophotos, master frames and segmentations without any path flag: it walks up from each video to the PROCESSED folder and looks for a sibling ORTHOPHOTOS folder.
Exit status¶
| Code | Meaning |
|---|---|
0 |
every video succeeded (or was skipped as already done) |
1 |
at least one video failed; the failures are listed at the end |
130 |
interrupted with Ctrl+C or q in the preview window; the failures so far are listed |
A video in which nothing was detected counts as succeeded. --geo-only or --viz-only on a video that was never extracted counts as failed, since the requested stage cannot run.
--dry-run does not create a log file, so it is safe to run freely before a long job. All options are listed in the CLI reference.