ogutsevda commited on
Commit
d983533
·
verified ·
1 Parent(s): 59d8f42

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +120 -3
README.md CHANGED
@@ -1,3 +1,120 @@
1
- ---
2
- license: cc-by-nc-sa-4.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-nc-sa-4.0
3
+ task_categories:
4
+ - graph-ml
5
+ tags:
6
+ - histopathology
7
+ - node-classification
8
+ - pytorch-geometric
9
+ pretty_name: Graph-PanNuke
10
+ size_categories:
11
+ - 1K<n<10K
12
+ ---
13
+
14
+ # Graph-PanNuke: A Cell-Graph Dataset for Nucleus Classification from PanNuke
15
+
16
+ <p align="center">
17
+ <img src="animation.gif" alt="Graph-PanNuke teaser – cell-graph construction from a histopathology patch" width="600"/>
18
+ </p>
19
+
20
+ **Graph-PanNuke** is a node-level classification dataset derived from the [PanNuke](https://warwick.ac.uk/fac/sci/dcs/research/tia/data/pannuke/) pan-cancer histology dataset. We use all slides at 40× magnification. Each tissue patch is converted into a **cell-graph** where nodes represent detected cell nuclei and edges encode spatial proximity. The task is predicting the cell type of each nucleus across 5 classes. Note that node features describe cell morphology, texture, and color intensity whereas edge features are Euclidean distance in micrometers.
21
+
22
+ This dataset is part of the paper **GrapHist: Graph Self-Supervised Learning for Histopathology**.
23
+
24
+ > ⚠️ **Edge Weight Note**: While the architecture in GrapHist supports both positive and negative edge weights, by default edge features represent Euclidean distances—meaning farther nodes have larger, positive values. This can be counterintuitive for many graph neural network models. We recommend experimenting with edge weights, such as using their inverse (e.g., `1/distance`) or negative distance (e.g., `-distance`), to better capture proximity and benefit learning.
25
+
26
+ ## Dataset Summary
27
+
28
+ | Property | Value |
29
+ |---|---|
30
+ | **# Patches** | 7,208 |
31
+ | **Avg # Nodes** | 22.66 |
32
+ | **Avg # Edges** | 57.16 |
33
+ | **# Classes** | 5 |
34
+
35
+ ## Node Classes
36
+
37
+ | Label ID | Class Name |
38
+ |---|---|
39
+ | 0 | Neoplastic |
40
+ | 1 | Inflammatory |
41
+ | 2 | Connective |
42
+ | 3 | Dead |
43
+ | 4 | Epithelial |
44
+
45
+ ## Data Structure
46
+
47
+ ```
48
+ graph-pannuke/
49
+ ├── README.md
50
+ ├── animation.gif
51
+ └── data/
52
+ ├── fold_1/
53
+ │ ├── Bile-duct_1_01455.pt
54
+ │ ├── Breast_3_00420.pt
55
+ │ └── ...
56
+ ├── fold_2/
57
+ │ └── ...
58
+ └── fold_3/
59
+ └── ...
60
+ ```
61
+
62
+ Each `.pt` file is a PyTorch Geometric `Data` object with the following attributes:
63
+
64
+ | Attribute | Shape | Description |
65
+ |---|---|---|
66
+ | `x` | `[num_nodes, 96]` | Node feature matrix |
67
+ | `edge_index` | `[2, num_edges]` | Graph connectivity in COO format |
68
+ | `edge_attr` | `[num_edges, 1]` | Edge features |
69
+ | `labels` | `[num_nodes]` | Per-node class label |
70
+ | `sample_id` | `str` | Unique patch identifier |
71
+
72
+ ---
73
+
74
+ ## Quick Start
75
+
76
+ ```python
77
+ import torch
78
+
79
+ # Load a single graph
80
+ graph = torch.load("data/fold_1/Bile-duct_1_01455.pt", weights_only=False)
81
+
82
+ print(graph)
83
+ # Data(x=[23, 96], edge_index=[2, 61], edge_attr=[61, 1], sample_id='...', labels=[23])
84
+
85
+ print(f"Nodes: {graph.x.shape[0]}, Edges: {graph.edge_index.shape[1]}")
86
+ print(f"Node labels: {graph.labels}")
87
+ ```
88
+
89
+ ---
90
+
91
+ ## Citation
92
+
93
+ If you use this dataset, please cite both our work, and the original PanNuke dataset:
94
+
95
+ **GrapHist (this dataset):**
96
+ ```bibtex
97
+ @article{graphist2025,
98
+ title = {GrapHist: Graph Self-Supervised Learning for Histopathology},
99
+ author = {TODO},
100
+ journal = {TODO},
101
+ year = {TODO},
102
+ note = {TODO: add full citation}
103
+ }
104
+ ```
105
+
106
+ **PanNuke (source annotations):**
107
+ ```bibtex
108
+ @article{gamper2020pannuke,
109
+ title={Pannuke dataset extension, insights and baselines},
110
+ author={Gamper, Jevgenij and Koohbanani, Navid Alemi and Benes, Ksenija and Graham, Simon and Jahanifar, Mostafa and Khurram, Syed Ali and Azam, Ayesha and Hewitt, Katherine and Rajpoot, Nasir},
111
+ journal={arXiv preprint arXiv:2003.10778},
112
+ year={2020}
113
+ }
114
+ ```
115
+
116
+ ---
117
+
118
+ ## License
119
+
120
+ This dataset is released under the [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/) license.