Skip to content

yongjingmao/GraphShore

Repository files navigation

Spatio-Temporal Graph Convolutional Networks for Shoreline Prediction

This repository contains code for GraphShore, a shoreline prediction model using spatio-temporal graph convolutional networks (GCNs). It incorporates the DSTD-GCN and the STSGCN model. The GraphShore model is introduced in this paper.

Folder Structure

  • runner.ipynb: Main notebook for training, testing, and visualization.
  • checkpoints/: Model checkpoints for each site.
  • configs/: Configuration files for different models and sites.
  • datasets/: Shoreline and wave datasets for each site.
  • engine/: Prediction engine to train and predict.
  • model/: Model implementations (dstdgcn, dstdgcn_nospatial,stsgcn) and layers.
  • results/: Output predictions, targets, and visualizations.
  • utils/: Utility functions for data processing, logging, visualization, and loss functions.

Getting Started

  1. Install Dependencies

    • Python 3.10+
    • Required packages: numpy, torch, pandas, geopandas, matplotlib, optuna, tqdm, rasterio
    • Install with pip:
      pip install -r requirements.txt
  2. Prepare Data

    • Place shoreline and wave datasets in the datasets/ folder following the same formatting as examples, organized by site.
  3. Run Experiments

    • Modify and run runner.ipynb for model training and testing.
    • Modify and run ablation_analysis.ipynb to compare the performance of spatio-temporal and temporal-only models.
    • Modify and run model_interprete.ipynb to compare the learnt adjacency matrix with parameters used in physics-informed models.

Model framework

Acknowledgements

The model is built on the DSTD-GCN and the STSGCN model. We really thank the authors for sharing their wonderful works.

About

GraphShore: a data-driven spatio-temporal shoreline model

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors