Views
No views yet
1git clone https://github.com/mkoohim/PathoGen.git
2cd PathoGen
3pip install -r requirements.txt1from huggingface_hub import hf_hub_download
2
3# Download attention weights
4hf_hub_download(
5 repo_id="mkoohim/PathoGen",
6 filename="attention.pt",
7 local_dir="./checkpoints"
8)1from src.models.pathogen import PathoGenModel
2from omegaconf import OmegaConf
3from PIL import Image
4
5# Load configuration
6config = OmegaConf.load("configs/config.yaml")
7
8# Initialize model
9model = PathoGenModel(config)
10model.load_attention_weights("./checkpoints/attention.pt")
11model.eval()
12
13# Load images
14image = Image.open("your_wsi_crop.jpg")
15mask = Image.open("your_mask.jpg")
16condition = Image.open("your_source_image.jpg")
17
18# Run inference
19result = model(image, mask, condition)python train.py| File | Description | Size |
|---|---|---|
attention.pt | Trained attention module weights | ~190MB |
1@misc{pathogen2025,
2 title={PathoGen: Diffusion-Based Synthesis of Realistic Lesions in Histopathology Images},
3 author={mkoohim},
4 year={2025},
5 url={https://huggingface.co/mkoohim/PathoGen}
6}