Angelou0516 commited on
Commit
e5d2fdc
·
verified ·
1 Parent(s): 0b7fda8

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +103 -0
README.md ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ task_categories:
4
+ - image-segmentation
5
+ tags:
6
+ - medical
7
+ - CT
8
+ - multi-organ
9
+ - segmentation
10
+ size_categories:
11
+ - n<1K
12
+ configs:
13
+ - config_name: default
14
+ data_files:
15
+ - split: train
16
+ path: train.jsonl
17
+ ---
18
+
19
+ # Beyond the Cranial Vault Dataset
20
+
21
+ ## Dataset Description
22
+
23
+ The Beyond the Cranial Vault dataset for multi-organ abdominal CT segmentation. This dataset contains CT scans with dense segmentation annotations.
24
+
25
+ ### Dataset Details
26
+
27
+ - **Modality**: CT
28
+ - **Target**: 13 abdominal organs
29
+ - **Format**: NIfTI (.nii.gz)
30
+
31
+ ### Dataset Structure
32
+
33
+ Each sample in the JSONL file contains:
34
+ ```json
35
+ {
36
+ "image": "path/to/image.nii.gz",
37
+ "mask": "path/to/mask.nii.gz",
38
+ "label": ["organ1", "organ2", ...],
39
+ "modality": "CT",
40
+ "dataset": "BTCV",
41
+ "official_split": "train",
42
+ "patient_id": "patient_id"
43
+ }
44
+ ```
45
+
46
+ ## Usage
47
+
48
+ ### Load Metadata
49
+
50
+ ```python
51
+ from datasets import load_dataset
52
+
53
+ # Load the dataset
54
+ ds = load_dataset("Angelou0516/btcv")
55
+
56
+ # Access a sample
57
+ sample = ds['train'][0]
58
+ print(f"Patient ID: {sample['patient_id']}")
59
+ print(f"Labels: {sample['label']}")
60
+ ```
61
+
62
+ ### Load Images
63
+
64
+ ```python
65
+ from huggingface_hub import snapshot_download
66
+ import nibabel as nib
67
+ import os
68
+
69
+ # Download the full dataset
70
+ local_path = snapshot_download(
71
+ repo_id="Angelou0516/btcv",
72
+ repo_type="dataset"
73
+ )
74
+
75
+ # Load a sample
76
+ sample = ds['train'][0]
77
+ image = nib.load(os.path.join(local_path, sample["image"]))
78
+ mask = nib.load(os.path.join(local_path, sample['mask']))
79
+
80
+ # Get numpy arrays
81
+ image_data = image.get_fdata()
82
+ mask_data = mask.get_fdata()
83
+
84
+ print(f"Image shape: {image_data.shape}")
85
+ print(f"Mask shape: {mask_data.shape}")
86
+ ```
87
+
88
+ ## Citation
89
+
90
+ ```bibtex
91
+ @article{btcv,
92
+ title={Multi-Atlas Labeling Beyond the Cranial Vault},
93
+ year={2023}
94
+ }
95
+ ```
96
+
97
+ ## License
98
+
99
+ CC-BY-4.0
100
+
101
+ ## Dataset Homepage
102
+
103
+ https://www.synapse.org/#!Synapse:syn3193805