Optimized GRU module with global context in visual odometry
Аuthors
Lomonosov Moscow State University, 1, Leninskie Gory, Moscow, 119991, Russia
e-mail: korytkinpg@my.msu.ru
Abstract
The application of recurrent modules in neural network architectures remains essential for addressing tasks involving time-varying datasets, as they are key to achieving optimal accuracy. However, when such modules are applied to computer vision tasks for unmanned aerial vehicles (UAVs) and robotic systems, the memory requirements often exceed available resources because image data necessitates a larger number of weights and greater computational resources. Consequently, optimizing these modules for real-time computer vision applications remains a critical challenge. This work explores the optimization of a convolutional variant of the Gated Recurrent Unit (GRU) - incorporating global context and a hard sigmoid activation function - to reduce both the number of parameters and computational resource consumption, specifically within the context of visual odometry and the DROID-SLAM architecture. Furthermore, we evaluate the performance gains (in terms of execution speed) achieved by using a hard sigmoid instead of a sigmoid across various hardware platforms, including Ryzen 5500U and Ryzen 5950X processors, Google Colab, and GPUs such as the Nvidia RTX 5070 Ti and Nvidia Tesla T4. We also analyze memory consumption, comparing the original module against the modified version. The resulting architecture, featuring the optimized GRU, was trained for 250000 steps on the TartanAir dataset, which consists of synthetic imagery simulating data from cameras mounted on small UAVs and robotic systems. Due to the reduction in memory usage, it became possible to perform training on a GPU with 16 GB of VRAM, rather than the 24 GB otherwise required. The platform used for training and testing consisted of an Nvidia RTX 5070 Ti and a Ryzen 5950X, paired with 64 GB of RAM running at 2667 MT/s. Evaluation was conducted using the EuRoC and TUM datasets, which contain real-world imagery captured by cameras mounted on small unmanned aerial vehicles (UAVs). As a result of the optimization efforts, execution time on the Nvidia RTX 5070 Ti was reduced by up to 20%. The total number of parameters in the DROID-SLAM architecture decreased by 27% - from an initial 4002565 to 2937093. The number of parameters in the resulting Gated Recurrent Unit (GRU) module was reduced by approximately 66% compared to the original GRU in DROID-SLAM, dropping from 1614720 to 549248.
Keywords:
visual odometry; neural networks; GRU; parameter number optimization; DROID-SLAMReferences
- Doroshev A.S., Shelomanov D.A. Methodology for selecting hyperparameters of a neural network model in optical navigation tasks. Trudy MAI. 2025. No. 142. (In Russ.). URL: https://trudymai.ru/eng/published.php?ID=185106
- The $7 trillion data center build-out: How industrials can capture their share // https://www.mckinsey.com/industries/technology-media-and-telecommunications/our-insights/the-7-trill... (дата обращения 24.05.2026)
- Global RAM shortage appears set to continue through 2027 // https://www.computerworld.com/article/4161043/the-memory-shortage-appears-set-to-continue-through-20... (дата обращения 24.05.2026)
- Data centers will consume 70 percent of memory chips made in 2026 - supply shortfall will cause the chip shortage to spread to other segments // https://www.tomshardware.com/pc-components/ram/data-centers-will-consume-70-percent-of-memory-chips-... (дата обращения 30.05.2026)
- Korytkin P.G. Applying deep learning networks in visual odometry problems // Trudy MAI. 2025. No. 145. (In Russ.). URL: https://trudymai.ru/published.php?ID=186898
- Sen Wang, Ronald Clark, Hongkai Wen, Niki Trigoni // DeepVO: Towards End-to-End Visual Odometry with Deep Recurrent Convolutional Neural Networks. 2017 IEEE International Conference on Robotics and Automation (ICRA), IEEE, 2017, pp. 2043–50. https://doi.org/10.1109/icra.2017.7989236
- Olivier Brochu Dufour and Abolfazl Mohebbi and Sofiane Achiche, An Attention-Based Deep Learning Architecture for Real-Time Monocular Visual Odometry: Applications to GPS-free Drone Navigation, 2024 https://arxiv.org/abs/2404.17745
- Teed, Zachary and Deng, Jia, “DROID-SLAM: Deep Visual SLAM for Monocular, Stereo, and RGB-D Cameras”, Advances in neural information processing systems, 2021.
- Tabassum, T.E.; Xu, Z.; Petrunin, I.; Rana, Z.A. Integrating GRU with a Kalman Filter to Enhance Visual Inertial Odometry Performance in Complex Environments. Aerospace 2023, 10, 923. https://doi.org/10.3390/aerospace10110923
- J. C. Heck and F. M. Salem, "Simplified minimal gated unit variations for recurrent neural networks," 2017 IEEE 60th International Midwest Symposium on Circuits and Systems (MWSCAS), Boston, MA, USA, 2017, pp. 1593-1596, doi: 10.1109/MWSCAS.2017.8053242.
- Moyang Li, Zihan Zhu, Marc Pollefeys, Daniel Barath // DROID-SLAM in the Wild. 2026 https://arxiv.org/abs/2603.19076
- Y. Huang, L. Ji, J. Sun, X. Jiang and H. Liu, "CUEMP: Correspondence Uncertainty Estimation With Motion Priors for Dense Visual Odometry," in IEEE Robotics and Automation Letters, vol. 11, no. 4, pp. 4497-4504, April 2026, doi: 10.1109/LRA.2026.3666386.
- Ziming Liu, Yixuan Wang, Sachin Vaidya, Fabian Ruehle, James Halverson, Marin Soljačić, Thomas Y. Hou, Max Tegmark // KAN: Kolmogorov-Arnold Networks, 2024 https://arxiv.org/abs/2404.19756
- Yesmine Abdennadher, Eleonora Cicciarella, Michele Rossi // Convolutional Spiking-based GRU Cell for Spatio-temporal Data, 2025 IEEE 35th International Workshop on Machine Learning for Signal Processing (MLSP), 2025 http://dx.doi.org/10.1109/MLSP62443.2025.11204318
- Albukhari, I.; El-Sayed, A.; Alshibli, M. MINI-DROID-SLAM: Improving Monocular Visual SLAM Using MINI-GRU RNN Network. Sensors 2025, 25, 5448. https://doi.org/10.3390/s25175448
- Mateos-Ramirez, P.; Gomez-Avila, J.; Villaseñor, C.; Arana-Daniel, N. Visual Odometry in GPS-Denied Zones for Fixed-Wing Unmanned Aerial Vehicle with Reduced Accumulative Error Based on Satellite Imagery. Appl. Sci. 2024, 14, 7420. https://doi.org/10.3390/app14167420
- Burri, Michael and Nikolic, Janosch and Gohl, Pascal and Schneider, Thomas and Rehder, Joern and Omari, Sammy and Achtelik, Markus W and Siegwart, Roland // The EuRoC micro aerial vehicle datasets, 2016 https://doi.org/10.1177/0278364915620033
- Grupp, Michael. evo: Python package for the evaluation of odometry and SLAM., 2017 https://github.com/MichaelGrupp/evo
- J. Sturm and N. Engelhard and F. Endres and W. Burgard and D. Cremers // A Benchmark for the Evaluation of RGB-D SLAM Systems, Proc. of the International Conference on Intelligent Robot Systems (IROS) 2012
- Chigozie Nwankpa, Winifred Ijomah, Anthony Gachagan, Stephen Marshall // Activation Functions: Comparison of trends in Practice and Research for Deep Learning 2018, https://arxiv.org/abs/1811.03378
- Reddy, Pavan & Gujral, Aditya. (2025). Improving Neural Network Efficiency Using Piecewise Linear Approximation of Activation Functions. The International FLAIRS Conference Proceedings. 38. 10.32473/flairs.38.1.139005.
- Roberto Pellerito, Marco Cannici, Daniel Gehrig, Joris Belhadj, Olivier Dubois-Matra, Massimo Casasco, Davide Scaramuzza, “End-to-end Learned Visual Odometry with Events and Frames”, 2024, https://arxiv.org/abs/2309.09947
- CUDA C++ Best Practices Guide // https://docs.nvidia.com/cuda/cuda-c-best-practices-guide/ (дата обращения 26.05.2026)
- DROID-SLAM Github // https://github.com/princeton-vl/DROID-SLAM (дата обращения 24.05.2026)
- Wenshan Wang, Delong Zhu, Xiangwei Wang, Yaoyu Hu, Yuheng Qiu, Chen Wang, Yafei Hu, Ashish Kapoor, Sebastian Scherer // TartanAir: A Dataset to Push the Limits of Visual SLAM, 2020 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), 2020
- Geiger, P. Lenz and R. Urtasun, "Are we ready for autonomous driving? The KITTI vision benchmark suite," 2012 IEEE Conference on Computer Vision and Pattern Recognition, Providence, RI, USA, 2012, pp. 3354-3361, DOI: 10.1109/CVPR.2012.6248074.
- W. Maddern, G. Pascoe, C. Linegar and P. Newman, "1 Year, 1000km: The Oxford RobotCar Dataset", The International Journal of Robotics Research (IJRR), 2016.
Download

