Update README.md
Browse files
README.md
CHANGED
@@ -192,6 +192,36 @@ It is tailored for segmentation and classification tasks. It contains 3 differen
|
|
192 |
|
193 |
All CT scans and segmentation masks had already been resampled with voxel spacing (2.0, 2.0, 3.0) and thus its reduced file size.
|
194 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
195 |
## Dataset Structure
|
196 |
|
197 |
### Data Instances
|
@@ -308,6 +338,9 @@ Modify the split proportion:
|
|
308 |
rsna_ds = load_dataset("jherng/rsna-2023-abdominal-trauma-detection", "classification", test_size=0.05, random_state=42)
|
309 |
```
|
310 |
|
|
|
|
|
|
|
311 |
### Citation Information
|
312 |
|
313 |
- Preprocessed dataset:
|
|
|
192 |
|
193 |
All CT scans and segmentation masks had already been resampled with voxel spacing (2.0, 2.0, 3.0) and thus its reduced file size.
|
194 |
|
195 |
+
### Usage
|
196 |
+
|
197 |
+
```python
|
198 |
+
from datasets import load_dataset
|
199 |
+
|
200 |
+
# Classification dataset
|
201 |
+
rsna_cls_ds = load_dataset("jherng/rsna-2023-abdominal-trauma-detection", streaming=True) # "classification" is the default configuration
|
202 |
+
rsna_cls_ds = load_dataset("jherng/rsna-2023-abdominal-trauma-detection", "classification", streaming=True) # download dataset on-demand and in-memory (no caching)
|
203 |
+
rsna_cls_ds = load_dataset("jherng/rsna-2023-abdominal-trauma-detection", "classification", streaming=False) # download dataset and cache locally (~90.09 GiB)
|
204 |
+
rsna_cls_ds = load_dataset("jherng/rsna-2023-abdominal-trauma-detection", "classification", streaming=True, test_size=0.05, random_state=42) # specify split size for train-test split
|
205 |
+
|
206 |
+
# Classification dataset with segmentation masks
|
207 |
+
rsna_clsmask_ds = load_dataset("jherng/rsna-2023-abdominal-trauma-detection", "classification-with-mask", streaming=True) # download dataset on-demand and in-memory (no caching)
|
208 |
+
rsna_clsmask_ds = load_dataset("jherng/rsna-2023-abdominal-trauma-detection", "classification-with-mask", streaming=False) # download dataset and cache locally (~3.91 GiB)
|
209 |
+
rsna_clsmask_ds = load_dataset("jherng/rsna-2023-abdominal-trauma-detection", "classification-with-mask", streaming=False, test_size=0.05, random_state=42) # specify split size for train-test split
|
210 |
+
|
211 |
+
# Segmentation dataset
|
212 |
+
rsna_seg_ds = load_dataset("jherng/rsna-2023-abdominal-trauma-detection", "segmentation", streaming=True) # download dataset on-demand and in-memory (no caching)
|
213 |
+
rsna_seg_ds = load_dataset("jherng/rsna-2023-abdominal-trauma-detection", "segmentation", streaming=False) # download dataset and cache locally (~3.91 GiB)
|
214 |
+
rsna_seg_ds = load_dataset("jherng/rsna-2023-abdominal-trauma-detection", "segmentation", streaming=True, test_size=0.1, random_state=42) # specify split size for train-test split
|
215 |
+
|
216 |
+
# Get the dataset splits
|
217 |
+
train_rsna_cls_ds = rsna_cls_ds["train"]; test_rsna_cls_ds = rsna_cls_ds["test"]
|
218 |
+
train_rsna_clsmask_ds = rsna_clsmask_ds["train"]; test_rsna_clsmask_ds = rsna_clsmask_ds["test"]
|
219 |
+
train_rsna_seg_ds = rsna_seg_ds["train"]; test_rsna_seg_ds = rsna_seg_ds["test"]
|
220 |
+
|
221 |
+
# Tip: Download speed up with multiprocessing
|
222 |
+
rsna_cls_ds = load_dataset("jherng/rsna-2023-abdominal-trauma-detection", streaming=False, num_proc=8) # num_proc: num of cpu core used for loading the dataset
|
223 |
+
```
|
224 |
+
|
225 |
## Dataset Structure
|
226 |
|
227 |
### Data Instances
|
|
|
338 |
rsna_ds = load_dataset("jherng/rsna-2023-abdominal-trauma-detection", "classification", test_size=0.05, random_state=42)
|
339 |
```
|
340 |
|
341 |
+
|
342 |
+
## Additional Information
|
343 |
+
|
344 |
### Citation Information
|
345 |
|
346 |
- Preprocessed dataset:
|