You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all thank A LOT for this great collections of algorithms and the super neat API and documentation that come with it. It has proven very useful to me to test a bunch of AHRS filters on my data.
I've been experimenting a bit with numba's JIT classes, which allow to compile parts of the code with only a few changes, and it looks like it can greatly improve computation time for some algorithms (E.G. -90% for EKF on a MARG time series with 100k samples).
@Mayitzin made it pretty clear that the goal of the package is not efficiency but since I needed to run the pipelines on several files and the computation time got a bit long, I converted a few algorithms (Mahony, Madgwick, EKF) to JIT classes in my fork of the repository. A small benchmark of the computation times is available below for time series with 100k samples for IMU data or also with 3-axis magnetometers (MIMU):
Pure Python (IMU / MIMU)
NumbaClass (IMU / MIMU)
Δt (IMU / MIMU)
Overhead
Madgwick
8.93s / 15.31s
3.33s / 4.39s
-62% / -71%
9.17s
Mahony
14.91s / 24.08s
5.38s / 4.90s
-64% / -80%
21.34s
EKF
73.26s / 134.95s
11.91s / 11.72s
-83% / -91%
32.33s
I don't intend to open a PR since this conversion to jit classes doesn't really fit the spirit of the package (it adds an overhead due to the compilation and also a dependency) but I just wanted to share this here in case some people have similar needs as me and want to try out the numba-compiled version of the code.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi !
First of all thank A LOT for this great collections of algorithms and the super neat API and documentation that come with it. It has proven very useful to me to test a bunch of AHRS filters on my data.
I've been experimenting a bit with numba's JIT classes, which allow to compile parts of the code with only a few changes, and it looks like it can greatly improve computation time for some algorithms (E.G. -90% for EKF on a MARG time series with 100k samples).
@Mayitzin made it pretty clear that the goal of the package is not efficiency but since I needed to run the pipelines on several files and the computation time got a bit long, I converted a few algorithms (Mahony, Madgwick, EKF) to JIT classes in my fork of the repository. A small benchmark of the computation times is available below for time series with 100k samples for IMU data or also with 3-axis magnetometers (MIMU):
I don't intend to open a PR since this conversion to jit classes doesn't really fit the spirit of the package (it adds an overhead due to the compilation and also a dependency) but I just wanted to share this here in case some people have similar needs as me and want to try out the numba-compiled version of the code.
Once again thanks a lot for the great work !
Cheers
rfayat
Beta Was this translation helpful? Give feedback.
All reactions