EXAONE Path 1.5 is a whole slide image level(WSI-level) classification framework designed for downstream tasks in pathology, such as cancer subtyping, molecular subtyping and mutation prediction. It builds upon our previous work, EXAONE Path v1.0, which focused on patch-wise feature extraction by dividing a WSI into patches and embedding each patch into a feature vector.
In EXAONE Path 1.5, we extend this pipeline to take an entire WSI as input. Each patch is first processed using the pretrained EXAONE Path 1.0 encoder to extract patch-level features. These features are then aggregated using a ViT-based (Vision Transformer) aggregator module to produce a slide-level representation.
This aggregated representation is subsequently passed through a linear classifier to perform downstream tasks such as molecular subtyping, tumor subtyping, and mutation prediction.
To effectively train the aggregator, we adopt a two-stage learning process:
Pretraining: We employ multimodal learning by aligning slide images with various mRNA gene expression profiles to learn semantically meaningful slide-level representations.
Fine-tuning: The pretrained model is then adapted to specific downstream classification tasks.
In this repository, we release the model trained for EGFR mutation prediction in lung adenocarcinoma (LUAD), enabling researchers to leverage our pipeline for similar molecular pathology applications.
Quickstart
1. Hardware Requirements
NVIDIA GPU is required
Minimum 40GB GPU memory recommended
Tested on Ubuntu 22.04 with NVIDIA driver version 550.144.03
Note: This implementation requires NVIDIA GPU and drivers. The provided environment setup specifically uses CUDA-enabled PyTorch, making NVIDIA GPU mandatory for running the model.
2. Environment Setup
pip install -r requirements.txt
3-a. Load the model & Inference
Load model with HuggingFace
from models.exaonepath import EXAONEPathV1p5Downstream
hf_token = "YOUR_HUGGING_FACE_ACCESS_TOKEN"
model = EXAONEPathV1p5Downstream.from_pretrained("LGAI-EXAONE/EXAONE-Path-1.5", use_auth_token=hf_token)
slide_path = './samples/wsis/1/1.svs'
probs = model(slide_path)
Fast CLI Inference
Before running the command below, make sure you update your Hugging Face token.
Open
tokens.py
and replace the placeholder with your actual token:
We provide example scripts and files to help you fine-tune the model on your own dataset.
The provided script fine-tunes the model using pretrained weights stored in
./pretrained_weight.pth
.
Extract Features from WSI Images
To train the model using WSI images and their corresponding labels,
you must first extract patch-level features from each WSI using our provided feature extractor.
EXAONE-Path-1.5 huggingface.co is an AI model on huggingface.co that provides EXAONE-Path-1.5's model effect (), which can be used instantly with this LGAI-EXAONE EXAONE-Path-1.5 model. huggingface.co supports a free trial of the EXAONE-Path-1.5 model, and also provides paid use of the EXAONE-Path-1.5. Support call EXAONE-Path-1.5 model through api, including Node.js, Python, http.
EXAONE-Path-1.5 huggingface.co is an online trial and call api platform, which integrates EXAONE-Path-1.5's modeling effects, including api services, and provides a free online trial of EXAONE-Path-1.5, you can try EXAONE-Path-1.5 online for free by clicking the link below.
LGAI-EXAONE EXAONE-Path-1.5 online free url in huggingface.co:
EXAONE-Path-1.5 is an open source model from GitHub that offers a free installation service, and any user can find EXAONE-Path-1.5 on GitHub to install. At the same time, huggingface.co provides the effect of EXAONE-Path-1.5 install, users can directly use EXAONE-Path-1.5 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.