ogutsevda commited on
Commit
cedb44a
·
verified ·
1 Parent(s): d678962

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +134 -3
README.md CHANGED
@@ -1,3 +1,134 @@
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
+ - graph-classification
8
+ - breast-cancer
9
+ - pytorch-geometric
10
+ pretty_name: Graph-BRACS
11
+ size_categories:
12
+ - 1K<n<10K
13
+ ---
14
+
15
+ # Graph-BRACS: A Cell-Graph Dataset for Breast Cancer from BRACS
16
+
17
+ <p align="center">
18
+ <img src="animation.gif" alt="Graph-BRACS teaser – cell-graph construction from a histopathology ROI" width="600"/>
19
+ </p>
20
+
21
+ **Graph-BRACS** is a graph-level classification dataset derived from the [BRACS (BReAst Carcinoma Subtyping)](https://www.bracs.icar.cnr.it/) histopathology dataset. Each region-of-interest (ROI) image is converted into a **cell-graph** where nodes represent detected cell nuclei and edges encode spatial proximity, enabling graph-based learning for fine-grained breast lesion subtyping across 7 clinically relevant classes. Note that node features describe cell morphology, texture, and color intensity whereas edge features are Euclidean distance in micrometers.
22
+
23
+ This dataset is part of the paper **GrapHist: Graph Self-Supervised Learning for Histopathology**.
24
+
25
+ > ⚠️ **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.
26
+
27
+ ## Dataset Summary
28
+
29
+ | Property | Value |
30
+ |---|---|
31
+ | **Total graphs** | 4493 |
32
+ | **Classes** | 7 |
33
+ | **Train / Test split** | 3594 / 899 |
34
+ | **Node feature dim** | 96 |
35
+ | **Edge feature dim** | 1 |
36
+
37
+ ## Classes
38
+
39
+ | Label | Full Name | Count |
40
+ |---|---|---|
41
+ | `N` | Normal | 474 |
42
+ | `PB` | Pathological Benign | 833 |
43
+ | `UDH` | Usual Ductal Hyperplasia | 515 |
44
+ | `FEA` | Flat Epithelial Atypia | 752 |
45
+ | `ADH` | Atypical Ductal Hyperplasia | 505 |
46
+ | `DCIS` | Ductal Carcinoma In Situ | 768 |
47
+ | `IC` | Invasive Carcinoma | 646 |
48
+
49
+ ## Data Structure
50
+
51
+ ```
52
+ graph-bracs/
53
+ ├── README.md
54
+ ├── metadata.csv # sample_id, label, split, graph_path
55
+ ├── animation.gif
56
+ └── data/
57
+ ├── BRACS_1003670_IC_1.pt
58
+ ├── BRACS_1003660_UDH_1.pt
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
+ | `label` | `str` | Class label |
70
+ | `sample_id` | `str` | Unique sample identifier |
71
+
72
+ ### `metadata.csv`
73
+
74
+ A CSV file mapping each sample to its label, train/test split, and file path:
75
+
76
+ ```
77
+ sample_id,label,split,graph_path
78
+ BRACS_1003670_IC_1,IC,train,graph-bracs/data/BRACS_1003670_IC_1.pt
79
+ BRACS_1003660_UDH_1,UDH,train,graph-bracs/data/BRACS_1003660_UDH_1.pt
80
+ ...
81
+ ```
82
+
83
+ ---
84
+
85
+ ## Quick Start
86
+
87
+ ```python
88
+ import torch
89
+ from torch_geometric.data import Data
90
+
91
+ # Load a single graph
92
+ graph = torch.load("data/BRACS_1003670_IC_1.pt", weights_only=False)
93
+
94
+ print(graph)
95
+ # Data(x=[156, 96], edge_index=[2, 382], edge_attr=[382, 1], label='IC', sample_id='BRACS_1003670_IC_1')
96
+
97
+ print(f"Nodes: {graph.x.shape[0]}, Edges: {graph.edge_index.shape[1]}")
98
+ ```
99
+
100
+ ---
101
+
102
+ ## Citation
103
+
104
+ If you use this dataset, please cite both our work, and the original BRACS dataset:
105
+
106
+ **GrapHist (this dataset):**
107
+ ```bibtex
108
+ @article{graphist2025,
109
+ title = {GrapHist: Graph Self-Supervised Learning for Histopathology},
110
+ author = {TODO},
111
+ journal = {TODO},
112
+ year = {TODO},
113
+ note = {TODO: add full citation}
114
+ }
115
+ ```
116
+
117
+ **BRACS (source images):**
118
+ ```bibtex
119
+ @article{brancati2022bracs,
120
+ title = {{BRACS}: A Dataset for BReAst Carcinoma Subtyping in {H\&E} Histology Images},
121
+ author={Brancati, Nadia and Anniciello, Anna Maria and Pati, Pushpak and Riccio, Daniel and Scognamiglio, Giosu{\`e} and Jaume, Guillaume and De Pietro, Giuseppe and Di Bonito, Maurizio and Foncubierta, Antonio and Botti, Gerardo and others},
122
+ journal={Database},
123
+ volume={2022},
124
+ pages={baac093},
125
+ year={2022},
126
+ publisher={Oxford University Press UK}
127
+ }
128
+ ```
129
+
130
+ ---
131
+
132
+ ## License
133
+
134
+ This dataset is released under the [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/) license.