Two methods to track the waves in space time are currently implemented.
- Density Clustering
- SORT
SORT is orders of magnitude faster than 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-method
EitherDBSCAN
orOPTICS
.DBSCAN
is recommended. -
--eps
Mandatory parameter forDBSCAN
orOPTICS
. See here for details. -
--min-samples
Mandatory parameter forDBSCAN
orOPTICS
. See here for details. -
--njobs
Number of jobs to use. -
--chunk-size
Maximum 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
.
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-hits
Minimum number of hits for SORT. -
--iou-threshold
Intersection under union threshold. -
--max-age
Maximum age to keep a track alive. -
--njobs
Number of jobs to use. -
--from-ellipses
Track from ellipses.
Note: The input data must have at least the following entries: ic
, jc
, ir
, frame
.