Awesome
COPLE-Net: COVID-19 Pneumonia Lesion segmentation network
This repository provides source code and pretrained model of COPLE-Net for COVID-19 pneumonia lesion segmentation proposed by G. Wang et al.[1]. If you use this code or the pretrained model, please cite the following paper:
- [1] G. Wang, X. Liu, C. Li, Z. Xu, J. Ruan, H. Zhu, T. Meng, K. Li, N. Huang, S. Zhang. A Noise-robust Framework for Automatic Segmentation of COVID-19 Pneumonia Lesions from CT Images. IEEE Transactions on Medical Imaging. 2020. DOI: 10.1109/TMI.2020.3000314
A segmentation example. (a) one slice of a CT volume. (b) segmentation by COPLE-Net (green) compared with the ground truth (orange). (c) 3D visualization.
The structure of COPLE-Net. It employes a concatenation of max-pooling and average pooling to reduce information loss during down-sampling, and uses bridge layers to alleviate the semantic gap between features from the encoder and the decoder. ASPP block is used at the bottleneck to better deal with lesions at multiple scales.
Dataset
Based on this project, we have also released a dataset named as UESTC-COVID-19 Dataset
, which consists of 120 3D CT scans, where 70 volumes were annotated by non-experts and 50 volumes were annotated by experts. Click here to request for access.
Requirements
- Pytorch version >=1.0.1.
- PyMIC, a Pytorch-based toolkit for medical image computing. Version 0.2.3 is required. Install it by
pip install PYMIC==0.2.3
. - Some basic python packages such as Numpy, Pandas, SimpleITK.
Third-party Implementations
COPLE-Net has also been implemented in MONAI, a PyTorch-based, open-source framework for deep learning in healthcare imaging. Thanks Dr. Wenqi Li for the re-implementation and you can find it here.
How to use
- Download the pretrained model and example CT images from Google Drive or Baidu Netdisk (extract code q0ci). Put them into the folder
coplenet_data
. - Run
python coplenet_run.py test config/config.cfg
. The results will be saved incoplenet_data/result
. - To segment COVID-19 pneumonia lesions from your own images, make sure that the images have been cropped into the lung region, and the intensity has been normalized into [0, 1] using window width/level of 1500/-650. Open the configure file
config/config.cfg
and editroot_dir
,test_csv
andoutput_dir
according to the path of your images. Then return to step 2 to obtain the segmentation results.
How to train COPLE-Net
Training of COPLE-Net was implemented with PyMIC.
Just follow these examples for using PyMIC for network training and testing.
You may need to custormize the configure files to use different network structures, preprocessing methods and loss functions.