File size: 3,829 Bytes
a30d96d
 
09d55dc
 
 
 
 
 
 
 
 
 
48d1610
09d55dc
 
 
48d1610
cba481b
48d1610
 
 
 
 
cba481b
48d1610
 
 
a30d96d
09d55dc
 
 
 
 
48d1610
 
09d55dc
 
 
48d1610
09d55dc
48d1610
 
 
 
 
09d55dc
48d1610
 
 
09d55dc
48d1610
09d55dc
48d1610
09d55dc
48d1610
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
09d55dc
 
 
 
 
 
48d1610
09d55dc
 
 
 
48d1610
 
 
 
 
 
 
 
 
 
 
 
 
09d55dc
 
48d1610
 
09d55dc
 
 
 
 
 
48d1610
 
09d55dc
 
 
 
 
 
 
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
107
108
109
110
111
112
113
114
115
116
117
118
119
---
license: cc-by-nc-sa-4.0
task_categories:
- visual-question-answering
- video-text-to-text
language:
- en
tags:
- medical
- chest-ct
- radiology
- ct-rate
- dpo
size_categories:
- 10K<n<100K
pretty_name: CT-RATE-AB
configs:
- config_name: AB
  data_files:
  - split: train
    path: viewer/train.parquet
  - split: valid
    path: viewer/valid.parquet
- config_name: AB_DPO
  data_files:
  - split: train
    path: viewer/dpo.parquet
---

# CT-RATE-AB

Vision-language annotations for chest CT abnormality reporting, derived from
[CT-RATE](https://huggingface.co/datasets/ibrahimhamamci/CT-RATE) and
formatted in the LLaVA conversation schema. Includes both an SFT split
(train / valid) and a DPO preference set.

> ⚠️ Research use only. Not a medical device. Do not use for clinical decisions.

## Splits

| Subset | # Samples | Purpose                  |
|--------|-----------|--------------------------|
| train  | 46,709    | SFT training             |
| valid  | 3,039     | Validation               |
| DPO    | 46,709    | DPO preference fine-tuning |

The DPO entries share `id` values with the SFT train set (the `chosen`
response equals the SFT `gpt` value); train and valid splits inherit the
official CT-RATE partition (no patient overlap).

## ⚠️ Two file formats in this repo

This repository ships **two parallel views** of the same data:

| Purpose                | Files                                    | Format |
|------------------------|------------------------------------------|--------|
| **Training (use these)** | `CT-RATE-AB-train.json`, `CT-RATE-AB-valid.json`, `CT-RATE-AB-DPO.json` | Raw LLaVA-format JSON |
| **Dataset Viewer only**  | `viewer/train.parquet`, `viewer/valid.parquet`, `viewer/dpo.parquet`     | Simplified parquet    |

**For training, always load the JSON files.** They preserve the full LLaVA
conversation schema (`videos`, `conversations` with `<video>` token, etc.)
expected by standard multimodal training pipelines.

The parquet files in `viewer/` exist **only so the Hugging Face Dataset
Viewer shows the report text cleanly** — they strip out the `videos`
filename column (no videos are hosted here) and the boilerplate human
prompt, leaving just `id` and the report. **Do not use parquet for
training.** The two views are guaranteed identical in content; they
differ only in field layout.

## Data format (the JSON files)

Standard LLaVA video-conversation schema.

**`CT-RATE-AB-train.json` / `CT-RATE-AB-valid.json`** (SFT):
```json
{
  "id": "train_1_a_1",
  "videos": ["train_1_a_1.mp4"],
  "conversations": [
    {"from": "human", "value": "<video>\nGenerate a report for this patient."},
    {"from": "gpt",   "value": "Lung: ...\n\nMediastinum: ...\n\n..."}
  ]
}
```

**`CT-RATE-AB-DPO.json`** (DPO preference pairs):
```json
{
  "id": "train_5251_a_1",
  "videos": ["train_5251_a_1.mp4"],
  "conversations": [
    {"from": "human", "value": "<video>\nGenerate a report for this patient."}
  ],
  "chosen":   {"from": "gpt", "value": "Lung: ... atelectatic changes ..."},
  "rejected": {"from": "gpt", "value": "Lung: ... ground-glass opacities ..."}
}
```

The assistant response is a structured report organized by anatomy:
*Lung*, *Trachea and Bronchie*, *Mediastinum*, *Bone*, *Abdomen*, *Others*.
The human prompt is identical across all samples:
`<video>\nGenerate a report for this patient.`

## Obtaining the CT volumes

This repository contains **only annotations**. To obtain the corresponding CT
data, request access to CT-RATE at
<https://huggingface.co/datasets/ibrahimhamamci/CT-RATE>. The `id` field in
each entry maps directly to the CT-RATE volume identifier (and to the mp4
filename listed in `videos`, if you render videos locally).

## License

Released under **CC BY-NC-SA 4.0**, consistent with the upstream CT-RATE
license.