CapsCovNet is a modified capsule network designed to diagnose COVID-19 from multimodal medical images. This model integrates discriminative spatial features through parallelly concatenated convolutional blocks with different filter sizes and enhances scalability by varying the receptive field. The concatenation of capsule layers allows the model to learn complex representations, presenting information in a fine-to-coarser manner.
- Parallelly concatenated convolutional blocks to integrate spatial features.
- Capsule layers to handle complex representations and high-dimensional data.
- Evaluated on benchmark datasets: chest radiograph and ultrasound imaging.
- Demonstrates superior performance in COVID-19 detection compared to state-of-the-art models.
- Python 3.6 or higher
- TensorFlow 2.x
- Keras
- NumPy
- OpenCV
- Scikit-learn
- Matplotlib
-
Clone the repository:
git clone https://github.com/afmsaif/CapsCovNet-AModified-CapsuleNetwork-to-Diagnose-Covid-19-from-Multimodal-Medical-Imaging.git cd CapsCovNet-AModified-CapsuleNetwork-to-Diagnose-Covid-19-from-Multimodal-Medical-Imaging
-
Install the required packages:
pip install -r requirements.txt
The model is evaluated on three benchmark datasets:
- Two chest radiograph datasets.
- One ultrasound imaging dataset.
-
Preprocess the data:
python preprocess.py
-
Train the model:
python train.py
-
Evaluate the model:
python evaluate.py
The CapsCovNet architecture consists of:
- Parallel Convolutional Encoder Block: Reduces the input data size and incorporates fine-grained and discriminative features using larger receptive fields.
- Primary Capsule Layer: Converts feature maps into vectors and applies a nonlinear Squash function to keep vector lengths within value 1.
- Higher Layer Capsule: Uses routing by agreement to calculate coupling coefficients between capsules.
- Loss Function: Margin loss for each digit capsule to ensure intraclass compactness and interclass separability.
The proposed model achieved outstanding performance in COVID-19 detection, surpassing the previous state-of-the-art models. Detailed results and analysis can be found in the paper.
- A. F. M. Saif, Bangladesh University of Engineering and Technology
- Tamjid Imtiaz, Bangladesh University of Engineering and Technology
- Shahriar Rifat, Bangladesh University of Engineering and Technology
- Celia Shahnaz, Bangladesh University of Engineering and Technology
- Wei-Ping Zhu, Concordia University
- M. Omair Ahmad, Concordia University
If you use this code in your research, please cite our paper:
@article{saif2021capscovnet,
title={CapsCovNet: A modified capsule network to diagnose Covid-19 from multimodal medical imaging},
author={Saif, AFM and Imtiaz, Tamjid and Rifat, Shahriar and Shahnaz, Celia and Zhu, Wei-Ping and Ahmad, M Omair},
journal={IEEE Transactions on Artificial Intelligence},
volume={2},
number={6},
pages={608--617},
year={2021},
publisher={IEEE}
}
This project is licensed under the terms of the MIT license.
This work was supported in part by the Natural Sciences and Engineering Research Council of Canada and the Regroupment Strategique en Microelectronique du Quebec.