The overall model architecture is as follows. Categorical classification and sequential relationship classification problems are performed simultaneously.
All the models in this project were evaluated on the following datasets:
- Colon_KBSMC (Colon TMA from Kangbuk Samsung Hospital)
- Colon_KBSMC (Colon WSI from Kangbuk Samsung Hospital)
- Gastric_KBSMC (Gastric from Kangbuk Samsung Hospital)
Install dependencies
# clone project
git clone https://github.com/Leejucheon96/Order-ViT.git
# [OPTIONAL] create conda environment
conda env create -f order_vit_environment.yml
conda activate order_vit_environment
#We install Pytorch version 1.10.0 with CUDA 11.4
/config: data and model parameter setting
/scripts: .sh file
/src: data load and augmentation, model code
## Only Categorical classification
# model.name = timm model name & ../train_test: Code for validating different datasets using the best model
Using /scripts/classification.sh
## Order-learning
# ../train_test: Code for validating different datasets using the best model
Using /scripts/order_learning.sh
## feature extracture for voting (Using mamory bank)
# Feature vectors for voting through the following paths are selected in advance.: ../src/models/save_features_module.py
Using /scripts/features.sh
## voting
# sub_prob: First prob - Second prob
# trust: Meaning validated datasets described in the paper
(How to correctly predict among feature vectors extracted through features.sh and select a picture vector with a probability of 0.9 or higher at the time)
Using /scripts/voting.sh