Skip to content

AngeloUNIMI/HistoTNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧬 HistoTNet

Histopathological Transfer Learning for Acute Lymphoblastic Leukemia Detection

Python PyTorch License: GPL v3 Paper Project Page

Source code for the IEEE CIVEMSA 2021 paper
Histopathological transfer learning for Acute Lymphoblastic Leukemia detection


🧠 Overview

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:

  1. HistoNet β€” a histopathology network trained on the Atlas of Digital Pathology (ADP) dataset.
  2. 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.


πŸ”¬ Method at a Glance

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]
Loading

Core idea

Large histopathology dataset
        β”‚
        β–Ό
HistoNet representation learning
        β”‚
        β–Ό
Transferred model initialization
        β”‚
        β–Ό
HistoTNet fine-tuning on ALL-IDB
        β”‚
        β–Ό
Acute Lymphoblastic Leukemia classification

πŸ“ Repository Structure

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

πŸš€ Getting Started

1. Clone the repository

git clone https://github.com/AngeloUNIMI/HistoTNet.git
cd HistoTNet

2. Install dependencies

Install the Python packages listed in:

packages.txt

For example:

pip install -r packages.txt

A virtual environment is recommended:

python -m venv .venv
.venv\Scripts\activate   # Windows
# source .venv/bin/activate   # Linux/macOS
pip install -r packages.txt

πŸ§ͺ Datasets

This project uses two biomedical image datasets.

1. Atlas of Digital Pathology (ADP)

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/

2. ALL-IDB

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/

βš™οΈ Usage

Step 1 β€” Train HistoNet on ADP

Move into the HistoNet folder:

cd "(1) PyTorch_HistoNet"

Run:

python pytorch_histonet.py

This trains/tests the HistoNet model on ADP histopathology patches.


Step 2 β€” Transfer pretrained models

Copy the trained HistoNet models into:

(2) PyTorch_HistoTNet/pretrained_nets/

Some pretrained models may already be included for convenience.


Step 3 β€” Train HistoTNet on ALL-IDB

Move into the HistoTNet folder:

cd "../(2) PyTorch_HistoTNet"

Run:

python pytorch_histotnet.py

This trains/tests the transfer-learning network for ALL detection.


πŸ“Š Outputs

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

πŸ“š Related Datasets and References

Atlas of Digital Pathology

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.

ALL-IDB

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


πŸ“– Paper

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

πŸ‘₯ Authors

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


πŸ“„ License

This project is released under the GNU General Public License v3.0.

See the LICENSE file for details.

About

Source code for the 2021 CIVEMSA paper "Histopathological transfer learning for Acute Lymphoblastic Leukemia detection"

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages