Package: gaitmap-datasets
gaitmap-datasetsHelper to access to open-source gait datasets compatible with the MaD-Lab gaitanalysis library gaitmap.The aim of this package is to ensure that all datasets can be loaded in a similar fashion and all data (and annotations)
are in the same format (i.e. the same sensor orientations, units, etc.).
This should allow to easily run the same algorithm across multiple datasets.WarningWhile this makes it easier to work with the datasets, the coordinate system and other data information
provided with the dataset might not match the format you get when using this library!All datasets APIs are built using thetpcp.Datasetinterface.
For available datasets see the table below.UsageInstall the package from Pippipinstallgaitmap-datasetsThen download/obtain the dataset that you are planning to use (see below).
The best way to get started is to then check the example for the respective dataset on thedocumentation page.DatasetsBelow is a list of all available datasets with links to all information.
Make sure you cite the respective papers if you use the data for your research.
Recommended citations can be found in the respective dataset documentation (info link) and/or in the docstrings of the
individual dataset classes.MaD-Lab DatasetDatasetInfo LinkDownloadEgaitSegmentationValidation2014https://www.mad.tf.fau.de/research/datasets/#collapse_18Email to data owner (see info link)EgaitParameterValidation2013https://www.mad.tf.fau.de/research/datasets/#collapse_18Email to data owner (see info link)StairAmbulationHealthy2021https://osf.io/sgbw7/https://osf.io/download/5ueq6/SensorPositionDataset2019https://zenodo.org/record/5747173https://zenodo.org/record/5747173EgaitAdidas2014TBDTBDKluge2017https://www.mad.tf.fau.de/research/datasets/#collapse_13https://osf.io/cfb7e/External DatasetsDatasetInfo LinkDownloadPyShoe2019https://github.com/utiasSTARS/pyshoe/https://ieee-dataport.org/open-access/university-toronto-foot-mounted-inertial-navigation-dataset(or bash script in github repo)Working with datasetsEach dataset is represented by a class.
To load the dataset, the path to the dataset folder needs to be provided.
There are multiple ways to do this:You can provide the path directly in the constructor of the dataset class.fromgaitmap_datasetsimportEgaitSegmentationValidation2014dataset=EgaitSegmentationValidation2014("/path/to/dataset")Alternatively, you can avoid hard-coding path in one location by creating a json config file:# Run the following once, to create the config filefromgaitmap_datasetsimportcreate_config_templatecreate_config_template("/path/to/config.json")Then open the config file and add the path to the dataset folders you have downloaded.
You can just leave the values asnullif you don’t need a dataset.// file: /path/to/config.json{"datasets":{"egait_parameter_validation_2013":null,"egait_segmentation_validation_2014":"/path/to/egait_segmentation_validation_2014/dataset","pyshoe_2019":null,"sensor_position_comparison_2019":null,"stair_ambulation_healthy_2021":null}}Then you can set the global config for gaitmap-datsets to point to the config file:fromgaitmap_datasetsimportEgaitSegmentationValidation2014,set_configset_config("/path/to/config.json")# Now you can load the dataset without providing the pathdataset=EgaitSegmentationValidation2014()Dev setupFirst clone the repo and install the dependencies usingpoetry(note this project only supports poetry >=1.2).gitclonehttps://github.com/mad-lab-fau/gaitmap-datasets.gitcdgaitmap-datasetspoetryinstallDownloading and linking datasetsThe datasets are not included in the package, and you need to download them manually (see above).
Store the datasets you need in whatever folder you like.Then runpoetry run poe create_dev_config.
This should create a.datasets.dev.jsonfile in the root of the repo.
Modify this file to point to the folders of the respective datasets.With that setup, all tests and examples should work without any modification to the code.TestingThe/testsdirectory contains a set of tests to check the functionality of the library.
However, most tests rely on the existence of the respective datasets in certain folders outside the library.
Therefore, the tests can only be run locally and not on the CI server.To run them locally, make sure you completed the dataset setup (see above) then runpoe test.Documentation (build instructions)As the docs need the datasets to be available, we can not build them automatically on RTD.
Instead, we host the docs via github pages.
The HTML source can be found in thegh-pagesbranch of this repo.To make the deployment as easy as possible, we “mounted” thegh-pagesbranch as a submodule in thedocs/_build/htmlfolder.
Hence, before you attempt to build the docs, you need to initialize the submodule.gitsubmoduleupdate--init--recursiveAfter that you can runpoe docsto build the docs and thenpoe upload_docsto push the changes to the gh-pages
branch.
We will always just update a single commit on the gh-pages branch to keep the effective file size small.WarningDon’t delete thedocs/_buildfolder manually or by running the sphinx make file!
This will delete the submodule and might cause issues.
Thepoetask is configured to clean all relevant files in thedocs/_buildfolder before each run.After an update of the documentation, you will see that you also need to make a commit in the main repo, as the commit
hash of the docs submodule has changed.To make sure you don’t forget to update the docs, thepoe prepare_releasetask will also build and upload the docs
automatically.