Skip to content

PyTorch implementation for paper "V-FloodNet: A Video Segmentation System for Urban Flood Detection and Quantification", Environmental Modelling & Software, Elsevier (2023)

Notifications You must be signed in to change notification settings

xmlyqing00/V-FloodNet

Repository files navigation

V-FloodNet

This is an official PyTorch implementation for paper "V-FloodNet: A Video Segmentation System for Urban Flood Detection and Quantification".

Environments

We developed and tested the source code under Ubuntu 18.04 and PyTorch framework. The following packages are required to run the code.

First, a python virtual environment is recommended. I use pip to create a virtual environment named env and activate it.

python3 -m venv env
source env/bin/activate

In the virtual environment, install the following required packages from their official instructions.

  • torch, torchvision, from PyTorch. We used v1.8.2+cu111 is used in our code.
  • Detectron2 for reference objects segmentation.
  • MeshTransformer for

We provide the corresponding installation command here

pip install torch==1.8.2+cu111 torchvision==0.9.2+cu111 torchaudio==0.8.2 -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html
pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu111/torch1.8/index.html

Run the image segmentation

python3 test_image_seg.py \
    --test_path=/path/to/image_folder \
    --test_name=<test_name>

Estimate Water Level / Water Depth

Stopsign

python3 est_waterlevel.py \
    --test_name=stopsign \
    --img_dir=/path/to/image_folder \
    --water_mask_dir=./output/test_image_seg/<test_name>/mask
    --opt=stopsign

Skeleton

python3 est_waterlevel.py \
    --test_name=skeleton \
    --img_dir=/path/to/image_folder \
    --water_mask_dir=./output/test_image_seg/<test_name>/mask
    --opt=skeleton

https://tidesandcurrents.noaa.gov/waterlevels.html?id=8443970&type=Tide+Data&name=Boston&state=MA

About

PyTorch implementation for paper "V-FloodNet: A Video Segmentation System for Urban Flood Detection and Quantification", Environmental Modelling & Software, Elsevier (2023)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published