Skip to content

Commit 60cf9fb

Browse files
committed
[PAPER] grammar check
1 parent 8fdbd68 commit 60cf9fb

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/paper/paper.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,23 @@ bibliography: paper.bib
3030
---
3131

3232
# Summary
33-
`SeqIKPy` is a Python package for inverse kinematics (IK) calculation in animal bodies with complex joint configurations. The name stands for Sequential Inverse Kinematics in Python, as our method computes joint angles sequentially by performing IK for each joint along a kinematic chain.
33+
`SeqIKPy` is a Python package for inverse kinematics (IK) calculations in animal bodies with complex joint configurations. The name stands for Sequential Inverse Kinematics in Python, as our method computes joint angles sequentially by performing IK for each joint along a kinematic chain.
3434

3535
Our framework contains:
3636

37-
* Pose alignment: map tracked key point locations in 3D onto an animal body template.
37+
* Pose alignment: map tracked keypoint locations in 3D onto an animal body template.
3838
* Inverse kinematics: calculate joint angles sequentially from 3D poses.
3939
* Visualization: plot and animate the results in 3D.
4040

41-
`SeqIKPy` is aimed at researchers studying detailed joint motion in animals with complex, multiple degrees-of-freedom body appendages. We provide examples for the fruit fly, *Drosophila melanogaster*. However, each module can easily be extended to be used with another model organism; the only requirements are the 3D kinematics of the target animal and its corresponding kinematic chain. Our package requires minimal Python knowledge, and extensive tutorials are available to novice users at [https://nely-epfl.github.io/sequential-inverse-kinematics](https://nely-epfl.github.io/sequential-inverse-kinematics).
41+
`SeqIKPy` is aimed at researchers studying detailed joint motion in animals with complex, multiple degrees of freedom body appendages. We provide examples for the fruit fly, *Drosophila melanogaster*. However, each module can easily be extended to be used with other model organisms; the only requirements are the 3D kinematics of the target animal and its corresponding kinematic chain. Our package requires minimal Python knowledge, and extensive tutorials are available to novice users at [https://nely-epfl.github.io/sequential-inverse-kinematics](https://nely-epfl.github.io/sequential-inverse-kinematics).
4242

4343
# Statement of need
4444

4545
Over the past decade, deep-learning–based computer vision algorithms have transformed behavioral analysis in laboratory animals [@pereira:2020]. More recently, deep-learning–based 3D pose estimation tools [@gunel:2019; @karashchuk:2021] and detailed biomechanical models [@lobato-rios:2022; @wang:2024; @vaxenburg:2024] have created a growing need for tools that translate 3D kinematics into joint-angle representations. These joint angles can then be replayed in physics-based simulations to estimate unmeasured physical quantities such as joint torques [@lobato-rios:2022].
4646

47-
Inverse kinematics (IK) is widely used in robotics, biomechanics, and character animation [@aristidou:2018]. In robotics, IK typically computes joint angles to achieve a desired end-effector position while respecting joint constraints of a robot. In contrast, biomechanical IK aims to track multiple body markers simultaneously, a process often referred to as multi-body kinematics optimization and well established in human biomechanics [@delp:2007; @begon:2018; @pagnon:2022; @werling:2023].
47+
Inverse kinematics (IK) is widely used in robotics, biomechanics, and character animation [@aristidou:2018]. In robotics, IK typically computes joint angles to achieve a desired end-effector position while respecting joint constraints of a robot. In contrast, biomechanical IK aims to track multiple body markers simultaneously, a process often referred to as multi-body kinematics optimization and well-established in human biomechanics [@delp:2007; @begon:2018; @pagnon:2022; @werling:2023].
4848

49-
In insect research, however, multi-body kinematics optimization remains relatively underdeveloped. Existing approaches lie at two extremes. Simple geometric methods compute joint angles from dot products between adjacent body segments [@lobato-rios:2022; @karashchuk:2021], often leading to cumulative errors due to the lack of iterative corrections. More advanced gradient-based optimization methods estimate joint angles in a biomechanical model of the fly [@vaxenburg:2024], using simulation-based Jacobians in physics-engines like MuJoCo [@todorov:2012]. Although these methods provide higher accuracy, they are often entangled with pose estimation and physics engines, leading to complex dependencies and heavy overhead. Here, we introduce `SeqIKPy` as a lightweight, stand-alone, and modular solution focused on inverse kinematics.
49+
In insect research, however, multi-body kinematics optimization remains relatively underdeveloped. Existing approaches lie at two extremes. Simple geometric methods compute joint angles from dot products between adjacent body segments [@lobato-rios:2022; @karashchuk:2021], often leading to cumulative errors due to the lack of iterative corrections. More advanced gradient-based optimization methods estimate joint angles in a biomechanical model of the fly [@vaxenburg:2024], using simulation-based Jacobians in physics engines like MuJoCo [@todorov:2012]. Although these methods provide higher accuracy, they are often entangled with pose estimation and physics engines, leading to complex dependencies and heavy overhead. Here, we introduce `SeqIKPy` as a lightweight, standalone, and modular solution focused on inverse kinematics.
5050

5151
`SeqIKPy` consists of two main stages: marker registration (aligning measured keypoints to a 3D body template) and inverse kinematics. The latter stage builds on the open-source IKPy library [@Manceron_IKPy] and applies it sequentially along the kinematic chain. The sequential nature of our method constrains the solution locally and mitigates ambiguities arising from joint redundancy. Using 3D visualizations, we show that SeqIKPy reliably reconstructs fly kinematics across a range of behaviors. Previous work has demonstrated that the joint angles computed with SeqIKPy accurately reproduce both walking [@wang:2024] and grooming [@ozdil:2024] behaviors in physics-based simulations. Although our examples mostly focus on the fly, we demonstrate that its modular design allows adaptation to other animals with articulated limbs, including a mouse forelimb.
5252

@@ -73,8 +73,8 @@ Next, the `KinematicChainSeq` class defines a pre-configured kinematic chain for
7373

7474
![Overview of the SeqIKPy pipeline. **(Left)** Pose estimation tools (e.g., DeepFly3D and Anipose) estimates 3D positions of body keypoints. **(Middle)** SeqIKPy aligns these points to a body template, performs sequential inverse kinematics using joint constraints to calculate joint angles. **(Right)** The computed joint angles can be used to replay measured motions in biomechanical models, such as NeuroMechFly.\label{fig:pipeline}](pipeline.png)
7575

76-
# Limitation and mitigation
77-
Like `IKPy`, `SeqIKPy` solves inverse kinematics through per-frame optimization. While this approach generally leads to more faithful fit between raw data and the inferred kinematics, a main disadvantage is that processing can be slow. For use cases requiring higher throughput but not requiring sequential fitting over the whole kinematic chain, we refer the user to the `ik` module [@aversiveplusplus_ik] from the Aversive++ project. Alternatively, inverse kinematics can be implemented using approaches that do not require explicit optimization loops for every frame. These include methods based on Extended Kalman Filters [e.g. @Bonnet2017; @Fohanno2010; @Ceglia2025], and methods based on deep neural networks [e.g. @Toquica2021; @Wang2021]. These methods can also implicitly solve for the angles of all degrees of freedom on each kinematic chain simultaneously, instead of running a sequential optimization. At the cost of losing explicit per-frame accuracy, these methods are much faster and, in many cases, can run in real-time.
76+
# Limitations and mitigation
77+
Like `IKPy`, `SeqIKPy` solves inverse kinematics through per-frame optimization. While this approach generally leads to a more faithful fit between raw data and the inferred kinematics, a main disadvantage is that processing can be slow. For use cases requiring higher throughput but not requiring sequential fitting over the whole kinematic chain, we refer the user to the `ik` module [@aversiveplusplus_ik] from the Aversive++ project. Alternatively, inverse kinematics can be implemented using approaches that do not require explicit optimization loops for every frame. These include methods based on Extended Kalman Filters [e.g. @Bonnet2017; @Fohanno2010; @Ceglia2025], and methods based on deep neural networks [e.g. @Toquica2021; @Wang2021]. These methods can also implicitly solve for the angles of all degrees of freedom on each kinematic chain simultaneously, instead of running a sequential optimization. At the cost of losing explicit per-frame accuracy, these methods are much faster and, in many cases, can run in real-time.
7878

7979
For use cases where sequential inverse kinematics is required, we have implemented parallel processing in `SeqIKPy` in order to improve the throughput. Parallelism is implemented over different kinematic chains and over time, with the size of each atomic task determined adaptively to balance the trade-off between load balancing and overhead. On a typical machine, the overall processing rate scales near-linearly up to the number of physical CPU cores (~90% efficiency) and, to a lesser extent, up to the number of logical threads (~80% efficiency). On an Intel Xeon Platinum 8360Y processor, this translates to ~2ms per frame with 36 processes.
8080

0 commit comments

Comments
 (0)