Skip to content

AngeloUNIMI/ALLNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧬 ALLNet

Acute Lymphoblastic Leukemia Detection using Lightweight Convolutional Networks

Python PyTorch Torchvision License: GPL v3 Paper Project Page

Source code for the IEEE CIVEMSA 2022 paper
ALLNet: Acute Lymphoblastic Leukemia Detection using lightweight convolutional networks


πŸ”¬ Overview

ALLNet is a lightweight deep-learning pipeline for Acute Lymphoblastic Leukemia (ALL) detection from blood-cell images.

The repository implements a two-stage transfer-learning workflow:

  1. Pre-training a lightweight convolutional network on the Atlas of Digital Pathology (ADP) dataset.
  2. Fine-tuning the pre-trained model on the ALL-IDB dataset for ALL detection.

The approach is designed to exploit histopathological pre-training and adapt the learned visual representations to leukemic-cell classification.


🧠 Method at a Glance

ALLNet outline

ADP histopathology patches
        β”‚
        β–Ό
LBCNN / lightweight CNN pre-training
        β”‚
        β–Ό
Pre-trained models
        β”‚
        β–Ό
Fine-tuning on ALL-IDB blood-cell images
        β”‚
        β–Ό
Acute Lymphoblastic Leukemia detection

✨ Key Features

  • 🧬 ALL detection from microscopic blood-cell images
  • ⚑ Lightweight convolutional architecture based on LBCNN components
  • πŸ” Transfer-learning workflow from ADP to ALL-IDB
  • πŸ§ͺ Two-stage experimental pipeline: pre-training and fine-tuning
  • 🐍 Python / PyTorch implementation
  • πŸ“„ Reproducible code accompanying the IEEE CIVEMSA 2022 paper

πŸ“ Repository Structure

ALLNet/
β”‚
β”œβ”€β”€ 0_PyTorch_ADP_HistoNet_LBCNN/
β”‚   β”œβ”€β”€ pytorch_adp_histonet.py
β”‚   └── lbcnn_pytorch/
β”‚       └── requirements.txt
β”‚
β”œβ”€β”€ 1_PyTorch_ADP_HistoNet_LBCNN_fineTune_ALL_IDB/
β”‚   β”œβ”€β”€ pytorch_adp_histonet_finetune_all.py
β”‚   β”œβ”€β”€ pretrained_nets/
β”‚   └── lbcnn_pytorch/
β”‚       └── requirements.txt
β”‚
β”œβ”€β”€ LICENSE
└── README.md

πŸš€ Getting Started

1. Clone the repository

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

2. Create a Python environment

Using Conda:

conda create -n allnet python=3.7
conda activate allnet

Install the required packages from the corresponding experiment folder:

cd 0_PyTorch_ADP_HistoNet_LBCNN/lbcnn_pytorch
pip install -r requirements.txt

The repository dependency graph reports the main framework versions as:

pytorch == 1.4.0
torchvision == 0.5.0
tqdm

πŸ—‚ Dataset Preparation

ADP dataset for pre-training

Download the Atlas of Digital Pathology (ADP) dataset from:

https://www.dsp.utoronto.ca/projects/ADP/

Expected files and folders:

ADP/img_res_1um_bicubic/
ADP/ADP_EncodedLabels_Release1_Flat.csv

The ADP images should be split into patches following the dataset instructions.

ALL-IDB dataset for fine-tuning

Download the Acute Lymphoblastic Leukemia Image Database for Image Processing (ALL-IDB) from:

https://homes.di.unimi.it/scotti/all/

Expected folder:

ALL_IDB2/

πŸƒ Running the Pipeline

Step 1 β€” Pre-train on ADP

cd 0_PyTorch_ADP_HistoNet_LBCNN
python pytorch_adp_histonet.py

This step trains the lightweight CNN on the ADP histopathology database.

Step 2 β€” Copy pre-trained models

Copy the generated models into:

1_PyTorch_ADP_HistoNet_LBCNN_fineTune_ALL_IDB/pretrained_nets/

Some pre-trained models may already be included for convenience.

Step 3 β€” Fine-tune on ALL-IDB

cd 1_PyTorch_ADP_HistoNet_LBCNN_fineTune_ALL_IDB
python pytorch_adp_histonet_finetune_all.py

This step fine-tunes the network for Acute Lymphoblastic Leukemia detection on ALL-IDB.


πŸ“Š Expected Workflow Outputs

Depending on the script configuration, the pipeline can produce:

Stage Output
ADP pre-training Trained lightweight CNN models
Model transfer Pre-trained checkpoints for fine-tuning
ALL-IDB fine-tuning ALL classification model
Evaluation Classification performance on ALL-IDB

πŸ“š Datasets

Dataset Purpose Link
ADP β€” Atlas of Digital Pathology Histopathology pre-training https://www.dsp.utoronto.ca/projects/ADP/
ALL-IDB Acute Lymphoblastic Leukemia detection https://homes.di.unimi.it/scotti/all/

ADP Reference

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 Reference

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 code, please cite:

@InProceedings{civemsa22_all,
  author    = {A. Genovese},
  booktitle = {Proc. of the 2022 IEEE Int. Conf. on Computational Intelligence and Virtual Environments for Measurement Systems and Applications (CIVEMSA 2022)},
  title     = {ALLNet: Acute Lymphoblastic Leukemia Detection using lightweight convolutional networks},
  address   = {Chemnitz, Germany},
  pages     = {1--6},
  month     = {June},
  day       = {15--17},
  year      = {2022},
  note      = {Accepted}
}

Paper:

https://ieeexplore.ieee.org/document/9853691

Project page:

https://iebil.di.unimi.it/cnnALL/index.htm

πŸ‘€ Author

Angelo Genovese
Department of Computer Science
UniversitΓ  degli Studi di Milano, Italy


πŸ“„ License

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

See the LICENSE file for details.

About

Source code for the 2022 CIVEMSA paper "ALLNet: Acute Lymphoblastic Leukemia detection using lightweight convolutional networks"

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages