Skip to content

Code for THÖR-MAGNI Act: Actions for Human Motion Modeling in Robot-Shared Industrial Spaces.

License

Notifications You must be signed in to change notification settings

tmralmeida/thor-magni-actions

Repository files navigation

THÖR-MAGNI Act: Actions for Human Motion Modeling in Robot-Shared Industrial Spaces

Paper Dataset Dataset Tools



THÖR-MAGNI Act provides actions aligned with motion capture data and gazes from egocentric videos.

Project Organization

├── LICENSE
├── Makefile           <- Makefile with commands like `make data` or `make train`
├── README.md          <- The top-level README for developers using this project.
├── data
│   ├── external       <- Data from third party sources.
│   ├── interim        <- Intermediate data that has been transformed.
│   ├── processed      <- The final, canonical data sets for modeling.
│   └── raw            <- The original, immutable data dump.
│
├── docs               <- A default Sphinx project; see sphinx-doc.org for details
│
├── models             <- Trained and serialized models, model predictions, or model summaries
│
├── notebooks          <- Jupyter notebooks. Naming convention is a number (for ordering),
│                         the creator's initials, and a short `-` delimited description, e.g.
│                         `1.0-jqp-initial-data-exploration`.
│
├── references         <- Data dictionaries, manuals, and all other explanatory materials.
│
├── reports            <- Generated analysis as HTML, PDF, LaTeX, etc.
│   └── figures        <- Generated graphics and figures to be used in reporting
│
├── requirements.txt   <- The requirements file for reproducing the analysis environment, e.g.
│                         generated with `pip freeze > requirements.txt`
│
├── setup.py           <- makes project pip installable (pip install -e .) so src can be imported
├── src                <- Source code for use in this project.
│   ├── __init__.py    <- Makes src a Python module
│   │
│   ├── data           <- Scripts to download or generate data
│   │   └── make_dataset.py
│   │
│   ├── features       <- Scripts to turn raw data into features for modeling
│   │   └── build_features.py
│   │
│   ├── models         <- Scripts to train models and then use trained models to make
│   │   │                 predictions
│   │   ├── predict_model.py
│   │   └── train_model.py
│   │
│   └── visualization  <- Scripts to create exploratory and results oriented visualizations
│       └── visualize.py
│
└── tox.ini            <- tox file with settings for running tox; see tox.readthedocs.io

Project based on the cookiecutter data science project template. #cookiecutterdatascience

Install packages for thor-magni-actions

Install miniconda. Then, you can install all packages required by running:

conda env create -f environment.yml && conda activate thor-magni-actions && pip install -e .

Prepare THÖR-MAGNI dataset (via thor-magni-tools)

  1. Jump to running thor-magni-actions modeling section if you want to skip these preprocessing steps.
  2. Prepare thor-magni-tools.
  3. Change config file to:

in_path: PATH_TO_CSVs/Scenario_{ID}
out_path: PATH_TO/thor-magni-actions/data/external/thor_magni
preprocessing_type: 3D-best_marker 
max_nans_interpolate: 100 

options: 
    resampling_rule: 400ms 
    average_window: 800ms 

Change the config in_path and out_path settings accordingly. In this way, we obtain smoother and consistent trajectories.

  1. From thor-magni-tools, run for each scenario directory:
    python -m thor_magni_tools.run_preprocessing
    
  2. Check your data/external directory.
  3. To align actions and trajectory data, run for each preprocessed scenario directory:
    unzip data/processed/thor_magni/QTM_frames_actions.zip -d data/processed/thor_magni/ && python -m thor_magni_tools.run_actions_merging --actions_path data/processed/thor_magni/QTM_frames_actions.csv --files_dir outputs/data/thor_magni/Scenario_{ID}/ --out_path data/interim/thor_magni/
    
  4. To compute features, run:
    python -m thor_magni_actions.features.build_features data/interim/thor_magni data/interim/thor_magni
    
  5. To create a dataset of fixed-length tracklets, run:
    python -m thor_magni_actions.data.make_dataset thor_magni data/interim/thor_magni data/processed/thor_magni
    

Running thor-magni-actions modeling

To run the k-fold cross validation with the multi-task learning approach:

python -m thor_magni_actions.data_modeling.runners.k_fold_cv 5 thor_magni_actions/data_modeling/cfgs/mtl_tf.yaml

About

Code for THÖR-MAGNI Act: Actions for Human Motion Modeling in Robot-Shared Industrial Spaces.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published