Performance Evaluation and Comparison of Convolutional and Recurrent Neural Networks Using TensorFlow for Rip Current Hazard Prediction in Indonesian Tourist Beaches
Main Article Content
Abstract
Rip currents are among the most dangerous coastal hazards, often linked to drowning incidents on tourist beaches worldwide. Early and accurate detection of rip currents is crucial for enhancing coastal safety and minimizing risks to visitors. This study evaluates and compares the performance of Convolutional Neural Networks (CNN) and Recurrent Neural Networks (RNN), both implemented using TensorFlow, for predicting rip currents at three popular Indonesian beaches: Parangtritis, Drini, and Indrayanti. A dataset of 2,281 labeled drone images was prepared and divided into training, validation, and testing subsets for robust model evaluation. The CNN model used MobileNetV3-Large as the backbone to extract spatial patterns from coastal imagery. The RNN model incorporated a hybrid CNN–LSTM architecture designed to capture spatio-temporal dependencies, allowing it to detect sequential patterns that reflect the dynamic behavior of rip currents. Performance analysis showed that the CNN achieved consistent accuracy (0.88) across all sites, with precision ranging from 0.84 to 0.85, recall between 0.80 and 0.81, and AUC values up to 0.97. In contrast, the RNN achieved higher recall (0.83–0.87), indicating better sensitivity in detecting rip current regions, while maintaining AUC values between 0.89 and 0.92. However, its accuracy slightly decreased at Indrayanti Beach (0.845). These results show a trade-off: CNN excels in probabilistic discrimination, while RNN minimizes false negatives, making it more suitable for safety-critical early warning systems. This research contributes to AI-assisted monitoring systems, laying the groundwork for real-time detection frameworks to improve lifeguard decision-making and tourist beach safety.
Article Details

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
Copyright Agreement Statement
The corresponding author has to submit Copyright Agreement form after the article is accepted for publication in order to warrant that this contribution is original and that he/she has full power to make this grant. The author signs for and accepts responsibility for releasing this material on behalf of any and all co-authors.
The author(s) grant Current Applied Science and Technology a non-exclusive, irrevocable, royalty-free license to publish, reproduce, distribute, and archive the article in print and electronic form with effect if and when the article is accepted for publication. In the event that the article is withdrawn prior to acceptance or is declined, this agreement shall have no effect, and no party shall be bound by it.
The author(s) retain copyright of this article, including but not limited to the right to reproduce and distribute the article, to include it in a thesis or book, and to post it on an institutional or personal repository, provided that the original publication in Current Applied Science and Technology is properly cited.
References
Ahmed, T., Creedon, L., & Gharbia, S. S. (2023). Low-cost sensors for monitoring coastal climate hazards: A systematic review and meta-analysis. Sensors, 23(3), Article 1717. https://doi.org/10.3390/s23031717
Alfarano, A., Maiano, L., Papa, L., & Amerini, I. (2024). Estimating optical flow: A comprehensive review of the state of the art. Computer Vision and Image Understanding, 249, Article 104160. https://doi.org/10.1016/j.cviu.2024.104160
Almagrabi, A. O. (2023). A deep CNN-LSTM-based feature extraction for cyber-physical system monitoring. Computers, Materials and Continua, 76(2), 2079-2093. https://doi.org/10.32604/cmc.2023.039683
Amer, D. A., Ibrahim, N. Y., Ibrahim, I. K., Mohamed, A. M., & Soliman, S. A. (2025). Intelligent eyes on water: YOLOv11-based real-time drowning detection system. Journal of Supercomputing, 81(12), Article 1242. https://doi.org/10.1007/s11227-025-07732-7
Badidi, E., Moumane, K., & Ghazi, F. El. (2023). Opportunities, applications, and challenges of edge-AI enabled video analytics in smart cities: A systematic review. IEEE Access, 11, 80543-80572. https://doi.org/10.1109/ACCESS.2023.3300658
Bento, P., Pombo, J., Calado, M. do R., & Mariano, S. (2021). Ocean wave power forecasting using convolutional neural networks. IET Renewable Power Generation, 15(14), 3341-3353. https://doi.org/10.1049/rpg2.12258
Castelle, B., Carayon, D., Dehez, J., Liquet, S., Marieu, V., Sénéchal, N., Lyser, S., Savy, J. P., & Barneix, S. (2025). Machine learning beach attendance forecast modelling from automatic video-derived counting. Journal of Marine Science and Engineering, 13(6), Article 1181. https://doi.org/10.3390/jmse13061181
Castelle, B., Scott, T., Brander, R. W., & McCarroll, R. J. (2016). Rip current types, circulation and hazard. Earth-Science Reviews, 163, 1-21. https://doi.org/10.1016/j.earscirev.2016.09.008
Choi, J. (2025). A rip-current prediction/forecast model employing likelihoods of rip currents beforehand simulated by a phase-resolving wave-current model. Ocean Engineering, 331, Article 121153. https://doi.org/10.1016/j.oceaneng.2025.121153
Choi, J., Elgar, S., & Kirby, J. T. (2025). Rip current likelihood as a function of incident wave conditions for different bathymetries. Applied Ocean Research, 162, Article 104727. https://doi.org/10.1016/j.apor.2025.104727
Christofi, D., Mettas, C., Evagorou, E., Stylianou, N., Eliades, M., Theocharidis, C., Chatzipavlis, A., Hasiotis, T., & Hadjimitsis, D. (2025). A review of open remote sensing data with GIS, AI, and UAV support for shoreline detection and coastal erosion monitoring. Applied Sciences, 15(9), Article 4771. https://doi.org/10.3390/app15094771
Collins, A. M., Geheran, M. P., Hesser, T. J., Bak, A. S., Brodie, K. L., & Farthing, M. W. (2021). Development of a fully convolutional neural network to derive surf-zone bathymetry from close-range imagery of waves in Duck, NC. Remote Sensing, 13(23), Article 4907. https://doi.org/10.3390/rs13234907
Cruz, G., & Bernardino, A. (2019). Learning temporal features for detection on maritime airborne video sequences using convolutional LSTM. IEEE Transactions on Geoscience and Remote Sensing, 57(9), 6565-6576. https://doi.org/10.1109/TGRS.2019.2907277
de Silva, A., Mori, I., Dusek, G., Davis, J., & Pang, A. (2021). Automated rip current detection with region based convolutional neural networks. Coastal Engineering, 166, Article 103859. https://doi.org/10.1016/j.coastaleng.2021.103859
Dosovitskiy, A., Beyer, L., Kolesnikov, A., Weissenborn, D., Zhai, X., Unterthiner, T., Dehghani, M., Minderer, M., Heigold, G., Gelly, S., Uszkoreit, J., & Houlsby, N. (2021). An image is worth 16X16 words: Transformers for image recognition at scale. In 9th international conference on learning representations (pp. 1-22). ICLR.
Dumitriu, A., Tatui, F., Miron, F., Ionescu, R. T., & Timofte, R. (2023). Rip current segmentation: A novel benchmark and YOLOv8 baseline results. In 2023 IEEE/CVF conference on computer vision and pattern recognition workshops (pp. 1261-1271). IEEE. https://doi.org/10.1109/CVPRW59228.2023.00133
Handalage, U., Nikapotha, N., Subasinghe, C., Prasanga, T., Thilakarthna, T., & Kasthurirathna, D. (2021). Computer vision enabled drowning detection system. In 2021 3rd International conference on advancements in computing (pp. 240-245). IEEE. https://doi.org/10.1109/ICAC54203.2021.9671126
He, K., Zhang, X., Ren, S., & Sun, J. (2016). Deep residual learning for image recognition. In 2016 IEEE conference on computer vision and pattern recognition (pp.770-778). IEEE. https://doi.org/10.1109/CVPR.2016.90
Hu, Y., Shao, W., Wang, X., Zuo, J., & Jiang, X. (2024). Analysis of wave breaking on synthetic aperture radar at C-band during tropical cyclones. Geo-Spatial Information Science, 27(6), 2109-2122. https://doi.org/10.1080/10095020.2023.2295467
Islam, M. A., Rashid, S. I., Hossain, N. U. I., Fleming, R., & Sokolov, A. (2023). An integrated convolutional neural network and sorting algorithm for image classification for efficient flood disaster management. Decision Analytics Journal, 7, Article 100225. https://doi.org/10.1016/j.dajour.2023.100225
Khan, F. H., Stewart, D., De Silva, A., Palinkas, A., Dusek, G., Davis, J., & Pang, A. (2025). RipScout: Realtime ML-assisted Rip current detection and automated data collection using UAVs. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, 18, 7742-7755. https://doi.org/10.1109/JSTARS.2025.3543695
Khanam, R., Hussain, M., Hill, R., & Allen, P. (2024). A comprehensive review of convolutional neural networks for defect detection in industrial applications. IEEE Access, 12, 94250-94295. https://doi.org/10.1109/ACCESS.2024.3425166
Kim, J., Kim, J., Kim, T., Huh, D., & Caires, S. (2020). Wave-tracking in the surf zone using coastal video imagery with deep neural networks. Atmosphere, 11(3), Article 304. https://doi.org/10.3390/atmos11030304
Kristiansen, S., Nikolaidis, K., Plagemann, T., Goebel, V., Traaen, G. M., Øverland, B., Akerøy, L., Hunt, T.-E., Loennechen, J. P., Steinshamn, S. L., Bendz, C. H., Anfinsen, O.-G., Gullestad, L., & Akre, H. (2023). A clinical evaluation of a low-cost strain gauge respiration belt and machine learning to detect sleep apnea. Smart Health, 27, Article 100373. https://doi.org/10.1016/j.smhl.2023.100373
Kumnuandao, S., Worachananant, S., & Phaksopa, J. (2025). Usage of camera system to monitor the Rip current characteristics along Kata Noi Beach, Phuket Province. Burapha Science Journal, 30(2), 544-564.
Liu, Y., Xue, J., Li, D., Zhang, W., Chiew, T. K., & Xu, Z. (2024). Image recognition based on lightweight convolutional neural network: Recent advances. Image and Vision Computing, 146, Article 105037. https://doi.org/10.1016/j.imavis.2024.105037
López-García, S., Ruibal-Lista, B., González-Palomares, A., & Diez-Fernández, P. (2025). Effect of a short-term training program on knowledge of rip currents: A study with university students. Safety, 11(3), Article 92. https://doi.org/10.3390/safety11030092
Majidiyan, H., Enshaei, H., Howe, D., & Wang, Y. (2024). An integrated framework for real-time sea-state estimation of stationary marine units using wave buoy analogy. Journal of Marine Science and Engineering, 12(12), Article 2312. https://doi.org/10.3390/jmse12122312
Maryan, C., Hoque, M. T., Michael, C., Ioup, E., & Abdelguerfi, M. (2019). Machine learning applications in detecting rip channels from images. Applied Soft Computing Journal, 78, 84-93. https://doi.org/10.1016/j.asoc.2019.02.017
Montes, J., del Río, L., Plomaritis, T. A., Benavente, J., Puig, M., & Simarro, G. (2023). Video-monitoring tools for assessing beach morphodynamics in Tidal Beaches. Remote Sensing, 15(10), Article 2650. https://doi.org/10.3390/rs15102650
Najafzadeh, M., Basirian, S., & Li, Z. (2024). Vulnerability of the rip current phenomenon in marine environments using machine learning models. Results in Engineering, 21, Article 101704. https://doi.org/10.1016/j.rineng.2023.101704
Rampal, N., Shand, T., Wooler, A., & Rautenbach, C. (2022). Interpretable deep learning applied to rip current detection and localization. Remote Sensing, 14(23), Article 6048. https://doi.org/10.3390/rs14236048
Ren, S., Ghaffar, B., Mubbin, M., Haseeb, M., Tahir, Z., Hassan, S. S., Kucher, D. E., Kucher, O. D., & Abdullah-Al-Wadud, M. (2025). Multisensor remote sensing and AI-driven analysis for coastal and urban resilience classification. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, 18, 9166-9180. https://doi.org/10.1109/JSTARS.2025.3554793
Sabato, G., Scardino, G., Kushabaha, A., Casagrande, G., Chirivì, M., Fontolan, G., Fracaros, S., Luparelli, A., Spadotto, S., & Scicchitano, G. (2024). Remote measurement of tide and surge using a deep learning system with surveillance camera images. Water, 16(10), Article 1365. https://doi.org/10.3390/w16101365
Santos-Ferreira, A. M., Pinelo, J., da Silva, J. C. B., Johannessen, J. A., Chapron, B., Gommenginger, C., Magalhães, J. M., Buijsman, M., Forget, G., Pineda, J., Goh, E., Ávila, M., Diogo, I., & Gonçalves, J. (2025). The internal waves service workshop: Observing Internal waves globally with deep learning and synthetic aperture radar. Bulletin of the American Meteorological Society, 106(7), E1462-E1470. https://doi.org/10.1175/bams-d-25-0133.1
Saoudi, E. M., Jaafari, J., & Andaloussi, S. J. (2023). Advancing human action recognition: A hybrid approach using attention-based LSTM and 3D CNN. Scientific African, 21, Article e01796. https://doi.org/10.1016/j.sciaf.2023.e01796
Shi, Y., Xu, G., Liu, Y., Chen, H., Zhou, S., Yang, J., Dong, C., Lin, Z., & Wu, J. (2025). Deep learning-based real-time surf detection model during typhoon events. Remote Sensing, 17(6), Article 1039. https://doi.org/10.3390/rs17061039
Stringari, C. E., Guimarães, P. V., Filipot, J.-F., Leckler, F., & Duarte, R. (2021). Deep neural networks for active wave breaking classification. Scientific Reports, 11(1), Article 3604. https://doi.org/10.1038/s41598-021-83188-y
Talpur, K., Hasan, R., Gocer, I., Ahmad, S., & Bhuiyan, Z. (2025). AI in maritime security: Applications, challenges, future directions, and key data sources. Information, 16(8), Article 658. https://doi.org/10.3390/info16080658
Tan, M., & Le, Q. V. (2019). EfficientNet: Rethinking model scaling for convolutional neural networks. In Proceedings of the 36th international conference on machine learning (pp. 6105-6114). ICML.
Tan, N. S. Y., Tham, M. L., Chua, S. Y., & Lee, Y. L. (2024). Accurate and fast classification of natural disasters using CNN-LSTM and inference acceleration. Journal of Communications Software and Systems, 20(1), 58-68. https://doi.org/10.24138/jcomss-2023-0129
Tripathi, S. P., Chapron, B., Collard, F., Guitton, G., Lopez-Radcenco, M., Mouche, A., & Fablet, R. (2024). Deep learning inversion of ocean wave spectrum from SAR satellite observations. In ICASSP 2024-2024 IEEE international conference on acoustics, speech and signal processing (pp. 8711-8715). IEEE. https://doi.org/10.1109/ICASSP48485.2024.10446834
Wang, H.-M., Doong, D.-J., & Lai, J.-W. (2025). Rip current identification in optical images using wavelet transform. Journal of Marine Science and Engineering, 13(4), Article 707. https://doi.org/10.3390/jmse13040707
Younesi, A., Ansari, M., Fazli, M., Ejlali, A., Shafique, M., & Henkel, J. (2024a). A comprehensive survey of convolutions in deep learning: Applications, challenges, and future trends. IEEE Access, 12, 41180-41218. https://doi.org/10.1109/ACCESS.2024.3376441
Younesi, A., Ansari, M., Fazli, M., Ejlali, A., Shafique, M., & Henkel, J. (2024b). Corrections to ‘‘A comprehensive survey of convolutions in deep learning: Applications, challenges, and future trends". IEEE Access, 12, 112180. https://doi.org/10.1109/ACCESS.2024.3430149
Zhang, S., Cui, L., Dong, Z., & An, W. (2024). A deep learning classification scheme for PolSAR image based on polarimetric features. Remote Sensing, 16(10), Article 1676. https://doi.org/10.3390/rs16101676