Awesome
WaterMask
This repo is the official implementation of "WaterMask: Instance Segmentation for Underwater Imagery". By Shijie Lian, Hua Li, Runmin Cong, Suqi Li, Wei Zhang, Sam Kwong, and has been accepted by ICCV2023! 🎉🎉🎉
:rocket: Highlights:
-
UIIS dataset: We construct the first general Underwater Image Instance Segmentation (UIIS) dataset containing 4,628 images for 7 categories with pixel-level annotations for underwater instance segmentation task.
-
SOTA performance: We propose the first underwater instance segmentation model, WaterMask, as far as we know, which achieves good performance in qualitative and quantitative comparisons with natural image instance segmentation SOTA methods.
Requirements
- Python 3.6+
- Pytorch 1.3+
- mmcv-full>=1.3.17, <1.6.0 (we use mmcv 1.5.3 and mmdetection 2.25.1 in code)
and you need use pip install -v -e .
to install mmdetection.
Datasets
Please create a data folder in your working directory and put the UIIS dataset in it for training or testing. UIIS is divided into two parts, with 3937 images for training and 691 images for testing.
data
├── UDW
| ├── annotations
│ │ │ ├── train.json
│ │ │ ├── val.json
│ ├── train
│ │ ├── L_1.jpg
│ │ ├── ......
│ ├── ......
you can get our UIIS dataset in Baidu Disk (pwd:fiuk) or Google Drive
Main Results
We provide some results on UIIS dataset with pretrained models. These model are trained on an NVIDIA A5000 GPU. Note that all models and logs are available at Baidu Netdisk and google drive link is coming soon too!.
model | Schedule | mAP | AP50 | AP75 | config | download |
---|---|---|---|---|---|---|
WaterMask R101-FPN | 1x | 25.6 | 41.7 | 27.9 | config | log / pth |
WaterMask R50-FPN | 3x | 26.4 | 43.6 | 28.8 | config | log / pth |
WaterMask R101-FPN | 3x | 27.2 | 43.7 | 29.3 | config | log / pth |
Cascade WaterMask R101-FPN | 3x | 27.1 | 42.9 | 30.4 | config | log / pth |
Training
python tools/train.py configs/_our_/water_r50_fpn_1x.py --work-dir you_dir_to_save_logs_and_models
or
bash tools/dist_train.sh configs/_our_/water_r50_fpn_1x.py NUM_GPUS --work-dir you_dir_to_save_logs_and_models
Test
python tools/test.py configs/_our_/water_r50_fpn_1x.py model_checkpoint_path --eval segm
or
bash tools/dist_test.sh configs/_our_/water_r50_fpn_1x.py model_checkpoint_path NUM_GPUS --eval segm
Citation
If you find our repo useful for your research, please cite us:
@InProceedings{Lian_2023_ICCV,
author = {Lian, Shijie and Li, Hua and Cong, Runmin and Li, Suqi and Zhang, Wei and Kwong, Sam},
title = {WaterMask: Instance Segmentation for Underwater Imagery},
booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
month = {October},
year = {2023},
pages = {1305-1315}
}
License
This project is released under the Apache 2.0 license.
Acknowledgement
This software repository is implemented based on the MMDetection framework. Thanks to them for their excellent work.