Thanks to visit codestin.com
Credit goes to github.com

Skip to content

A fourier transform based approach that enhances multiple instance learning to perform whole slide image classification.

Notifications You must be signed in to change notification settings

irulenot/FFT-MIL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Summary

We propose Fourier Transform Multiple Instance Learning (FFT-MIL), a framework that augments MIL for WSI classification with a frequency-domain branch to provide compact global context. Low-frequency crops are extracted from WSIs via the Fast Fourier Transform and processed through a modular FFT-Block composed of convolutional layers and Min-Max normalization to mitigate the high variance of frequency data. The learned global frequency feature is fused with spatial patch features through lightweight integration strategies, enabling compatibility with a diverse set of MIL architectures.

Architecture

Architecture

Setup

1. Install requirements

conda create -n fftmil python=3.9
conda activate fftmil
pip install -r requirements.txt

2. Create data directories

# FFT-MIL refers to the path of the top-level of this repository.
python FFT-MIL/dataset_setup/setup_data_dirs.py 
Expected file structure
/data/fftmil/
├── BRACS/
│   └── images/
├── LUAD/
│   └── images/
└── IMP/
    └── images/

3. Download datasets (Ubuntu 22.04)

cd /data/fftmil/BRACS/
wget --no-parent -r ftp://histoimage.na.icar.cnr.it/
python FFT-MIL/dataset_setup/move_bracs_images.py

B. LUAD

Manually download the Histopathology data to: /data/fftmil/LUAD/

python FFT-MIL/dataset_setup/move_luad_images.py

C. IMP

python FFT-MIL/dataset_setup/download_IMP.py

4. Preprocess images and Setup ACMIL split

A. Create patches

cd FFT-MIL/CLAM/
python create_patches_fp_bracs.py
python create_patches_fp_luad.py
python create_patches_fp_imp.py

B. Create features

cd FFT-MIL/CLAM/
python extract_features_fp_bracs.py
python extract_features_fp_imp.py
python extract_features_fp_luad.py

C. Setup ACMIL Split

cd FFT-MIL/ACMIL/
create_datasets_h5.py

D. Test preprocessing was successful

cd FFT-MIL/CLAM/
create_datasets_h5.py

5. Create frequency representations

Note: You can run multiple instances of each these files in parallel to speed up the process.

cd FFT-MIL/create_ffts/
create_bracs_fft.py
create_imp_fft.py
create_luad_fft.py

Preprocessing

6. Replicate results

Note: Run each file from their DIRECTORY, where the <DATASET> corresponds to the dataset on which you wish to run the experiment.

Method DIRECTORY FILE
CLAM CLAM train_clam_<DATASET>.py
CLAM (Ours) CLAM train_clam_<DATASET>_fft.py
MIL CLAM train_mil_<DATASET>.py
MIL (Ours) CLAM train_mil_<DATASET>_fft.py
Method DIRECTORY FILE
ABMIL ACMIL train_abmil_<DATASET>.py
ABMIL (Ours) ACMIL train_abmil_<DATASET>_fft.py
ACMIL ACMIL train_acmil_<DATASET>.py
ACMIL (Ours) ACMIL train_acmil_<DATASET>_fft.py
IBMIL ACMIL train_ibmil_<DATASET>.py
IBMIL (Ours) ACMIL train_ibmil_<DATASET>_fft.py
Method DIRECTORY FILE
ABMIL DGR train_abmil_<DATASET>.py
ABMIL (Ours) DGR train_abmil_<DATASET>_fft.py
ILRA DGR train_ilra_<DATASET>.py
ILRA (Ours) DGR train_ilra_<DATASET>_fft.py

For example, to run the CLAM method on the BRACS dataset, you would run:

cd FFT-MIL/CLAM/
python train_clam_BRACS.py

References

This repository incorporates code from the following papers.

Notes for Researchers Building Upon This Work

Researchers seeking to build upon this work can consult discussion.zip for additional context, including methodological notes, limitations, and potential avenues for future research.

Citation

If you find this work useful, please cite:

@misc{bilic2025fouriertransformmultipleinstance,
  title={Fourier Transform Multiple Instance Learning for Whole Slide Image Classification},
  author={Anthony Bilic and Guangyu Sun and Ming Li and Md Sanzid Bin Hossain and Yu Tian and Wei Zhang and Laura Brattain and Dexter Hadley and Chen Chen},
  year={2025},
  eprint={2510.15138},
  archivePrefix={arXiv},
  primaryClass={cs.CV},
  url={https://arxiv.org/abs/2510.15138}
}

About

A fourier transform based approach that enhances multiple instance learning to perform whole slide image classification.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages