A High-Efficiency and Adaptive Deep Network for Bridge Cable Surface Defect Segmentation
This is a PyTorch(1.8.0) implementation of Trans-DCN. It can use Modified backbone as train.py mentioned. Currently, we can train Trans-DCN using Pascal VOC 2012, SBD and Cityscapes datasets.
The code was tested with Anaconda and Python 3.8. After installing the Anaconda environment:
-
Clone the repo:
git clone https://github.com/hzh1231/Trans_dcn.git cd Trans_dcn
-
Install dependencies:
For PyTorch dependency, see pytorch.org for more details.
For custom dependencies:
pip install matplotlib pillow tensorboardX tqdm
Follow steps below to train your model:
-
Configure your dataset path in mypath.py.
-
Input arguments: (see full input arguments via python train.py --help):
python train.py
Follow steps below to test your model:
-
Configure your test data (images) path in predict.py.
-
Input arguments: (see full input arguments via python predict.py --help):
python predict.py