tencent-ailab / RLogist

RLogist = RL (reinforcement learning) + Pathologist
65 stars 8 forks source link

RLogist

RLogist: Fast Observation Strategy on Whole-slide Images with Deep Reinforcement Learning

(paper accepted by AAAI 2023)

Fully Automated Run

Data Preparation

The data used for training and testing are expected to be organized as follows:

DATA_DIRECTORY/
    ├── slide_1.tif
    ├── slide_2.tif
    └── ...

Automated Run

python main.py --source DATA_DIRECTORY --label_list LABEL_LIST.csv

The script automatically reads the dataset and the corresponding labels for training.

The segmentation and patching settings can be configured in create_patches.py, training parameters for RLogist can be configured in main.py (RL algorithm-specific hyper-parameters in source file like ppo.py)

Evaluation

python eval_model.py --input_dir DATA_DIRECTORY --config_file CONFIG.yaml

The script automatically loads the model and reads the dataset and the corresponding labels for evaluation.

Components

Follow the Guidance in corresponding directories:

RL_env Test

python WSI_observation_env.py

CLAM classifier Pretrain

python train_CLAM_model.py