Git Product home page Git Product logo

geopard's Introduction

geopard

Matching of gpx segments with dynamic time warping.

Pre-processing and analysis of gpx tracks (activities) for comparison to an existing gpx track (gold standard, segment). Checked are the joint start and end points with a given tolerance to trim the activity. Both tracks are interpolated to allow for both curves to be compared with dynamic time warping. Dynamic time warping allows to assess whether the activity actually completed the gold standard segment, and what the shortest required time was (in case of multiple repetitions or many points of the activity within the allowed distance of start and end points).

Usage

  • Example GPX tracks are available at https://github.com/danielvogler/geopard_tests
  • Example files for construction of start/finish region in ./utils/
  • Example usage demonstrated in ./geopard_example
  • Example usage with circular start region around gold start/end points:
import geopard

### initialize
gp = geopard.Geopard()

### dtw matching of example segments/activities
response = gp.dtw_match(gold_name, activity_name)

### optional with:
### min_trkps - minimum number of trackpoints between start and finish
### radius - radius around start and finish of gold segment
### dtw_threshold - segment match quality
response = gp.dtw_match(gold_name, activity_name, min_trkps = 100, radius=15, dtw_threshold=0.3)

### GeopardResponse

# final time
response.time

# final dtw
response.dtw

# final start point
response.start_point

# final end point
response.end_point

# match flag
response.match_flag

# is_success and error
response.is_success
response.error
  • Example usage with start/finish regions:
import geopard

### initialize
gp = geopard.Geopard()

start_region = gp.create_polygon("./utils/example_start_region.csv")
finish_region = gp.create_polygon("./utils/example_finish_region.csv")

gold_name = './gpx_files/tds_sunnestube_segment.gpx'
activity_name = './gpx_files/tds_sunnestube_activity_25_25.gpx'

response = gp.dtw_match(gold_name, activity_name, start_region=start_region, finish_region=finish_region)

### GeopardResponse

# final time
response.time

# final dtw
response.dtw

# final start point
response.start_point

# final end point
response.end_point

# match flag
response.match_flag

# is_success and error
response.is_success
response.error

Dependencies

Install python dependencies with pip:

pip install -r requirements.txt

Example image Example of gold segment, total activity and activity cropped to gold segment length.

Example image Example of start and end points to crop gpx tracks and obtain pairs for dtw matching.

geopard's People

Contributors

danielvogler avatar kpricorn avatar geopard-py avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.