Next Article in Journal
Mathematical Modeling of Wave-Induced Pore Pressure Dynamics in Silty Seabeds
Previous Article in Journal
Optimization of Configuration Design for Underwater Dam Defect Detection Vehicles
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Early Surge Warning Using a Machine Learning System with Real-Time Surveillance Camera Images

1
Department of Resources Engineering, National Cheng-Kung University, No. 1, University Road, Tainan City 701, Taiwan
2
Taiwan International Ports Cooperation, Ltd., Tainan City 70268, Taiwan
*
Author to whom correspondence should be addressed.
J. Mar. Sci. Eng. 2025, 13(2), 193; https://doi.org/10.3390/jmse13020193
Submission received: 17 December 2024 / Revised: 9 January 2025 / Accepted: 20 January 2025 / Published: 21 January 2025
(This article belongs to the Section Marine Hazards)

Abstract

:
While extreme oceanic phenomena can often be accurately predicted, sudden abnormal waves along the shore (surge) are often difficult to foresee; therefore, an immediate sensing system was developed to monitor sudden and extreme events to take necessary actions to prevent further risks and damage. Real-time images from coastal surveillance video and meteorological data were used to construct a warning model for incoming waves using long short-term memory (LSTM) machine learning. This model can predict the wave magnitude that will strike the destination area seconds later and issue an alarm before the surge arrives. The warning model was trained and tested using 110 h of historical data to predict the wave magnitude in the destination area 6 s ahead of its arrival. If the forecasting wave magnitude exceeds the threshold value, a warning will be issued, indicating that a surge will strike in 6 s, alerting personnel to take the necessary actions. This configuration had an accuracy of 60% and 88% recall. The proposed prediction model could issue a surge alarm 5 s ahead with an accuracy of 90% and recall of 80%. For surge caused by a typhoon, this approach could offer 10 s of early waring with recall of 76% and an accuracy of 74%.

1. Introduction

Real-time sensing systems are essential in monitoring sudden or extreme events and taking the necessary actions to prevent further risks and damage. Ocean movement is complex, involving numerous factors such as the amplitude of longitudinal and vertical waves, sea temperature, wind, transportation phenomena, and coastal erosion. Rapid scientific and technological developments have allowed most extreme events to be accurately predicted; however, transient surges such as freak or rogue waves are often difficult to predict. These surges can also occur on the shore, affecting anglers along the northeast coast of Taiwan [1]. There are currently two common wave observation techniques, contact and non-contact. Traditional observation technology is mainly contact, such as a buoy system equipped with a three-axis accelerometer [2], which is currently the most widely used instrument for wave observation. In addition, the high-precision global satellite navigation system (Global Navigation Satellite System, GNSS) is also a promising wave-measuring tool [3] with other tactile observation techniques including bottom spindle pressure and sonometers. Common non-contact devices include optical (optics) systems and radar wave (radar) systems [4]. Satellite SAR imagery could detect the advancing direction and velocity of group waves, but spaceborne SAR imaging is not a conducive product to fulfilling the need of early wave warnings. And the optical sensing system is limited by illumination and not suitable for monitoring at night. Recently, X-band radar signals were applied to infer the effective wave height, peak period, and average direction [5,6]. This technique has spatial information, so it has its advantages in long-term statistics of waves in the same area, but this method cannot be applied to nearshore surge observation. Coastal optical surveillance video-camera systems are a low-cost alternative and their easy instalment characteristic means that they are commonly used to monitor rip currents [7] and shoreline changes [8]. Optical cameras can also be used to monitor low energy microtidal beach processes of beach erosion and accretion [9], or convolutional neural networks can automatically create a storm impact database using time stack images provided by coastal video monitoring stations [10]. Coastal video monitoring is a shore-based remote sensing technology that uses optical cameras mounted at heights to capture high-resolution images of nearshore areas [11]. Due to the distinct characteristics of waves on the sea surface, it has proven to be effective for measuring breaking wave height [12] and also offers an alternative to identifying the wave transformation domain boundaries based on spatial variation in wave types [13]. However, it is dedicated to identifying the wave breaking point and image processing is based on a threshold image pixel magnitude [12], so it is limited to specific wave flow phenomena that have a clear breakpoint. Consequently, a solution using the ‘brightest’ of surveillance camera images, which is formed by the highest pixel magnitude within the sampling interval, was proposed to chart the wave magnitude with 20% error [14].
Machine learning is popular for image recognition and sequence-to-sequence translation, with the former making use of convolutional neural networks (CNNs) and the latter using recurrent neural networks (RNNs), especially the long-term and short-term memory model (LSTM) [15]. Jörges et al. integrated bathymetric data with an LSTM to reconstruct and predict wave height [16]. Meng et al. proposed a new LSTM for long-term accurate predictions of sea wave trains considering typical rule waves, irregular waves and real sea wave trains [17]. A deep learning method based on LSTM was used to predict focused waves [18], applying GRU and LSTM for wave forecasting and hindcasting and achieving good agreement [19]. Primitive instantaneous waveforms were generated by computational fluid dynamics (CFDs) and a surveillance camera, via AI, accurately predicted the individual observation point’s focused waves, as well as rogue ocean behavior, achieving an accuracy surpassing 90% and maintaining a loss value below 1 [20]. No study has presented a system that could raise the alarm about an incoming surge a few seconds prior its strike with acceptable accuracy.
This paper presents a multi-shot prediction method to improve the accuracy of the long-term estimation of irregular waves, offering 6 s early warnings with 60% accuracy. The training strategy involved multi-point data fusion [21] and the wave data were obtained from different locations. An artificial neural network (ANN), LSTM and time convolutional network (TCN) were used to test the offshore data to verify the feasibility of the training strategy.

2. Study Site and Video Data Source

The chosen study site is the Tiangong Temple, Dali village, Yilan county, Taiwan (24°58′06.2″ N, 121°55′40.4″ E). Real-time surveillance video images were obtained from a fixed camera set up by the Central Meteorological Administration (CMA). The fixed camera was aimed at the shoreline of northeastern Taiwan at location A in the location index panel of Figure 1, and the surveillance footage was transmitted in real-time on a live YouTube webcast (https://www.youtube.com/watch?v=68qSYgEjl4k accessed on 1 October 2024). The video files were stored by screen recording on the computer with a screen sampling rate of 12 Hz and a total of 110 h of daylight recorded between the 3rd and 19th of June 2024, comprising different conditions such as tide heights, wave heights, and wind speeds, as well as sunny, cloudy, rainy days, wet lenses, fog, early morning, and dusk. Marine data from the Meteorological Department at Honeymoon Bay buoy (121.9291 E, 24.9488 N) are included for wave character prediction. Eight hours of video data taken at Duoliang railway station in eastern Taiwan, shown as location B in Figure 1, during typhoon Krathon in 2024 were utilized for a model accuracy independent test.

3. Methods

3.1. Define Wave Detection and Surge Threshold with Averaged Pixel DN

The pixels in the captured surveillance screen images were analyzed to predict surges; the clipped image in the red square of Figure 1 is automatically transformed into 8 bits greyscale. Normalized averaged digital numbers (DNs) of 62 × 25 pixels from the clipped image are shown as vertical values in Figure 2. The averaged pixel DN value of destination zone without any spray is set as the case of wave strength 0, as shown in the bottom of right panel of Figure 2. The horizontal axis of Figure 2 is time, and the vertical axis is the normalized, observed DN minus the base DN value of no spray, average greyscale pixel DN value in the destination area, which is proportional to the wave magnitude, with an undulation representing an incoming wave. In this example, the threshold value of differenced DN is 90 and the time of DN value over 90 is a surge strike; there are three surges detected within 140 s in this demonstrative example.

3.2. Converting Sliced-Image Pixel DN to Temporal and Spatial Variation in Waves

To calculate the time of waves attacking the destination area, as shown in Figure 3, only the images between the two yellow lines, the wave advancing direction, were processed, that is 972 × 30 pixels of the image. Several wave magnitude factors were calculated according to the pixel DN changes in time and space to predict the incoming waves’ magnitudes. First, considering the image taken at a certain point t, the wave advancing direction is set as X and the direction parallel to the coastline is set as Y. After converting the image to greyscale, the averaged pixel DN value of each Y cross section, 30 pixels, was calculated along each pixel increment, 972 pixels, in the X direction (top panel of Figure 3). This change in averaged DN along the wave’s advancing direction reflects the profile of wave amplitude. Therefore, the degree of pixel DN changes reflects the condition of the wave; the pixel DN values in the X direction are convoluted to quantify the undulating features and enhance the reflected values from the rising portion of the wave, as shown in Figure 4.
The convoluted features of chosen pixels DN corresponding to time t and space x is plotted as a variation diagram in Figure 5. The right margin of the horizontal axis is the position on the shore and to the left is the direction of open sea. The lower left portion of the chart denotes the offshore wave feature in the past and the upper right is the future nearshore wave. The brightness in the dash box reflects the magnitude of the wave, the closer to the shore, the higher the wave. The reciprocal of the dashed line slope is the speed of the wave moving in space (pixel/s) and the distance between the two waves is the reciprocal (1/pixel) of the wave number k. There is a total of 20 s recorded and illustrated in the figure; the lower left portion (70%, thin dash box) is the known input data and the upper right 30%, presented as a thick dashed box, is the corresponding output simulated wave. While the surveillance camera covers enough range, the wave characters that are far away from the destination zone are brought into the proposed LSTM model to predict the wave features while approaching the shore.
The future dynamic parameters of wave magnitude were predicted based on the spatiotemporal variation in the observed wave characteristics. Since this prediction model uses current information to predict the wave attack magnitude in the next few seconds, it is necessary to cover some known information before training the model. As shown in Figure 5, information from the observed 14 s record is the foundation for forecasting the wave character 6 s in the future. First, a spatial–temporal region is demarcated on the characteristic spatial–temporal change map according to the past wave velocity (pixel/s). The endpoint of this spatial–temporal region is the position on the shore at which the surge will strike 6 s later and the slope is the reciprocal of the wave velocity. The wave features are represented as a pixel DN value, P i x i n d e x , conversion   C o n v i n d e x , and absolute value a b s _ C o n v i n d e x .
Furthermore, considering the spatial–temporal region of this calibration, the wave characteristics at different time points are extracted in chronological order from the past to the present to obtain the wave characteristics: P i x t i i n d e x ,   C o n v t i i n d e x ,   a b s _ C o n v t i i n d e x , ti = −14~0. In this case, the starting time point is 14 s ahead of the current time, and the sampling time interval is 1/12 s. These time series reflect the changes in wave development characteristics in the past 14 s. Then, the summarized wave characteristics will reflect the total magnitude of the wave at each sampled point during the development process (factors 4 to 6):
P i x t s s u m = t i = t s 14 t s P i x t i i n d e x
C o n v t s s u m = t i = t s 14 t s C o n v t i i n d e x
a b s _ C o n v t s s u m = t i = t s 14 t s a b s _ C o n v t i i n d e x
These changes reflected the fluctuations of wave magnitudes from the past 14 s, expressed by the roughness of the sea’s surface. This value reflects the overall magnitude but does not show the wave dynamic development process. These pre-event time series wave magnitude data, transformed from the image pixel DN values associated with marine data, are the parameters that are inputted into the proposed LSTM model to establish the dynamic evolution pattern; then, this pattern could be extended to predict wave characters in the future.

3.3. Marine Parameter Data for Predicting Wave Magnitude

Marine data measured by the Meteorological Department at nearby weather stations were used to improve the accuracy of the predicted wave magnitude. This observation data were updated hourly from the Honeymoon Bay buoy (121.9291 E, 24.9488 N) of the Meteorological Department, 2.4 km away from the testing site; these included wave height, wave direction, wave period, wind force, maximum wind speed and current velocity data (https://www.cwa.gov.tw/V8/C/M/OBS_Marine_30day.html?MID=OAC005, accessed on 1 October 2024). The tidal height information was obtained from the records of the Wushi tide level station (121.8396 E, 24.8686 N) that is 14.2 km away (https://www.cwa.gov.tw/V8/C/M/OBS_Marine_30day.html?MID=C4U02, accessed on 1 October 2024). Four pieces of included data are shown in Figure 6.

3.4. Data Grouping for Model Training and Testing

The dynamic parameters of wave magnitude calculation via an on shore surveillance camera and the synchronous marine records from the Meteorological Bureau website were inputted into the proposed LSTM model for training and testing. In this study, hourly footage of detected surges was applied in the training, which was 27 h of data, sufficiently covering variations in tide heights, wave heights, wind speeds, sunny, cloudy, and rainy weather, wet lenses, fog, and early morning and dusk.
A total of 70% of the video data was randomly chosen for pattern training and validation and the remaining 30% was set for testing with the proposed LSTM. At first, vague video footage—whenever the pixel DN values in the image over the destination zone were all the same—was ruled out. There were more than thousands of events in which the detected DN value exceeded the threshold of 90 in this database; thousands of no surge events were also included. A total of 11.6 million frames of sample images served as the raw data for training the proposed LSTM model; thus, the diversity of raw information was fulfilled. Since the purpose of this study is to seize the moment when the wave magnitude exceeds the threshold, the magnitude of the approaching wave was analyzed and predicted, as shown in Figure 7. Thus, the information of the descending segment was ignored to avoid unnecessary interference and speed up the processing. The event information in the model training and validation period was resampled to make the data ratio of the ‘surge’ and ‘non-surge’ events equal to 1:1, thus reducing the data imbalance problem in the prediction model.

3.5. The LSTM Model

The training and validation data groups were inputted into the LSTM model with concatenation and two dense networks (Tensor Flow 2.18) to predict future wave magnitude, as shown in Figure 8. Each of the 972-pixel time series transformed from the image were resampled into 275 number sequences for LSTM model computing and the length of the kernel was set as 45. The model integrates the dynamic parameters of wave intensity (time series data) with static meteorological data to predict wave magnitude. The dynamic data are processed through an LSTM layer with 50 units to capture temporal patterns, while the static data are processed separately through a dense layer with 50 neurons and ReLU activation to extract meaningful static relationships. The outputs of these two layers are concatenated and further refined through two fully connected layers: one with 50 neurons and a sigmoid activation function, and another with a single neuron and a linear activation function for final prediction. The model is compiled with the Adam optimizer and has Mean Squared Error (MSE) as the loss function and Mean Absolute Error (MAE) as the evaluation metric, model result of error is shown in Figure 9. Training is conducted over 200 epochs with a batch size of 32, using a 10% validation split. This architecture effectively combines temporal and static features, enabling the model to learn complex dependencies between wave dynamics and meteorological conditions for accurate predictions. The model error and loss become convergent after 40 epochs of computing. In this study, the captured 14 s image records were sampled as 12 Hz information, providing raw data to support 168-epoch model computing, i.e., four times the amount of required data for the model to converge.

4. Results and Validation

4.1. Relationship Between Surge Occurence and Marine Data

The correlation between the marine data and the probability of a surge striking the destination area was examined, and the occurrence of a surge was positively correlated to the tide height, wave height and wind strength. The red asterisks in Figure 10 are the data points that have a surge striking the destination in the hour and the blue asterisks indicate no surge, showing that surges are more likely to occur in the right-upper portion of Figure 10, which is an environment of high tide height, high wave height and strong winds.
This marine data is not updated in real time, and only hourly updated observation records are available for download. As such, there are two possible adjustment options:
Option 1.
Use the latest directly recorded marine parameters.
Option 2.
Automatically capture the marine parameters of the previous 100 h, predict the current marine parameters through the LSTM, and then input the forecasted marine parameters into the surge prediction model.

4.2. Surge Prediction Model Test Results

The first 30% of the hourly video was used as the validation group and the following image was used as the data input unit. The surge magnitude in the destination area at time zero was estimated by the pixel DN value of the chosen image section taken 14 to 6 s before surge strike. There are six various time frame-predicted examples vs. observations, and these are illustrated in Figure 11. Only those events with predicted magnitudes larger than the threshold, the average pixel DN value of 90 in this case, were examined. The confusion matrix for evaluating the exactness of this wave magnitude prediction is shown in Table 1, where the recall is 79% and the accuracy is 98%. The definitions of recall and accuracy are listed in Table 2.

4.3. Wave Prediction Model Testing Results: Case of 6 s Early Warning

The major function of this early warning system is to offer a surge attack alarm ahead of time. First, it must be determined whether there is an incoming wave heading towards the destination zone. The moment for the average pixel DN value over a destination area greater than 15 is defined as the classifying criteria of a wave (Figure 12). When the observed pixel DN value over the destination zone was greater than 90, this was defined as the moment that a ‘surge’ occurred. With this model, when a surge event is predicted to strike the destination zone in 6 s, then a surge warning will be issued. The criterion for determining prediction success is the difference between the surge strike time and the prediction. The accuracy of the 6 s early warning is shown in Table 3, with a recall of 60% and an accuracy of 88%.

4.4. Effect of Reducing Early Warning Time by 1 s

Figure 13 shows the forecasting lag time of five surge events if the alarm is sent 6 s ahead of the strike; the surge predictions are very close to the observed time, with 1 s of error in striking time. Then, reducing the surge warning time from 6 to 5 s (Figure 14) to predict the same five consecutive surges means that the image from 15 to 5 s prior to the strike time is utilized to predict the wave magnitude in the future 5 s, as shown by the blue line in Figure 14. Therefore, this loss of 1 s of reaction time improved the model prediction accuracy (Table 4), with the recall increasing from 60% to 80%. The warning time vs. accuracy rate in Figure 15 shows that a 5 s warning time is the most appropriate configuration for a balanced warning time and accuracy rate.

4.5. Validation Model Accuracy with Waves Caused by Typhoons

The severe surges associated with typhoon Krathon, which struck Taiwan (30 September 2024 10:00~17:00), were used for validating model accuracy at other locations and in other environments. Eight hours of video data taken at Duoliang railway station in eastern Taiwan was utilized (https://www.youtube.com/watch?v=UCG1aXVO8H8, accessed on 20 October 2024, Transportation and Tourism Development Department, Taitung County Government), with the location of the destination zone and detected wave pattern shown in Figure 16. The first 30% of the video was used as the test group and the remaining 70% used for model training and validation. The model training and validation data were randomly resampled to achieve data balance; further data randomization was performed in order to choose 90% for training and the other 10% for validation. A surge warning will be issued once a predicted wave magnitude over the destination zone exceeds the threshold, that is DN value of 120, which is 10 s later with the proposed LSTM model. The confusion matrix for evaluating the correctness of the prediction in Table 5 shows a recall of 76% and an accuracy of 74%, so the model prediction result is plausible for a typhoon surge with video taken at location other than model training site.

5. Conclusions

A surge early warning system was developed using real-time coastal video footage, (updated hourly), meteorological data and LSTM machine learning. The LSTM model could preserve a longer memory during network evolution without high-end computing hardware, which means an entry-level PC could offer prediction within the designed time with this model. The system was trained and tested using 110 h of historical data to predict the wave magnitude in the destination area 6 s ahead of the strike; it issued a warning if the predicted wave magnitude was greater than the threshold. The prediction model had a 60% accuracy and 88% recall. Reducing the warning time to 5 s ahead of a strike, we achieved an accuracy of 90% and 80% recall. In the case of surge during typhoons, a surge could be predicted 10 s ahead of strike with an accuracy of 74% and a recall of 76%. This early warning model can be applied to other coasts and provides a reference for the establishment of early warning models and follow-up studies of disaster mechanisms. This reliable and low-cost system performs well in predicting a surge 6 s ahead of time. Eventually, 6 s did not offer a very long-time span for evacuating and taking hazard mitigation action. However, for those who fish on the shore, swim on the beach or drivers who drive on highways adjacent to the ocean, a siren 6 s ahead of the surge could notify them to seek a security facility or reduce their speed to diminish their vulnerability to hazards. There are several ways of improving the accuracy or extent of the warming time in this method; applying pairs of cameras at various incision angles with high-definition and -resolution cameras should improve the data quality and thus elevate the prediction accuracy. The use of near infrared images or radar could detect surges at night.
Since machine learning requires a vast number of events to train and validate, continuous monitoring in an area is required to fully understand the process of wave occurrence and formation characteristics. Adding more videos at various station would also help to enrich the database and thus improve the model’s performance. Both on-site and real-time metrological data are valuable resources for improving the accuracy of the model’s outcome.

Author Contributions

Conceptualization, T.-T.Y.; Software, W.-F.P.; Validation, T.-T.Y.; Investigation, Y.-W.C.; Resources, T.-T.Y.; Writing—original draft, Y.-W.C.; Writing—review & editing, T.-T.Y.; Funding acquisition, T.-T.Y. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Data source is contained within the article.

Acknowledgments

The source video footage and ocean meteorological data were provided by the Central Weather Administration (CWA) of Taiwan and Transportation and Tourism Development Department, Taitung County Government, to which the authors are very grateful. We also thank the research and development foundation of NCKU who partially supported the research expenses.

Conflicts of Interest

Author Yi-Wen Chen was employed by the company Taiwan International Ports Cooperation, Ltd. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

References

  1. Tsai, C.H.; Su, M.Y.; Huang, S.J. Observations and conditions for occurrence of dangerous coastal waves. Ocean Eng. 2004, 31, 745–760. [Google Scholar] [CrossRef]
  2. Liu, P.C.; Chen, H.S.; Doong, D.J.; Kao, C.C.; Hsu, Y.J. Freaque waves during Typhoon Krosa. Ann. Geophys. 2009, 27, 2633–2642. [Google Scholar] [CrossRef]
  3. Lin, Y.P.; Huang, C.J.; Chen, S.H.; Doong, D.J.; Kao, C.C. Development of a GNSS buoy for monitoring water surface elevations in estuaries and coastal areas. Sensors 2017, 17, 172. [Google Scholar] [CrossRef] [PubMed]
  4. Dankert, H.; Horstmann, J.; Lehner, S.; Rosenthal, W. Detection of wave groups in SAR images and radar image sequences. IEEE Trans. Geosci. Remote Sens. 2003, 41, 1437–1446. [Google Scholar] [CrossRef]
  5. Greenwood, C.; Vogler, A.; Morrison, J.; Murray, A. The approximation of a sea surface using a shore mounted X-band radar with low grazing angle. Remote Sens. Environ. 2018, 204, 439–447. [Google Scholar] [CrossRef]
  6. Navarro, W.; Velez, J.C.; Orfila, A.; Lonin, S. A shadowing mitigation approach for sea state parameters estimation using X-band remotely sensing radar data in coastal areas. IEEE Trans. Geosci. Remote Sens. 2019, 57, 6292–6310. [Google Scholar] [CrossRef]
  7. Akila, D.S.; Mori, I.; Dusek, G.; Davis, J.; Pang, A. Automated rip current detection with region-based convolutional neural networks. Coast. Eng. 2021, 166, 103859. [Google Scholar]
  8. Pugliano, G.; Robustelli, U.; Di Luccio, D.; Mucerino, L.; Benassai, G.; Montella, R. Statistical deviations in shoreline detection obtained with direct and remote observations. J. Mar. Sci. Eng. 2019, 7, 137. [Google Scholar] [CrossRef]
  9. Morales-Márquez, V.; Orfila, A.; Simarro, G.; Gómez-Pujol, L.; Álvarez-Ellacuría, A.; Conti, D.; Galán, Á.; Osorio, A.F.; Marcos, M. Numerical and remote techniques for operational beach management under storm group forcing. Nat. Hazards Earth Syst. Sci. 2018, 18, 3211–3223. [Google Scholar] [CrossRef]
  10. Callens, A.; Morichon, D.; Liria, P.; Epelde, I.; Liquet, B. Automatic creation of storm impact database based on video monitoring and convolutional neural networks. Remote Sens. 2021, 13, 1933. [Google Scholar] [CrossRef]
  11. Andriolo, U.; Sánchez-García, E.; Taborda, R. Operational use of surfcam online streaming images for coastal morphodynamic studies. Remote Sens. 2019, 11, 78. [Google Scholar] [CrossRef]
  12. Almar, R.; Cienfuegos, R.; Catalán, P.A.; Michallet, H.; Castelle, B.; Bonneton, P.; Marieu, V. A new breaking wave height direct estimator from video imagery. Coast. Eng. 2012, 61, 42–48. [Google Scholar] [CrossRef]
  13. Andriolo, U. Nearshore wave transformation domains from video imagery. J. Mar. Sci. Eng. 2019, 7, 186. [Google Scholar] [CrossRef]
  14. Huntley, D.; Saulter, A.; Kingston, K.; Holman, R. Use of video imagery to test model predictions of surf heights. WIT Trans. Ecol. Environ. 2009, 126, 39–50. [Google Scholar]
  15. Hochreiter, S.; Schmidhuber, J. Long short-term memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef]
  16. Jörges, C.; Berkenbrink, C.; Stumpe, B. Prediction and reconstruction of ocean wave heights based on bathymetric data using LSTM neural networks. Ocean Eng. 2021, 232, 109046. [Google Scholar] [CrossRef]
  17. Meng, Z.-F.; Chen, Z.; Khoo, B.C.; Zhang, A.-M. Long-time prediction of sea wave trains by LSTM machine learning method. Ocean Eng. 2022, 262, 112213. [Google Scholar] [CrossRef]
  18. Zhang, M.; Tavakoli, S.; Hirdaris, S. A deep learning method for the prediction of focused waves in a wave flume. IOP Conf. Ser. Mater. Sci. Eng. 2023, 1288, 012007. [Google Scholar] [CrossRef]
  19. Alizadeh, M.J.; Nourani, V. Multivariate GRU and LSTM models for wave forecasting and hindcasting in the southern Caspian Sea. Ocean Eng. 2024, 298, 117193. [Google Scholar] [CrossRef]
  20. Sabato, G.; Scardino, G.; Kushabaha, A.; Casagrande, G.; Chirivì, M.; Fontolan, G.; Fracaros, S.; Luparelli, A.; Spadotto, S.; Scicchitano, G. Remote measurement of tide and surge using a deep learning system with surveillance camera images. Water 2024, 16, 1365. [Google Scholar] [CrossRef]
  21. Huang, W.; Zhao, X.; Huang, W.; Hao, W.; Liu, Y. A training strategy to improve the generalization capability of deep learning-based significant wave height prediction models in offshore China. Ocean Eng. 2023, 283, 114938. [Google Scholar] [CrossRef]
Figure 1. Live broadcast image of the Yilan Dali Coast (location A); the red square denotes the destination area and location B in the index map is the location of the model’s independent testing site.
Figure 1. Live broadcast image of the Yilan Dali Coast (location A); the red square denotes the destination area and location B in the index map is the location of the model’s independent testing site.
Jmse 13 00193 g001
Figure 2. Identifying the threshold of surge events (left panel) using the differencing averaged image pixel digital numbers (middle panels) in the destination area (right panels) with a 1/12 s interval capturing rate. The captured images and greyscale DN for 4 different calculated wave strengths are shown in the right panel; from top to bottom are the cases for DN 105, 88, 62 and 40, respectively. The unit of the vertical scale is the differencing DN value of the pixels from the 8 bits greyscale image.
Figure 2. Identifying the threshold of surge events (left panel) using the differencing averaged image pixel digital numbers (middle panels) in the destination area (right panels) with a 1/12 s interval capturing rate. The captured images and greyscale DN for 4 different calculated wave strengths are shown in the right panel; from top to bottom are the cases for DN 105, 88, 62 and 40, respectively. The unit of the vertical scale is the differencing DN value of the pixels from the 8 bits greyscale image.
Jmse 13 00193 g002
Figure 3. The DN of 972 × 30 pixel image between two yellow dash lines is calculated to reflect the profile of wave magnitude (top panel) and the change in averaged DN along the wave advancing direction matches the wave character. Fluctuation points of obtained data series near the shore match wave breaking time, and a portion of the data on dry land (red frame) remain unchanged throughout the entire observed period.
Figure 3. The DN of 972 × 30 pixel image between two yellow dash lines is calculated to reflect the profile of wave magnitude (top panel) and the change in averaged DN along the wave advancing direction matches the wave character. Fluctuation points of obtained data series near the shore match wave breaking time, and a portion of the data on dry land (red frame) remain unchanged throughout the entire observed period.
Jmse 13 00193 g003
Figure 4. Convoluted DN values of pixels in profiled image with triangle kernel function to enhance and quantify the raising portion of wave features.
Figure 4. Convoluted DN values of pixels in profiled image with triangle kernel function to enhance and quantify the raising portion of wave features.
Jmse 13 00193 g004
Figure 5. Temporal–spatial variation in convoluted wave amplitude. Brightness reflects the wave amplitude. Thin dashed box is the source data of model input to predict the wave character in the thick dashed box, which means 14 s image records are modeled with an LSTM training set to predict the wave characters 6 s in the future.
Figure 5. Temporal–spatial variation in convoluted wave amplitude. Brightness reflects the wave amplitude. Thin dashed box is the source data of model input to predict the wave character in the thick dashed box, which means 14 s image records are modeled with an LSTM training set to predict the wave characters 6 s in the future.
Jmse 13 00193 g005
Figure 6. Marine data obtained from nearby the metrological buoy and stations; wind speed, current speed, tide height and wave height time sequence are brought into the LSTM model.
Figure 6. Marine data obtained from nearby the metrological buoy and stations; wind speed, current speed, tide height and wave height time sequence are brought into the LSTM model.
Jmse 13 00193 g006
Figure 7. The training process only included the information of wave magnitude from rising segments, which are shown as red dots.
Figure 7. The training process only included the information of wave magnitude from rising segments, which are shown as red dots.
Jmse 13 00193 g007
Figure 8. The machine learning network model and required input data to predict future wave magnitude with LSTM. The model concentrated the time series wave character to marine data and then performed dense network computing to forecast the future pattern.
Figure 8. The machine learning network model and required input data to predict future wave magnitude with LSTM. The model concentrated the time series wave character to marine data and then performed dense network computing to forecast the future pattern.
Jmse 13 00193 g008
Figure 9. (Left) Error and (Right) loss of model convergence in this LSTM machine learning training stage; at least 40 epochs of iteration are required to achieve the least model error and loss.
Figure 9. (Left) Error and (Right) loss of model convergence in this LSTM machine learning training stage; at least 40 epochs of iteration are required to achieve the least model error and loss.
Jmse 13 00193 g009
Figure 10. Correlation between tide height, wave height and wind force from nearby buoy data and the occurrence of surges (red asterisks) in the destination area; events without surges are shown with blue asterisks. Surge occurred in the upper-right portion, meaning the area with high tide and wave height and strong winds.
Figure 10. Correlation between tide height, wave height and wind force from nearby buoy data and the occurrence of surges (red asterisks) in the destination area; events without surges are shown with blue asterisks. Surge occurred in the upper-right portion, meaning the area with high tide and wave height and strong winds.
Jmse 13 00193 g010
Figure 11. Comparison of the amount of surge between the model-predicted and observed wave magnitudes at six various time frames for accuracy evaluation. The threshold was set at a DN value of 90 and whenever the averaged DN of pixels on top of the destination area was larger, then this was defined as a surge event.
Figure 11. Comparison of the amount of surge between the model-predicted and observed wave magnitudes at six various time frames for accuracy evaluation. The threshold was set at a DN value of 90 and whenever the averaged DN of pixels on top of the destination area was larger, then this was defined as a surge event.
Jmse 13 00193 g011aJmse 13 00193 g011b
Figure 12. Schematic diagram of a definition of wave occurrence over the averaged pixel DN value (vertical axis) on the image segment of the destination area.
Figure 12. Schematic diagram of a definition of wave occurrence over the averaged pixel DN value (vertical axis) on the image segment of the destination area.
Jmse 13 00193 g012
Figure 13. Comparison of predicted surge occurrence with the observed time in the 6 s early warning time model. The error in the estimated time of arrival for these five consecutive surges is 1~2 s.
Figure 13. Comparison of predicted surge occurrence with the observed time in the 6 s early warning time model. The error in the estimated time of arrival for these five consecutive surges is 1~2 s.
Jmse 13 00193 g013
Figure 14. Comparison of the predicted surge occurrence with the observed time in the 5 s early warning time model. The error in estimated time arrival for these five consecutive surges is less than 1 s.
Figure 14. Comparison of the predicted surge occurrence with the observed time in the 5 s early warning time model. The error in estimated time arrival for these five consecutive surges is less than 1 s.
Jmse 13 00193 g014
Figure 15. Comparison of different early warning times vs. model accuracy.
Figure 15. Comparison of different early warning times vs. model accuracy.
Jmse 13 00193 g015
Figure 16. The live broadcast testing images taken from Taiwan Railway Duoliang Station at Taitung County for validating surges caused by typhoons. The white square denotes the destination zone, and the red line indicates the wave’s approaching direction. Imbedded charts illustrate the 9 surges (red dots) detected within the 80 s recording span.
Figure 16. The live broadcast testing images taken from Taiwan Railway Duoliang Station at Taitung County for validating surges caused by typhoons. The white square denotes the destination zone, and the red line indicates the wave’s approaching direction. Imbedded charts illustrate the 9 surges (red dots) detected within the 80 s recording span.
Jmse 13 00193 g016
Table 1. Wave prediction confusion matrix in terms of image moments.
Table 1. Wave prediction confusion matrix in terms of image moments.
Recall = 79%
Accuracy = 98%
Prediction
Surge EventNo Surge Event
ObservationSurge event1793481
No surge event4861284,339
Table 2. Confusion matrix correctness parameter definition for recall and accuracy.
Table 2. Confusion matrix correctness parameter definition for recall and accuracy.
Recall = TP/(TP + FN)
Accuracy = (TP + TN)/(TP + TN + FP + FN)
Prediction
TrueFalse
ObservationTrueTPFN
FalseFPTN
Table 3. Surge prediction confusion matrix for 6 s early warning time case.
Table 3. Surge prediction confusion matrix for 6 s early warning time case.
Recall = 60%
Accuracy = 88%
Prediction
Surge EventNo Surge Event
Observation Surge event11677
No surge event55924
Table 4. Surge prediction confusion matrix for 5 s early warning time case.
Table 4. Surge prediction confusion matrix for 5 s early warning time case.
Recall = 80%
Accuracy = 90%
Prediction
Surge EventNo Surge Event
Observation Surge event15538
No surge event79900
Table 5. Surge prediction confusion matrix for incoming wave caused by typhoon.
Table 5. Surge prediction confusion matrix for incoming wave caused by typhoon.
Recall = 76%
Accuracy = 74%
Prediction
Surge EventNo Surge Event
Observation Surge event3210
No surge event40107
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Chen, Y.-W.; Yu, T.-T.; Peng, W.-F. Early Surge Warning Using a Machine Learning System with Real-Time Surveillance Camera Images. J. Mar. Sci. Eng. 2025, 13, 193. https://doi.org/10.3390/jmse13020193

AMA Style

Chen Y-W, Yu T-T, Peng W-F. Early Surge Warning Using a Machine Learning System with Real-Time Surveillance Camera Images. Journal of Marine Science and Engineering. 2025; 13(2):193. https://doi.org/10.3390/jmse13020193

Chicago/Turabian Style

Chen, Yi-Wen, Teng-To Yu, and Wen-Fei Peng. 2025. "Early Surge Warning Using a Machine Learning System with Real-Time Surveillance Camera Images" Journal of Marine Science and Engineering 13, no. 2: 193. https://doi.org/10.3390/jmse13020193

APA Style

Chen, Y.-W., Yu, T.-T., & Peng, W.-F. (2025). Early Surge Warning Using a Machine Learning System with Real-Time Surveillance Camera Images. Journal of Marine Science and Engineering, 13(2), 193. https://doi.org/10.3390/jmse13020193

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop