This is the code example for reproducing "Descriptor: Coastal Aerial Imagery Dataset for Shoreline Segmentation (CAID)".
Please download the CAID dataset from the following Dropbox link: Download CAID Dataset or Zenodo link: Download CAID Dataset.
Run DistributionAnalysis.ipynb to visualize dataset distribution.
To test deep learning model performance on CAID, first download and install MMSegmentation.
After installation, modify the voc.py file located under mmseg/datasets to ensure it contains only two classes:
backgroundwater
Also, update the color palette to:
PALETTE = [[0, 0, 0], [128, 0, 0]]- Navigate to the
mmsegmentationfolder. - Create a folder named
datasetsif it does not already exist. - Unzip the downloaded CAID dataset inside this
datasetsfolder. - Rename the extracted folder to
voc2012.
Before training, copy the my_model folder to the mmsegmentation directory:
cp -r my_model mmsegmentation/Then modify LINE 3 in pascal_voc12.py to your dataset path.
- Open a terminal and activate the correct Python environment.
- Run the following command to train CCNet on CAID:
python tools/train.py --config ./my_model/CCNetBenchmark/ccnet_r50-d8_4xb4-20k_voc12aug-512x512.py --work-dir /home/weiwang/ResearchProjects/mmsegmentation/my_model_res/CCNetBenchmark/
- To train other deep learning models provided in the
my_modelfolder, run similar commands by replacing the--configand--work-dirarguments accordingly. - Once complete all the training, you can run
DemoAnalysis.ipynbto see the performance on validation sets during training.
- Create a folder named
test_set. - Copy all original images and labeled images into this
test_set. - Inside
test_set, create two subfolders:img/(for original images)GT_label/(for labeled images)
Follow the instructions in the MMSegmentation documentation to demo the trained model on the img folder inside test_set. Save the segmentation results into corresponding subfolders within test_set.
Once you have completed inferencing the test images and placed the results into the corresponding folders, you can follow BenchDemoAnalysis.ipynb and TestParamsAnalysis.ipynb to plot the examples and show the statistics.
By following these steps, you will successfully set up, train, and evaluate a deep learning model on the CAID dataset using MMSegmentation.
The aerial imagery is provided by United States Department of Agriculture (USDA), which provides authorization for freely use. https://www.fsa.usda.gov/help/accessibility-statement
Wei Wang, University of Wisconsin, Madison
Boyuan Lu, University of Wisconsin, Madison
Yihan Li, University of Wisconsin, Madison
Weiyan Shi, Singapore University of Technology and Design
@ARTICLE{11125715,
author={Wang, Wei and Lu, Boyuan and Li, Yihan and Shi, Weiyan},
journal={IEEE Data Descriptions},
title={Descriptor: Coastal Aerial Imagery Dataset for Shoreline Segmentation (CAID)},
year={2025},
volume={},
number={},
pages={286 - 295},
keywords={Sea measurements;Image segmentation;Benchmark testing;Accuracy;Labeling;Training;Lakes;Image edge detection;Boats;Algae;Aerial imagery;coastal;shoreline;segmentation;the Great Lakes},
doi={10.1109/IEEEDATA.2025.3599116}}W. Wang, B. Lu, Y. Li and W. Shi, "Descriptor: Coastal Aerial Imagery Dataset for Shoreline Segmentation (CAID)," in IEEE Data Descriptions, doi: 10.1109/IEEEDATA.2025.3599116.
We host a Kaggle competition at
Boyuan Lu and Wei Wang. Coastal shoreline segmentation. https://kaggle.com/competitions/coastal-shoreline-segmentation, 2025. Kaggle.

