Sovereign 8s.is mirror of standardgalactic/RECAP-PATH
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-02-06 11:56:34 -08:00
diversity Update optimizers.py 2025-09-15 14:04:30 -07:00
file_names first commit 2025-08-04 15:58:17 -07:00
preprocess first commit 2025-08-04 15:58:17 -07:00
prompt_optimization Update optimizers.py 2025-09-15 13:56:58 -07:00
prompts Create BRACS_multi_generate.md 2025-09-15 13:52:37 -07:00
classification.py Update classification.py 2025-09-15 13:58:40 -07:00
config.py first commit 2025-08-04 15:58:17 -07:00
evaluators.py first commit 2025-08-04 15:58:17 -07:00
generator.py first commit 2025-08-04 15:58:17 -07:00
LICENSE Create LICENSE 2026-02-06 11:56:34 -08:00
predictors.py first commit 2025-08-04 15:58:17 -07:00
README.md update readme 2025-12-09 10:48:40 -08:00
scorers.py first commit 2025-08-04 15:58:17 -07:00
tasks.py Update tasks.py 2025-09-15 13:34:34 -07:00
utils.py first commit 2025-08-04 15:58:17 -07:00
zero_shot.py Update zero_shot.py 2025-09-15 13:59:23 -07:00

Paper: Adaptive Diagnostic Reasoning Framework for Pathology with Multimodal Large Language Models

RECAP-PATH (REasoning and Classification via Automated Prompting in PATHology images)

Dataset

BRACS: BReAst Carcinoma Subtyping

Data Download

https://www.bracs.icar.cnr.it/download/

BACH: BreAst Cancer Histology

Data Download

https://www.bracs.icar.cnr.it/download/

SICAPv2: Prostate Whole Slide Images with Gleason Grades Annotations

Data Download

https://www.bracs.icar.cnr.it/download/

Preprocess

To make sure all images are less than 20MB to satisfy the OpenAI API requirements. For datasets/BRACS/BRACS_RoI/latest_version/test/0_N

python compress.py --set test --class_dir 0_N

Prepare the image paths for training:

python img_file_name.py --set test --class_dir 0_N

Baselines

Zero shot

python zero_shot.py --model gemini --task BRACS --mode test --n_test 30 --out_num 1

Phase-I: Optimizing Diversity

cd diversity
python main.py --task BRACS --model gemini --gradient_model gemini --out_num 1

Phase-II: Optimizing Accuracy

cd prompt_optimization
python main_BRACS.py --reject_on_errors --task BRACS --diverse_init --diverse_exp 1 --class0 N --class1 IC --out_num 1

For usage instructions. Some of the arguments include:

  • --task: Task name like 'BRACS', 'BRACS_multi', 'BACH', 'SICAPv2'.
  • --data_dir: Directory where the task data file resides.
  • --diverse_init: Whether to use diverse initial prompts from Phase I.
  • --diverse_exp: Phase I output name.
  • --out: Output name.
  • --max_threads: Maximum number of threads to be used.
  • --val_score: Whether to use validation set.
  • --class0: class 0 Name (Ex: N, DCIS)
  • --class1: class 1 Name (Ex: I, C, IC)

After optimization evaluation

python classification.py --generate --task BRACS --result_folder prompt_optimization --mode test --n_test 30 --exp 1 --prompt_idx 1 --out_num 1
  • --generate: To generate new descriptions for images.

Cite

@article{hong2025adaptive,
  title={Adaptive Diagnostic Reasoning Framework for Pathology with Multimodal Large Language Models},
  author={Hong, Yunqi and Kao, Johnson and Edwards, Liam and Liu, Nein-Tzu and Huang, Chung-Yen and Oliveira-Kowaleski, Alex and Hsieh, Cho-Jui and Lin, Neil YC},
  journal={arXiv preprint arXiv:2511.12008},
  year={2025}
}