AtlasPatch
1
license:cc-by-nc-sa-4.0
by
AtlasAnalyticsLab
Image Model
OTHER
New
0 downloads
Early-stage
Edge AI:
Mobile
Laptop
Server
Unknown
Mobile
Laptop
Server
Quick Summary
AI model with specialized capabilities.
Code Examples
1) Config: packaged SAM2 Hiera-T config; leave checkpoint_path=None to auto-download from HF.pythonpytorch
import numpy as np
import torch
from pathlib import Path
from PIL import Image
from importlib.resources import files
from atlas_patch.core.config import SegmentationConfig
from atlas_patch.services.segmentation import SAM2SegmentationService
from atlas_patch.core.wsi import WSIFactory
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
# 1) Config: packaged SAM2 Hiera-T config; leave checkpoint_path=None to auto-download from HF.
cfg_path = Path(files("atlas_patch.configs") / "sam2.1_hiera_t.yaml")
seg_cfg = SegmentationConfig(
checkpoint_path=None, # downloads Atlas-Patch/model.pth from Hugging Face
config_path=cfg_path,
device=str(device),
batch_size=1,
thumbnail_power=1.25,
thumbnail_max=1024,
mask_threshold=0.0,
)
segmenter = SAM2SegmentationService(seg_cfg)
# 2) Load a WSI and segment the thumbnail.
wsi = WSIFactory.load("slide.svs") # backend auto-detected (e.g., openslide)
mask = segmenter.segment_thumbnail(wsi) # mask.data matches the thumbnail size
# 3) Save the mask.
mask_img = Image.fromarray((mask.data > 0).astype(np.uint8) * 255)
mask_img.save("thumbnail_mask.png")Deploy This Model
Production-ready deployment in minutes
Together.ai
Instant API access to this model
Production-ready inference API. Start free, scale to millions.
Try Free APIReplicate
One-click model deployment
Run models in the cloud with simple API. No DevOps required.
Deploy NowDisclosure: We may earn a commission from these partners. This helps keep LLMYourWay free.