This notebook demonstrate how to use the Explainable AI API for PyTorch CNN and Transformer models in a multimodal architecture. This notebook also includes the Intel® Transfer Learning Tool and the Intel® Extension for Transformers library.
Multimodal_Cancer_Detection.ipynb
performs the following steps:
- Import dependencies
- Prepare image and text datasets
- CNN image classification
- Analyze image dataset
- Get the model
- Download and prepare the dataset
- Transfer learning
- Evaluate
- Error Analysis
- Explanation
- BERT text classification
- Analyze text dataset
- Get the model
- Prepare the dataset
- Transfer learning
- Evaluate
- Error Analysis
- Explanation
- Post-training quantization
- Configure and quantize the current BERT model
- Evaluate
- Error Analysis
The dataset_utils.py
holds the supporting functions that prepare the image and text datasets.
To run Multimodal_Cancer_Detection.ipynb
, install the following dependencies:
- Intel® Explainable AI
- Further dependencies to be installed in the notebook
Khaled R., Helal M., Alfarghaly O., Mokhtar O., Elkorany A., El Kassas H., Fahmy A. Categorized Digital Database for Low energy and Subtracted Contrast Enhanced Spectral Mammography images [Dataset]. (2021) The Cancer Imaging Archive. DOI: 10.7937/29kw-ae92
Khaled, R., Helal, M., Alfarghaly, O., Mokhtar, O., Elkorany, A., El Kassas, H., & Fahmy, A. Categorized contrast enhanced mammography dataset for diagnostic and artificial intelligence research. (2022) Scientific Data, Volume 9, Issue 1. DOI: 10.1038/s41597-022-01238-0
Clark K, Vendt B, Smith K, Freymann J, Kirby J, Koppel P, Moore S, Phillips S, Maffitt D, Pringle M, Tarbox L, Prior F. The Cancer Imaging Archive (TCIA): Maintaining and Operating a Public Information Repository, Journal of Digital Imaging, Volume 26, Number 6, December, 2013, pp 1045-1057. DOI: 10.1007/s10278-013-9622-7