Wave Tracking
October 9, 2020 ยท View on GitHub
Two methods to track the waves in space time are currently implemented.
- Density Clustering
- SORT
SORT is orders of magnitude faster than clustering.
Tracking via spatio-temporal clustering
To cluster wave breaking events in time and space use cluster.py. This script can use the results of naive_wave_breaking_detector.py directly but this is not recommended. It is recommended that you narrow down the candidates for clustering using predict_from_naive_candidates.py first.
Example:
python cluster.py -i "active_wave_breaking_events.csv" -o "clusters.csv" --cluster method "DBSCAN" --eps 10 -min-samples 10
Arguments:
-
-i [--input]Input path with images -
-o [--output]Output file name (see below for explanation). -
--cluster-methodEitherDBSCANorOPTICS.DBSCANis recommended. -
--epsMandatory parameter forDBSCANorOPTICS. See here for details. -
--min-samplesMandatory parameter forDBSCANorOPTICS. See here for details. -
--njobsNumber of jobs to use. -
--chunk-sizeMaximum number of rows to process at a time. Default is 1000. Use lower values to avoid out-of-memory errors.
Note: The input data must have at least the following entries: ic, jc, ir, frame.
The output of this script is a comma-separated value (csv) file. It looks like exactly like the output of naive wave breaking detector with the addition of a column named wave_breaking_event.
Tracking using SORT
SORT can be used on the ellipses obtained with predict_from_naive_candidates.py or on the detections created using image segmentation (see Image Segmentation).
Example:
python track.py -i "detections.csv" -o "tracks.csv"
Arguments:
-
-i [--input]Input detections file in csv format. -
-o [--output]Output file in csv format. -
--min-hitsMinimum number of hits for SORT. -
--iou-thresholdIntersection under union threshold. -
--max-ageMaximum age to keep a track alive. -
--njobsNumber of jobs to use. -
--from-ellipsesTrack from ellipses.
Note: The input data must have at least the following entries: ic, jc, ir, frame.