Skip to content

Latest commit

 

History

History
75 lines (42 loc) · 2.83 KB

README.md

File metadata and controls

75 lines (42 loc) · 2.83 KB

Wave Tracking

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-method Either DBSCAN or OPTICS. DBSCAN is recommended.

  • --eps Mandatory parameter for DBSCAN or OPTICS. See here for details.

  • --min-samples Mandatory parameter for DBSCAN or OPTICS. 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.

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-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.