Skip to content

extraction

Extraction stage.

Stabilization, short-track removal, and vehicle dimension estimation for 'geotrax extract'. The extract stage also consumes the 'ultralytics:' (YOLO detection) and 'tracker:' sections below; object-detection CUDA/GPU is set there via ultralytics -> device (default: auto, uses CUDA/GPU when available).

Generated from geotrax/cfg/default.yaml; every row below is a key of that file with its shipped default and its inline comment.

Key Default CLI Description
model hf://rfonod/geo-trax/geotrax_hbb_yolov8s_1920_v1.pt --model Detection model: a local file path OR an 'hf://<org>/<repo>/<path/to/file>.pt' reference (auto-downloaded & cached); default = the bundled geo-trax model
class_rename null --class-names class-id → label override, e.g. {0: vehicle, 1: bus, 2: truck, 3: bike}; or a .yaml/.json path; null = model's own names
stabilize true Stabilize extracted bounding boxes; appends 4 columns (x_stab, y_stab, w_stab, h_stab) to results/video.txt
save_stab true Save per-frame stabilization homographies to results/video_vid_transf.txt
min_track_length 3 Discard tracks shorter than this many frames; [1, inf)
interpolate false --interpolate, --no-interpolate Fill per-track frame gaps with linear interpolation; adds is_interpolated column to output
class_conf null --set class_conf='{2: 0.4}' Per-class confidence thresholds, e.g. {1: 0.15, 2: 0.4}; unlisted classes keep ultralytics -> conf; null = one global threshold

extraction.sahi

Slicing Aided Hyper Inference: sliced detection for small objects (requires: python -m pip install 'geo-trax[sahi]'); ~10x the per-frame detection cost on 4K with the defaults below (3 x 3 slices plus a full-frame pass)

Key Default CLI Description
enable false --sahi, --no-sahi Run detection on overlapping frame slices and merge the results
slice_height 1080 Slice height [px]; default = half of a 4K frame height; [1, inf)
slice_width 1920 Slice width [px]; default = half of a 4K frame width; [1, inf)
overlap_height_ratio 0.2 Vertical overlap between adjacent slices, as a fraction of slice height; [0.0, 1.0)
overlap_width_ratio 0.2 Horizontal overlap between adjacent slices, as a fraction of slice width; [0.0, 1.0)
perform_standard_pred true Also run one full-frame prediction and merge it with the sliced detections (catches large objects)
postprocess_type GREEDYNMM Strategy for merging overlapping slice detections; choices: [GREEDYNMM, NMM, NMS]
postprocess_match_metric IOS Overlap metric used by the merge step; choices: [IOS, IOU]
postprocess_match_threshold 0.5 Overlap threshold above which two detections are merged; [0.0, 1.0]
class_agnostic true Merge overlapping detections across classes (mirrors ultralytics -> agnostic_nms)

extraction.dimension_estimation

Key Default CLI Description
gsd 0.02725 Ground sample distance [m/px]; tuned for DJI Mavic 3 at 140–150 m altitude, 4K resolution
eps 4 Visibility margin [px]; bounding boxes closer than this to any frame edge are excluded; [0, inf)
r0 1.25 Minimum vehicle displacement [m] required before computing travel azimuth; (0, inf)
theta_bar 15 Maximum azimuth deviation [deg] from cardinal directions to classify a pass as parallel; [0, 90]

extraction.dimension_estimation.tau_c

Per-class minimum length/width ratio used to reject stationary vehicles as non-elongated

Key Default CLI Description
0 1.83 Car (includes vans, SUVs)
1 2.85 Bus
2 1.70 Truck
3 1.80 Motorcycle
-1 1.70 Unknown / unassigned class