Source code for the IEEE CIVEMSA 2021 paper
Histopathological transfer learning for Acute Lymphoblastic Leukemia detection
HistoTNet is a PyTorch implementation of a transfer-learning framework for Acute Lymphoblastic Leukemia (ALL) detection from microscopic blood-cell images.
The repository contains two related training pipelines:
- HistoNet β a histopathology network trained on the Atlas of Digital Pathology (ADP) dataset.
- HistoTNet β a transfer-learning network that uses the learned histopathological representation for ALL detection on the ALL-IDB dataset.
The method explores how knowledge learned from large-scale histopathological tissue images can support leukemia image classification in a smaller biomedical dataset.
flowchart LR
A[ADP Histopathology Patches] --> B[Train HistoNet]
B --> C[Pretrained Histopathological Models]
C --> D[Transfer to HistoTNet]
E[ALL-IDB Blood Cell Images] --> D
D --> F[ALL Detection]
F --> G[Classification Results]
Large histopathology dataset
β
βΌ
HistoNet representation learning
β
βΌ
Transferred model initialization
β
βΌ
HistoTNet fine-tuning on ALL-IDB
β
βΌ
Acute Lymphoblastic Leukemia classification
HistoTNet/
β
βββ (1) PyTorch_HistoNet/
β βββ pytorch_histonet.py # Train/test HistoNet on ADP
β βββ classes/ # Dataset and model classes
β βββ functions/ # Training/evaluation utilities
β βββ modelGeno/ # Model definitions
β βββ params/ # HistoNet configuration files
β βββ util/ # Helper functions
β βββ db_orig/ADP/ # Expected ADP dataset location
β
βββ (2) PyTorch_HistoTNet/
β βββ pytorch_histotnet.py # Train/test HistoTNet on ALL-IDB
β βββ pretrained_nets/ # Pretrained HistoNet models
β βββ db/ALL_IDB2/ # Expected ALL-IDB dataset location
β
βββ packages.txt # Python package requirements
βββ LICENSE # GPL-3.0 license
βββ README.md
git clone https://github.com/AngeloUNIMI/HistoTNet.git
cd HistoTNetInstall the Python packages listed in:
packages.txt
For example:
pip install -r packages.txtA virtual environment is recommended:
python -m venv .venv
.venv\Scripts\activate # Windows
# source .venv/bin/activate # Linux/macOS
pip install -r packages.txtThis project uses two biomedical image datasets.
Used to train HistoNet.
Expected location:
(1) PyTorch_HistoNet/db_orig/ADP/
Required files include:
(1) PyTorch_HistoNet/db_orig/ADP/img_res_1um_bicubic/
(1) PyTorch_HistoNet/db_orig/ADP/ADP_EncodedLabels_Release1_Flat.csv
Example image path:
(1) PyTorch_HistoNet/db_orig/ADP/img_res_1um_bicubic/001.png_crop_16.png
Dataset page:
https://www.dsp.utoronto.ca/projects/ADP/
Used to train and test HistoTNet for Acute Lymphoblastic Leukemia detection.
Expected location:
(2) PyTorch_HistoTNet/db/ALL_IDB2/
Example image path:
(2) PyTorch_HistoTNet/db/ALL_IDB2/Im001_1.tif
Dataset page:
https://homes.di.unimi.it/scotti/all/
Move into the HistoNet folder:
cd "(1) PyTorch_HistoNet"Run:
python pytorch_histonet.pyThis trains/tests the HistoNet model on ADP histopathology patches.
Copy the trained HistoNet models into:
(2) PyTorch_HistoTNet/pretrained_nets/
Some pretrained models may already be included for convenience.
Move into the HistoTNet folder:
cd "../(2) PyTorch_HistoTNet"Run:
python pytorch_histotnet.pyThis trains/tests the transfer-learning network for ALL detection.
Depending on the selected parameter configuration, the scripts generate training and testing outputs such as:
| Output type | Description |
|---|---|
| Training logs | Epoch-wise learning information |
| Model files | Trained network weights |
| Classification results | ALL detection performance |
| Evaluation summaries | Metrics and experiment outputs |
Mahdi S. Hosseini, Lyndon Chan, Gabriel Tse, Michael Tang, Jun Deng, Sajad Norouzi, Corwyn Rowsell, Konstantinos N. Plataniotis, and Savvas Damaskinos,
βAtlas of Digital Pathology: A Generalized Hierarchical Histological Tissue Type-Annotated Database for Deep Learning,β
Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2019, pp. 11747β11756.
R. Donida Labati, V. Piuri, and F. Scotti,
βALL-IDB: The Acute Lymphoblastic Leukemia Image Database for Image Processing,β
Proc. of the 2011 IEEE International Conference on Image Processing (ICIP 2011), Brussels, Belgium, pp. 2045β2048, September 11β14, 2011.
DOI: 10.1109/ICIP.2011.6115881
If you use this repository, please cite:
@InProceedings{civemsa21all,
author = {A. Genovese and M. S. Hosseini and V. Piuri and K. N. Plataniotis and F. Scotti},
title = {Histopathological transfer learning for Acute Lymphoblastic Leukemia detection},
booktitle = {Proc. of the 2021 IEEE Int. Conf. on Computational Intelligence and Virtual Environments for Measurement Systems and Applications (CIVEMSA 2021)},
month = {June},
day = {18--20},
year = {2021},
pages = {1--6},
isbn = {978-1-6654-1249-0},
doi = {10.1109/CIVEMSA52099.2021.9493677}
}Paper:
https://ieeexplore.ieee.org/document/9493677
Project page:
https://iebil.di.unimi.it/cnnALL/index.htm
Angelo Genovese, Vincenzo Piuri, and Fabio Scotti
Department of Computer Science
UniversitΓ degli Studi di Milano, Italy
Mahdi S. Hosseini and Konstantinos N. Plataniotis
Department of Electrical and Computer Engineering
University of Toronto, Canada
This project is released under the GNU General Public License v3.0.
See the LICENSE file for details.