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