andrewsong90 LzucaXD commited on
Commit
5677c4a
·
0 Parent(s):

initial commit for CARTA

Browse files

Co-authored-by: LzucaXD <LzucaXD@users.noreply.huggingface.co>

Files changed (4) hide show
  1. .gitattributes +35 -0
  2. README.md +74 -0
  3. carta_core.pt +3 -0
  4. carta_tissue.pt +3 -0
.gitattributes ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-nc-4.0
3
+ tags:
4
+ - tissue-microarray
5
+ - multiplex-immunofluorescence
6
+ - computer-vision
7
+ - pytorch
8
+ library_name: carta
9
+ pipeline_tag: image-segmentation
10
+ ---
11
+ # CARTA: Core and Tissue Detection weights
12
+
13
+ CARTA’s tissue model is a DeepLabV3-ResNet50 segmenter for tissue vs background in multiplex immunofluorescence nuclear images. It was trained on annotated data primarily CODEX and is intended for fluorescence multiplex IF tissue segmentation
14
+ It has been tested on: CyCIF, CODEX, Keyence, Orion, Vectra, PhenoCycler.
15
+
16
+ CARTA can be imported from **[CORAL](https://github.com/mahmoodlab/CORAL)**.
17
+
18
+ Pretrained weights for **[CARTA](https://github.com/mahmoodlab/CARTA)** (TMA core detection + tissue segmentation for multiplex immunofluorescence).
19
+
20
+ | File | Task | Architecture | Size |
21
+ |------|------|--------------|------|
22
+ | `carta_core.pt` | TMA core bounding boxes | YOLOv8n | ~6 MB |
23
+ | `carta_tissue.pt` | Tissue vs background | DeepLabV3-ResNet50 | ~161 MB |
24
+
25
+ ## Usage
26
+
27
+ Weights download automatically when you install CARTA and run the pipeline:
28
+
29
+ ```python
30
+ from segmenter.weights import resolve_weights
31
+ detector = resolve_weights("detector")
32
+ segmenter = resolve_weights("segmenter")
33
+ ```
34
+
35
+ Or explicitly:
36
+
37
+ ```python
38
+ from huggingface_hub import hf_hub_download
39
+ detector = hf_hub_download("MahmoodLab/CARTA", "carta_core.pt")
40
+ segmenter = hf_hub_download("MahmoodLab/CARTA", "carta_tissue.pt")
41
+ ```
42
+
43
+ ## Detector (YOLO)
44
+
45
+ - Input: 1280×1280 letterboxed nuclear RGB canvas
46
+ - Default inference: `conf=0.25`, `iou=0.7`, `agnostic_nms=True`
47
+
48
+ ## Segmenter (DeepLab)
49
+
50
+ - Internal compute: **1 µm/px** (native crops resampled, masks upsampled to full resolution)
51
+ - Tiled inference: 512×512, per-tile percentile normalization
52
+ - Default export: DAPI + binary mask + GeoJSON per core
53
+
54
+ ## Intended use
55
+
56
+ Tested on: CyCIF, CODEX, Keyence, Orion, Vectra, PhenoCycler.
57
+
58
+ ## License
59
+
60
+ The CARTA weights are released under the [Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)](https://creativecommons.org/licenses/by-nc-nd/4.0/) license. They are provided for non-commercial academic research only; commercial use, or the distribution of derivative models, requires prior approval.
61
+
62
+ ## Citation
63
+
64
+ Please cite the KRONOS paper:
65
+
66
+ ```bibtex
67
+ @article{shaban2024foundation,
68
+ title = {A Foundation Model for Spatial Proteomics},
69
+ author = {Muhammad Shaban and Yuzhou Chang and Huaying Qiu and Yao Yu Yeo and Andrew H. Song and Guillaume Jaume and Yuchen Wang and Luca L. Weishaupt and Tong Ding and Anurag Vaidya and Abdallah Lamane and Daniel Shao and Mohammed Zidane and Yunhao Bai and Paige McCallum and Shuli Luo and Wenrui Wu and Yang Wang and Precious Cramer and Chi Ngai Chan and Pierre Stephan and Johanna Schaffenrath and Jia Le Lee and Hendrik A Michel and Caiwei Tian and Cristina Almagro-Perez and Sophia J. Wagner and Sharifa Sahai and Ming Y. Lu and Richard J. Chen and Andrew Zhang and Mark Edward M Gonzales and Ahmad Makky and Joey Lee and Hao Cheng and Maximilian Haist and Darci Phillips and Yuqi Tan and Garry P Nolan and W. Richard Burack and Jacob D Estes and Jonathan T.C. Liu and Toni K Choueiri and Neeraj Agarwal and Marc Barry and Scott J Rodig and Long Phi Le and Georg Gerber and Christian M. Schürch and Fabian J. Theis and Youn H Kim and Joe Yeong and Sabina Signoretti and Brooke Howitt and Lit-Hsin Loo and Qin Ma and Sizun Jiang and Faisal Mahmood},
70
+ year = {2025},
71
+ note = {Preprint},
72
+ howpublished = {\url{https://arxiv.org/abs/2506.03373}},
73
+ }
74
+ ```
carta_core.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8fb9336a127b51f2b29d7bbc4f5ccf84712a639a0847dd476bfaf954c8f21973
3
+ size 6413482
carta_tissue.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cd65faec1bd9b66c987306ed449aa8f5aad608f88ff7dd12b376087640a96f32
3
+ size 168358875