ogutsevda commited on
Commit
4d43114
·
verified ·
1 Parent(s): d0dc08a

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +131 -3
README.md CHANGED
@@ -1,3 +1,131 @@
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-BreakHis
11
+ size_categories:
12
+ - n<1K
13
+ ---
14
+
15
+ # Graph-BreakHis: A Cell-Graph Dataset for Breast Cancer from BreakHis
16
+
17
+ <p align="center">
18
+ <img src="animation.gif" alt="Graph-BreakHis teaser – cell-graph construction from a histopathology image" width="600"/>
19
+ </p>
20
+
21
+ **Graph-BreakHis** is a graph-level classification dataset derived from the [BreakHis (Breast Cancer Histopathological Image Classification)](https://web.inf.ufpr.br/vri/databases/breast-cancer-histopathological-database-breakhis/) dataset. Each microscopy image is converted into a **cell-graph** where nodes represent detected cell nuclei and edges encode spatial proximity, enabling graph-based binary classification of benign vs. malignant breast tumours. Note that node features describe cell morphology, texture, and color intensity whereas edge features are Euclidean distance in micrometers.
22
+
23
+
24
+ This dataset is part of the paper **GrapHist: Graph Self-Supervised Learning for Histopathology**.
25
+
26
+ > ⚠️ **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.
27
+
28
+ ## Dataset Summary
29
+
30
+ | Property | Value |
31
+ |---|---|
32
+ | **Total graphs** | 522 |
33
+ | **Classes** | 2 |
34
+ | **Train / Test split** | 417 / 105 |
35
+ | **Node feature dim** | 96 |
36
+ | **Edge feature dim** | 1 |
37
+
38
+ ## Classes
39
+
40
+ | Label | Full Name | Count |
41
+ |---|---|---|
42
+ | `B` | Benign | 233 |
43
+ | `M` | Malignant | 289 |
44
+
45
+ ## Data Structure
46
+
47
+ ```
48
+ graph-breakhis/
49
+ ├── README.md
50
+ ├── metadata.csv # sample_id, label, split, graph_path
51
+ ├── animation.gif
52
+ └── data/
53
+ ├── SOB_B_A-14-22549AB-40-001.pt
54
+ ├── SOB_M_DC-14-12312-40-012.pt
55
+ └── ...
56
+ ```
57
+
58
+ Each `.pt` file is a PyTorch Geometric `Data` object with the following attributes:
59
+
60
+ | Attribute | Shape | Description |
61
+ |---|---|---|
62
+ | `x` | `[num_nodes, 96]` | Node feature matrix |
63
+ | `edge_index` | `[2, num_edges]` | Graph connectivity in COO format |
64
+ | `edge_attr` | `[num_edges, 1]` | Edge features |
65
+ | `label` | `str` | Class label |
66
+ | `sample_id` | `str` | Unique sample identifier |
67
+
68
+ ### `metadata.csv`
69
+
70
+ A CSV file mapping each sample to its label, train/test split, and file path:
71
+
72
+ ```
73
+ sample_id,label,split,graph_path
74
+ SOB_B_A-14-22549AB-40-001,B,train,graph-breakhis/data/SOB_B_A-14-22549AB-40-001.pt
75
+ SOB_B_A-14-22549AB-40-006,B,train,graph-breakhis/data/SOB_B_A-14-22549AB-40-006.pt
76
+ ...
77
+ ```
78
+
79
+ ---
80
+
81
+ ## Quick Start
82
+
83
+ ```python
84
+ import torch
85
+ from torch_geometric.data import Data
86
+
87
+ # Load a single graph
88
+ graph = torch.load("data/SOB_B_A-14-22549AB-40-001.pt", weights_only=False)
89
+
90
+ print(graph)
91
+ # Data(x=[26, 96], edge_index=[2, 61], edge_attr=[61, 1], label='B', sample_id='SOB_B_A-14-22549AB-40-001')
92
+
93
+ print(f"Nodes: {graph.x.shape[0]}, Edges: {graph.edge_index.shape[1]}")
94
+ ```
95
+
96
+ ---
97
+
98
+ ## Citation
99
+
100
+ If you use this dataset, please cite both our work, and the original BreakHis dataset:
101
+
102
+ **GrapHist (this dataset):**
103
+ ```bibtex
104
+ @article{graphist2025,
105
+ title = {GrapHist: Graph Self-Supervised Learning for Histopathology},
106
+ author = {TODO},
107
+ journal = {TODO},
108
+ year = {TODO},
109
+ note = {TODO: add full citation}
110
+ }
111
+ ```
112
+
113
+ **BreakHis (source images):**
114
+ ```bibtex
115
+ @article{spanhol2015dataset,
116
+ title={A dataset for breast cancer histopathological image classification},
117
+ author={Spanhol, Fabio A and Oliveira, Luiz S and Petitjean, Caroline and Heutte, Laurent},
118
+ journal = {IEEE Transactions on Biomedical Engineering},
119
+ volume = {63},
120
+ number = {7},
121
+ pages = {1455--1462},
122
+ year={2015},
123
+ publisher={IEEE}
124
+ }
125
+ ```
126
+
127
+ ---
128
+
129
+ ## License
130
+
131
+ This dataset is released under the [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/) license.