PyTorch implementation of "Weak Appearance Aware Pipeline Leak Detection based on CNN-Transformer Hybrid Architecture".
1.We propose a visual pipeline leak detection system with a novel segmentation network, namely WDA-Net, that can work with subtle pipeline leaks in real-time and various illumination conditions.
2. We design a novel encoder achieved with the CNN-Transformer hybrid architecture to capture more semantic features of the defects, and a lightweight decoder to fuse the feature maps and gradually recover spatial details. Our method has the most significant improvement effect on extracting features with weak appearance performance.
Model | Dataset | img_size | mIoU | Download |
---|---|---|---|---|
WDA-Net | PLD | 512x512 | 70.04 | model |
WDA-Net | NEU-Seg | 192x192 | 84.55 | model |
The PLD test set is available at [DataSet].
The code was tested on SUSE Linux, with Anaconda Python 3.8 and PyTorch v1.10.0. NVIDIA GPUs are needed for both training and testing. After installing Anaconda:
a. Create a conda virtual environment and activate it.
conda create -n WDA-Net python=3.8 -y
conda activate WDA-Net
b. Install PyTorch and torchvision following the official instructions. Here we use PyTorch 1.10.0 and CUDA 11.1. You may also switch to other version by specifying the version number.
conda install pytorch=1.10.0 torchvision -c pytorch
c. Install MMCV-full 1.5.0 following the official instructions.
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/{cu_version}/{torch_version}/index.html
d. Install MMSegmentation.
pip install mmsegmentation
or
pip install git+https://github.com/open-mmlab/mmsegmentation.git
sh tools/dist_train.sh ${CONFIG_FILE} 1 [optional arguments]
sh tools/dist_train.sh ${CONFIG_FILE} ${GPU_NUM} [optional arguments]
sh tools/dist_test.sh ${CONFIG_FILE} 1 [optional arguments]