WaterWave is a BasicSR-based project for underwater enhancement.
It focuses on common underwater degradations such as:
- color cast (blue/green shift)
- low contrast and haze-like appearance
- texture/detail attenuation
- temporal flicker and instability in video sequences
The current primary training config uses the WaveField model in options/train/0.yml.
options/train/0.yml: main training config (model_type: WaveField)basicsr/train.py: training entrybasicsr/test.py: test entryscripts/dist_train.sh: distributed training scriptscripts/dist_test.sh: distributed testing scriptflow_estimate/: optical-flow preprocessing and related tools
Recommended: Python 3.8+ and PyTorch 1.10+ (matching your CUDA version).
cd WaterWave
pip install -r requirements.txt
pip install -v -e .The default paths in options/train/0.yml include:
datasets/uw3_mini(GT/training data)dataroot_flow(optical flow)dataroot_flow_conf(optical-flow confidence)
Update these paths to your local environment before running training.
python basicsr/train.py -opt options/train/0.ymlbash scripts/dist_train.sh 2 options/train/0.ymlpython basicsr/test.py -opt options/train/0.ymlbash scripts/dist_test.sh 2 options/train/0.ymlTraining/testing outputs are typically written to:
experiments/<exp_name>/results/<exp_name>/
<exp_name> comes from the name field in the config (currently wavewater).
-
basicsr/train.pycurrently contains a hardcoded path append:sys.path.append('/home/ubuntu/data/code/waterwave_code')- If your path is different, switch this to a project-relative path to avoid cross-machine issues.
-
options/train/0.ymlis a runnable template. Before formal experiments, tune it based on your data scale:total_iterbatch_size_per_gpunum_frame- learning rate and scheduler
This project is built on top of BasicSR.
Please refer to LICENSE and LICENSE.txt for upstream licensing and third-party notices.