Skip to content

Advanced Python toolkit for motion capture data: C3D file interpretation, Cardan-to-Quaternion conversion, and machine learning dataset generation.

License

Notifications You must be signed in to change notification settings

SmartMaatt/c3d-api

Repository files navigation

c3d api

IntroductionComponentsInstallationLicense

Introduction

The c3d-api repository is dedicated to motion capture data processing, particularly focused on .c3d file interpretation, conversion of data formats, and preparation of datasets for machine learning applications. It features three main Python-based CLI applications, each addressing a specific aspect of motion capture data manipulation.

Components

1. C3D File Interpreter

The C3D File Interpreter is a key component designed to extract and process data from .c3d files used in motion capture systems. This tool focuses on:

  • Data Extraction: Parsing the three segments (header, parameters, and data) of .c3d files to access motion capture data.
  • Selective Data Export: Enabling users to choose specific data sections (markers, virtual markers, modeled markers, angles, forces, moments, and power) for export.
  • CSV Output: Converting and saving the selected data to .csv format for ease of use in applications like Microsoft Excel.
  • Specialized for Joint Angles: Primarily used for exporting joint angles as Cardan angles, facilitating detailed motion analysis.

2. Cardan Angles to Quaternions Converter

This application bridges the gap between traditional angle representations and modern quaternion-based methods used in advanced motion analysis and machine learning:

  • Cardan to Quaternion Conversion: Transforms Cardan angles from .csv files into quaternion sequences, a more robust representation for 3D rotations.
  • Utilization of Scipy Library: Leverages Scipy's scientific computing capabilities for accurate and efficient conversion processes.
  • Structured Output: Produces a .csv file mirroring the structure of the input but with quaternion data, ensuring compatibility with subsequent processing stages.

3. Training Dataset Generator

A crucial tool for preparing machine learning datasets from motion capture data:

  • Dataset Preparation: Generates training and validation datasets tailored for use in recurrent neural network models.
  • Flexible Data Handling: Capable of processing output from both the C3D interpreter and the quaternion converter.
  • Customizable Sequence Length: Allows users to define the sequence length n, essential for configuring datasets for specific machine learning models.
  • Output Files: Creates two .csv files – one for training and another for validation, formatted for direct use in neural network training environments.

Installation

  1. Create a Conda Environment:

    conda env create -f environment.yaml
    
  2. Setup the Development Environment: Open the "app" folder in Visual Studio Code.

  3. Activate the Python Interpreter: Use the command palette in VSCode (Ctrl + Shift + P) and select Python: Select Interpreter. Choose the c3d_api environment.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Authors

© 2023 Devision303. All rights reserved.

WebsiteFacebook

Igor Budzyński (Multiprice): GitHubLinkedIn

Krzysztof Kocot (Pocot997): GitHubLinkedIn

Mateusz Płonka (SmartMatt): PortfolioGitHubLinkedInYouTubeTikTok

About

Advanced Python toolkit for motion capture data: C3D file interpretation, Cardan-to-Quaternion conversion, and machine learning dataset generation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages