How xinyu-yi/transpose works
Main System Components
• Data Input & Configuration: This includes the raw sensor and dataset inputs (e.g., DIP-IMU, TotalCapture, AMASS) and configuration settings (via config.py). These inputs are later preprocessed.
• Data Preprocessing: The preprocess.py script (and parts of live_demo.py) prepare data from various sources for inference. This module handles normalization and transformation of raw IMU/sensor data.
• Core Inference Engine:
• The “articulate” package is central here, containing modules like armature.py, evaluator.py, model.py, and a “math” submodule (with angular, general, and spatial helper functions). These modules are likely responsible for constructing the human skeleton, performing pose estimation, and applying mathematical transformations.
• The net.py file possibly defines the neural network architecture (implemented with PyTorch) that processes sensor inputs and outputs the predicted pose and translation.
• The system also integrates the SMPL body model whose path is set in config.py.
• Evaluation & Examples:
• evaluate.py runs evaluation routines on the processed data.
• example.py provides a complete run-through using provided IMU sequences.
• Live Demo and Visualization:
• live_demo.py contains the live streaming demo (with socket communication for real-time visualization).
• example_server.py serves as the server side for Unity3D integration.
• Visualization is achieved via Open3D (for 3D rendering) and a Unity3D scene, using a dedicated Unity package.
• Utility & Support Scripts: These include utils.py (general utilities), and other helper scripts.
• Have a “Preprocessing Module” block (preprocess.py) that receives raw data, applies necessary normalizations/transformations, and outputs processed datasets, feeding into the inference engine.
• The “Mathematical and Articulation Modules” (articulate/ directory: armature, evaluator, model, math submodules) that handle kinematics, skeletal structure, and sensor fusion.
• The “Neural Network Module” (net.py and the weights loaded via config.py) operating within the PyTorch environment.
• From the “Pose Estimation Engine”, show two paths:
• One leading to “Evaluation and Testing” (evaluate.py and example.py, demonstrating offline testing and simulation).
• Another leading towards “Real-time Visualization” which splits into two sub-blocks:
• Rendering output using Open3D (e.g., within example.py and live_demo.py).
• Streaming pose data to Unity3D for interactive visualization (using example_server.py and a custom client in Unity3D).
Architectural Patterns & Technologies
• The code separation into distinct scripts reflects a modular design — each component (preprocessing, inference, evaluation, and visualization) is independent yet interlinked.
• Notice the explicit dependency on PyTorch for the deep learning model, and the use of external libraries like chumpy, vctoolkit, and open3d.
• The system uses a configuration-driven pattern via config.py, which centralizes paths and other settings.
• For real-time operations, sockets are used to communicate between the Python backend and Unity3D.