Modular Java-Based Framework for Deploying Deep Learning Time-Series Forecasting Models via ONNX
DOI:
https://doi.org/10.24191/jaeds.v5i2.144Keywords:
Rainfall prediction, Long Short-Term Memory (LSTM), Deep learning, Time-series forecasting, Deep Java Library (DJL)Abstract
Bringing deep learning models for time-series forecasting into production has its challenges in the real world, and one of these challenges is transitioning from a Python-based development environment to platform-agnostic software. This paper proposed a modular extensible and easy-to-use Java-based framework for implementing deep learning time-series forecasting models, using simulated rainfall forecasting as a specific case study. One of the benefits of the case study of rainfall forecasting was the number of datasets available to work with and its relevance to environmental monitoring. The framework is able to seamlessly implement Long Short-Term Memory (LSTM) models that were trained in PyTorch and exported in the ONNX (Open Neural Network Exchange) format running inference with DJL (Deep Java Library). Users benefit from the ability to convert Java-native data to DJL compatible tensors via a custom Translator module in real time or batch for prediction. The framework also provides an easy-to-use graphical user interface (GUI) built in JavaFX to allow users to import CSV datasets to predict, visualize results, and export outputs without any advanced programming experience. In the rainfall forecasting case imposed for the case study analysis, the predictive accuracy was limited by the dataset; however, the main purpose of the work was to develop a reusable, accessible, and extensible deployment platform for ONNX-based deep-learning time-series models. The framework provides the foundation to allow for practical use of machine-learning workflows in a variety of applications, including environmental management, logistics, and industrial automation. The modularity of the framework and cross-platform development help to fill the gap with existing deployment technologies which offer a scalable pathway of operationalizing machine learning in practice with modern models such as deep learning. The proposed framework provides accessible solution between advanced model development and deployment covering wide use cases of machine learning.
Downloads
References
S. Chen et al., “Rainfall Forecasting in Sub-Sahara Africa-Ghana using LSTM Deep Learning Approach,” Int. J. Eng. Res. Technol., vol. 10, no. 3, pp. 464–470, 2021, [Online]. Available: www.ijert.org
P. Kanchan, “Rainfall Analysis and Forecasting Using Deep Learning Technique,” J. Informatics Electr. Electron. Eng., vol. 2, no. 2, pp. 1–11, 2021, doi: 10.54060/jieee/002.02.015.
A. S. M and S. M. J. Amali, “RAINFALL DETECTION USING DEEP LEARNING TECHNIQUE,” J. Sci. Technol. Res., vol. 1, no. 5, pp. 37–42, 2024, [Online]. Available: https://philpapers.org/rec/ARURDU
F. Morsidi, “Multi-Depot Dispatch Deployment Analysis on Classifying Preparedness Phase for Flood-Prone Coastal Demography in Sarawak,” J. ICT Educ., vol. 9, no. 2, pp. 175–190, Dec. 2022, doi: 10.37134/jictie.vol9.2.13.2022.
D. Sun, J. Wu, H. Huang, R. Wang, F. Liang, and H. Xinhua, “Prediction of Short-time rainfall based on deep learning,” Math. Probl. Eng., vol. 2021, 2021, doi: 10.1155/2021/6664413.
F. Morsidi and I. Y. Panessai, “Overview of the Integral Impact of MDVRP Routing Variables on Routing Heuristics,” Appl. Inf. Technol. Comput. Sci., vol. 4(1), no. 1, pp. 1723–1738, 2023, doi: 10.30880/aitcs.2023.04.01.105.
E. Salcedo, “Graph Learning-based Regional Heavy Rainfall Prediction Using Low-Cost Rain Gauges,” 2024, doi: 10.1109/LA-CCI62337.2024.10814868.
S. D. Latif et al., “Assessing rainfall prediction models: Exploring the advantages of machine learning and remote sensing approaches,” Alexandria Eng. J., vol. 82, no. May, pp. 16–25, 2023, doi: 10.1016/j.aej.2023.09.060.
B. M. Preethi, R. Gowtham, S. Aishvarya, S. Karthick, and D. G. Sabareesh, “Rainfall Prediction using Machine Learning and Deep Learning Algorithms,” Int. J. Recent Technol. Eng., vol. 10, no. 4, pp. 251–254, 2021, doi: 10.35940/ijrte.d6611.1110421.
A. Paszke et al., “PyTorch: An Imperative Style, High-Performance Deep Learning Library,” in Advances in Neural Information Processing Systems, 2019.
Y. Wang, P. Jia, Z. Shu, K. Liu, and A. Rashid, “Multidimensional precipitation index prediction based on C NN -LSTM hybrid framework,” 2025, doi: https://doi.org/10.48550/arXiv.2504.20442.
A. Poghosyan et al., “An enterprise time series forecasting system for cloud applications using transfer learning,” Sensors, vol. 21, no. 5, pp. 1–28, 2021, doi: 10.3390/s21051590.
P. Lahti, H. Põldoja, J. Lehtonen, S. Ventelä, I. Tuomola, and M. Väyrynen, “An Enterprise Time Series Forecasting System for Cloud Applications Using Transfer Learning,” Sensors, vol. 21, no. 5, p. 1590, 2021, doi: 10.3390/s21051590.
D. Endalie, G. Haile, and W. Taye, “Deep learning model for daily rainfall prediction: case study of Jimma, Ethiopia,” Water Supply, vol. 22, no. 3, pp. 3448–3461, 2022, doi: 10.2166/WS.2021.391.
A.-C. Akazan, V. R. Mbingui, G. L. R. N’guessan, and I. Karambal, “Localized Weather Prediction Using Kolmogorov-Arnold Network-Based Models and Deep RNNs,” pp. 1–17, 2025, [Online]. Available: http://arxiv.org/abs/2505.22686
P. Hess and N. Boers, “Deep Learning for Improving Numerical Weather Prediction of Heavy Rainfall,” J. Adv. Model. Earth Syst., vol. 14, no. 3, pp. 1–11, 2022, doi: 10.1029/2021MS002765.
M. Asif, M. M. Kuglitsch, I. Pelivan, and R. Albano, “Review and Intercomparison of Machine Learning Applications for Short-term Flood Forecasting,” Water Resour. Manag., pp. 1971–1991, 2025, doi: 10.1007/s11269-025-04093-x.
R. A. Adewoyin, P. Dueben, P. Watson, Y. He, and R. Dutta, “TRU-NET: a deep learning approach to high resolution prediction of rainfall,” Mach. Learn., vol. 110, no. 8, pp. 2035–2062, 2021, doi: 10.1007/s10994-021-06022-6.
J. Zhang and K. Feng, “Forecast the future in a timeseries data with Deep Java Library (DJL),” 2025. [Online]. Available: https://docs.djl.ai/master/extensions/timeseries/docs/forecast_with_M5_data.html
R. Taylor, “Machine Learning Techniques for Fish Breeding Decision Making,” 2023 Wellingt. Fac. Eng. Symp., pp. 1–12, 2023, [Online]. Available: https://ojs.victoria.ac.nz/wfes/article/view/8422
A. Rácz, D. Bajusz, and K. Héberger, “Effect of dataset size and train/test split ratios in qsar/qspr multiclass classification,” Molecules, vol. 26, no. 4, pp. 1–16, 2021, doi: 10.3390/molecules26041111.
F. M. Javed Mehedi Shamrat et al., “LungNet22: A Fine-Tuned Model for Multiclass Classification and Prediction of Lung Disease Using X-ray Images,” J. Pers. Med., vol. 12, no. 5, 2022, doi: 10.3390/jpm12050680.
A. Bhardwaj, “Time Series Forecasting with Recurrent Neural Networks : An In-depth Analysis Time Series Forecasting with Recurrent Neural Networks : An In-depth Analysis and Comparative Study,” EDU J. Int. Aff. Res. (EJIAR), ISS, vol. 2, no. 4, 2024, [Online]. Available: https://edupublications.com/index.php/ejiar/article/view/36
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 Farid Morsidi

This work is licensed under a Creative Commons Attribution 4.0 International License.






