Instructions to use AtlasAnalyticsLab/AtlasPatch with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sam2
How to use AtlasAnalyticsLab/AtlasPatch with sam2:
# Use SAM2 with images import torch from sam2.sam2_image_predictor import SAM2ImagePredictor predictor = SAM2ImagePredictor.from_pretrained(AtlasAnalyticsLab/AtlasPatch) with torch.inference_mode(), torch.autocast("cuda", dtype=torch.bfloat16): predictor.set_image(<your_image>) masks, _, _ = predictor.predict(<input_prompts>)# Use SAM2 with videos import torch from sam2.sam2_video_predictor import SAM2VideoPredictor predictor = SAM2VideoPredictor.from_pretrained(AtlasAnalyticsLab/AtlasPatch) with torch.inference_mode(), torch.autocast("cuda", dtype=torch.bfloat16): state = predictor.init_state(<your_video>) # add new prompts and instantly get the output on the same frame frame_idx, object_ids, masks = predictor.add_new_points(state, <your_prompts>): # propagate the prompts to get masklets throughout the video for frame_idx, object_ids, masks in predictor.propagate_in_video(state): ... - Notebooks
- Google Colab
- Kaggle
Link paper and project page to model card
#1
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
---
|
| 2 |
-
license: cc-by-nc-sa-4.0
|
| 3 |
language:
|
| 4 |
- en
|
| 5 |
library_name: sam2
|
|
|
|
| 6 |
pipeline_tag: image-segmentation
|
| 7 |
tags:
|
| 8 |
- whole-slide-imaging
|
|
@@ -13,7 +13,11 @@ tags:
|
|
| 13 |
|
| 14 |
# AtlasPatch: Whole-Slide Image Tissue Segmentation
|
| 15 |
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
## Quickstart
|
| 19 |
|
|
@@ -89,8 +93,8 @@ If you use this model, please cite our paper:
|
|
| 89 |
@article{atlaspatch2025,
|
| 90 |
title = {AtlasPatch: An Efficient and Scalable Tool for Whole Slide Image Preprocessing in Computational Pathology},
|
| 91 |
author = {Alagha, Ahmed and Leclerc, Christopher and Kotp, Yousef and Abdelwahed, Omar and Moras, Calvin and Rentopoulos, Peter and Rostami, Rose and Nguyen, Bich Ngoc and Baig, Jumanah and Khellaf, Abdelhakim and Trinh, Vincent Quoc-Huy and Mizouni, Rabeb and Otrok, Hadi and Bentahar, Jamal and Hosseini, Mahdi S.},
|
| 92 |
-
journal = {arXiv},
|
| 93 |
year = {2025},
|
| 94 |
-
url = {
|
| 95 |
}
|
| 96 |
-
```
|
|
|
|
| 1 |
---
|
|
|
|
| 2 |
language:
|
| 3 |
- en
|
| 4 |
library_name: sam2
|
| 5 |
+
license: cc-by-nc-sa-4.0
|
| 6 |
pipeline_tag: image-segmentation
|
| 7 |
tags:
|
| 8 |
- whole-slide-imaging
|
|
|
|
| 13 |
|
| 14 |
# AtlasPatch: Whole-Slide Image Tissue Segmentation
|
| 15 |
|
| 16 |
+
[Paper](https://huggingface.co/papers/2602.03998) | [Project Page](https://atlasanalyticslab.github.io/AtlasPatch/) | [GitHub](https://github.com/AtlasAnalyticsLab/AtlasPatch)
|
| 17 |
+
|
| 18 |
+
Segmentation model for whole-slide image (WSI) thumbnails, introduced in the paper [AtlasPatch: An Efficient and Scalable Tool for Whole Slide Image Preprocessing in Computational Pathology](https://huggingface.co/papers/2602.03998).
|
| 19 |
+
|
| 20 |
+
The model is built on **Segment Anything 2 (SAM2) Tiny** and finetuned only on the normalization layers. The model takes a **power-based WSI thumbnail at 1.25x magnification level (resized to 1024×1024)** and predicts a binary tissue mask. Training used segmented thumbnails.
|
| 21 |
|
| 22 |
## Quickstart
|
| 23 |
|
|
|
|
| 93 |
@article{atlaspatch2025,
|
| 94 |
title = {AtlasPatch: An Efficient and Scalable Tool for Whole Slide Image Preprocessing in Computational Pathology},
|
| 95 |
author = {Alagha, Ahmed and Leclerc, Christopher and Kotp, Yousef and Abdelwahed, Omar and Moras, Calvin and Rentopoulos, Peter and Rostami, Rose and Nguyen, Bich Ngoc and Baig, Jumanah and Khellaf, Abdelhakim and Trinh, Vincent Quoc-Huy and Mizouni, Rabeb and Otrok, Hadi and Bentahar, Jamal and Hosseini, Mahdi S.},
|
| 96 |
+
journal = {arXiv preprint arXiv:2602.03998},
|
| 97 |
year = {2025},
|
| 98 |
+
url = {https://huggingface.co/papers/2602.03998}
|
| 99 |
}
|
| 100 |
+
```
|