Dataset Preview
Full Screen
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed because of a cast error
Error code:   DatasetGenerationCastError
Exception:    DatasetGenerationCastError
Message:      An error occurred while generating the dataset

All the data files must have the same columns, but at some point there are 1 new columns ({'filename'}) and 1 missing columns ({'label_text'}).

This happened while the csv dataset builder was generating data using

hf://datasets/peternasser99/MED/OpenPath_data/External validation data/Kather_train/Kather_train.csv (at revision c3af8d89426b669e8a10dc6bc419bc8dc7a5242b)

Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 2011, in _prepare_split_single
                  writer.write_table(table)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/arrow_writer.py", line 585, in write_table
                  pa_table = table_cast(pa_table, self._schema)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2302, in table_cast
                  return cast_table_to_schema(table, schema)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2256, in cast_table_to_schema
                  raise CastError(
              datasets.table.CastError: Couldn't cast
              Unnamed: 0: int64
              filename: string
              label: string
              caption: string
              -- schema metadata --
              pandas: '{"index_columns": [{"kind": "range", "name": null, "start": 0, "' + 720
              to
              {'Unnamed: 0': Value(dtype='int64', id=None), 'label': Value(dtype='int64', id=None), 'label_text': Value(dtype='string', id=None), 'caption': Value(dtype='string', id=None)}
              because column names don't match
              
              During handling of the above exception, another exception occurred:
              
              Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1572, in compute_config_parquet_and_info_response
                  parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1136, in stream_convert_to_parquet
                  builder._prepare_split(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1882, in _prepare_split
                  for job_id, done, content in self._prepare_split_single(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 2013, in _prepare_split_single
                  raise DatasetGenerationCastError.from_cast_error(
              datasets.exceptions.DatasetGenerationCastError: An error occurred while generating the dataset
              
              All the data files must have the same columns, but at some point there are 1 new columns ({'filename'}) and 1 missing columns ({'label_text'}).
              
              This happened while the csv dataset builder was generating data using
              
              hf://datasets/peternasser99/MED/OpenPath_data/External validation data/Kather_train/Kather_train.csv (at revision c3af8d89426b669e8a10dc6bc419bc8dc7a5242b)
              
              Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

Unnamed: 0
int64
label
int64
label_text
string
caption
string
0
0
benign
An H&E image patch of benign tissue.
1
0
benign
An H&E image patch of benign tissue.
2
0
benign
An H&E image patch of benign tissue.
3
0
benign
An H&E image patch of benign tissue.
4
0
benign
An H&E image patch of benign tissue.
5
0
benign
An H&E image patch of benign tissue.
6
0
benign
An H&E image patch of benign tissue.
7
0
benign
An H&E image patch of benign tissue.
8
0
benign
An H&E image patch of benign tissue.
9
0
benign
An H&E image patch of benign tissue.
10
0
benign
An H&E image patch of benign tissue.
11
0
benign
An H&E image patch of benign tissue.
12
0
benign
An H&E image patch of benign tissue.
13
0
benign
An H&E image patch of benign tissue.
14
0
benign
An H&E image patch of benign tissue.
15
0
benign
An H&E image patch of benign tissue.
16
0
benign
An H&E image patch of benign tissue.
17
0
benign
An H&E image patch of benign tissue.
18
0
benign
An H&E image patch of benign tissue.
19
0
benign
An H&E image patch of benign tissue.
20
0
benign
An H&E image patch of benign tissue.
21
0
benign
An H&E image patch of benign tissue.
22
0
benign
An H&E image patch of benign tissue.
23
0
benign
An H&E image patch of benign tissue.
24
0
benign
An H&E image patch of benign tissue.
25
0
benign
An H&E image patch of benign tissue.
26
0
benign
An H&E image patch of benign tissue.
27
0
benign
An H&E image patch of benign tissue.
28
0
benign
An H&E image patch of benign tissue.
29
0
benign
An H&E image patch of benign tissue.
30
0
benign
An H&E image patch of benign tissue.
31
0
benign
An H&E image patch of benign tissue.
32
0
benign
An H&E image patch of benign tissue.
33
0
benign
An H&E image patch of benign tissue.
34
0
benign
An H&E image patch of benign tissue.
35
0
benign
An H&E image patch of benign tissue.
36
0
benign
An H&E image patch of benign tissue.
37
0
benign
An H&E image patch of benign tissue.
38
0
benign
An H&E image patch of benign tissue.
39
0
benign
An H&E image patch of benign tissue.
40
0
benign
An H&E image patch of benign tissue.
41
0
benign
An H&E image patch of benign tissue.
42
0
benign
An H&E image patch of benign tissue.
43
0
benign
An H&E image patch of benign tissue.
44
0
benign
An H&E image patch of benign tissue.
45
0
benign
An H&E image patch of benign tissue.
46
0
benign
An H&E image patch of benign tissue.
47
0
benign
An H&E image patch of benign tissue.
48
0
benign
An H&E image patch of benign tissue.
49
0
benign
An H&E image patch of benign tissue.
50
0
benign
An H&E image patch of benign tissue.
51
0
benign
An H&E image patch of benign tissue.
52
0
benign
An H&E image patch of benign tissue.
53
0
benign
An H&E image patch of benign tissue.
54
0
benign
An H&E image patch of benign tissue.
55
0
benign
An H&E image patch of benign tissue.
56
0
benign
An H&E image patch of benign tissue.
57
0
benign
An H&E image patch of benign tissue.
58
0
benign
An H&E image patch of benign tissue.
59
0
benign
An H&E image patch of benign tissue.
60
0
benign
An H&E image patch of benign tissue.
61
0
benign
An H&E image patch of benign tissue.
62
0
benign
An H&E image patch of benign tissue.
63
0
benign
An H&E image patch of benign tissue.
64
0
benign
An H&E image patch of benign tissue.
65
0
benign
An H&E image patch of benign tissue.
66
0
benign
An H&E image patch of benign tissue.
67
0
benign
An H&E image patch of benign tissue.
68
0
benign
An H&E image patch of benign tissue.
69
0
benign
An H&E image patch of benign tissue.
70
0
benign
An H&E image patch of benign tissue.
71
0
benign
An H&E image patch of benign tissue.
72
0
benign
An H&E image patch of benign tissue.
73
0
benign
An H&E image patch of benign tissue.
74
0
benign
An H&E image patch of benign tissue.
75
0
benign
An H&E image patch of benign tissue.
76
0
benign
An H&E image patch of benign tissue.
77
0
benign
An H&E image patch of benign tissue.
78
0
benign
An H&E image patch of benign tissue.
79
0
benign
An H&E image patch of benign tissue.
80
0
benign
An H&E image patch of benign tissue.
81
0
benign
An H&E image patch of benign tissue.
82
0
benign
An H&E image patch of benign tissue.
83
0
benign
An H&E image patch of benign tissue.
84
0
benign
An H&E image patch of benign tissue.
85
0
benign
An H&E image patch of benign tissue.
86
0
benign
An H&E image patch of benign tissue.
87
0
benign
An H&E image patch of benign tissue.
88
0
benign
An H&E image patch of benign tissue.
89
0
benign
An H&E image patch of benign tissue.
90
0
benign
An H&E image patch of benign tissue.
91
0
benign
An H&E image patch of benign tissue.
92
0
benign
An H&E image patch of benign tissue.
93
0
benign
An H&E image patch of benign tissue.
94
0
benign
An H&E image patch of benign tissue.
95
0
benign
An H&E image patch of benign tissue.
96
0
benign
An H&E image patch of benign tissue.
97
0
benign
An H&E image patch of benign tissue.
98
0
benign
An H&E image patch of benign tissue.
99
0
benign
An H&E image patch of benign tissue.
End of preview.
YAML Metadata Warning: empty or missing yaml metadata in repo card (https://huggingface.co/docs/hub/datasets-cards)

PADCHEST Dataset (note: under construction...)

The PADCHEST dataset is a chest x-ray labeled dataset containing 160K high resolution images with their corresponding labeled reports. Its detailed description and labeling methods are described in [1].
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License and is downloadble from http://bimcv.cipf.es/va/2_projectes/padchest/. For attribution, please cite as [1].

PADCHEST Folder Structure:

Images are distributed in 54 zip files adding up to 1 TB.

The file "PADCHEST_chest_x_ray_images_labels_160K.csv" provides the following information for each image:

  • ImageID,

  • ImageDir,

  • StudyDate_DICOM,

  • StudyID,

  • PatientID,

  • PatientBirth,

  • PatientSex_DICOM,

  • ViewPosition_DICOM,

  • Projection,

  • Pediatric,

  • MethodProjection,

  • Modality_DICOM,

  • Manufacturer_DICOM,

  • PhotometricInterpretation_DICOM,

  • PixelRepresentation_DICOM,

  • PixelAspectRatio_DICOM,

  • SpatialResolution_DICOM,

  • BitsStored_DICOM,

  • WindowCenter_DICOM,

  • WindowWidth_DICOM,

  • Rows_DICOM,

  • Columns_DICOM,

  • XRayTubeCurrent_DICOM,

  • Exposure_DICOM,

  • ExposureInuAs_DICOM,

  • ExposureTime_DICOM,

  • RelativeXRayExposure_DICOM,

  • ReportID,

  • Report,

  • MethodLabel,

  • Labels,

  • Localizations,

  • LabelsLocalizationsBySentence,

  • LabelCUIS,

  • LocalizationsCUIS

There are two types of fields:

  1. Fields with suffix DICOM contains the values of the original field in the DICOM standard [ref 3]. DICOM® (Digital Imaging and Communications in Medicine) is the international standard to transmit, store, retrieve, print, process, and display medical imaging information. Consult DICOM standard for field descriptions.

  2. All other non DICOM fields enrich the PADCHEST dataset with additional information.

  • Projection: A working classification of the 5 main x-ray projections identified.
  • Report: This field contains the radiological interpretation snippet extracted from the original study report. The text is preprocessed, words are stemmed and tokenized. Each sentence is separated by ‘.’.
  • LabelsLocalizationsBySentence: This field contains the anatomic locations for each label as a sequence that follows the order of sentences in a report. Locations are always preceded by the token "loc" so to differentiate them from labels of differential diagnosis and radiological findings. The sequence repeats the pattern formed by one label followed by none or many locations for this label ( label, (0..n) loc name )
  • Labels and Localizations fields: Those fields aggregates respectively all different labels and localizations in a report as explained in [1].
  • LabelCUIS and LocalizationsCUIS: These fields contains the [UMLS Metathesaurus CUIs] (https://uts.nlm.nih.gov/home.html) corresponding to extracted terms.

Examples:

  1. Report: "compar con estudi previ 2010 sin identific cambi signific . siluet cardiomediastin dentr limit normal . no identif imagen condensacion ni opac pulmonar entid signific "

    Labels: ['unchanged']

    Localizations: ['loc cardiac']

    LabelsLocalizationsBySentence: [['unchanged'], ['normal', 'loc cardiac'], ['normal']]

    LabelsCUIS: []

    LocalizationsCUIS: ['C1522601']

  2. Report: "imagen pequen taman redond densid metal proyect torax hombre i relacion probabl con perdigon . compresion par lateral izquierd traque probabl estructur vascular . hipoventilacion bibasal ."

    Labels: ['metal', 'superior mediastinal enlargement', 'hypoexpansion basal', 'abnormal foreign body', 'supra aortic elongation']

    Localizations: ['loc shoulder', 'loc tracheal, loc left', 'loc basal bilateral']

    LabelsLocalizationsBySentence: [['metal', 'abnormal foreign body', 'loc shoulder'], ['superior mediastinal enlargement', 'supra aortic elongation', 'loc tracheal', 'loc left'], ['hypoexpansion basal both sides', 'loc basal bilateral']]

    LabelsCUIS: ['C0025552' 'C4273001' '' 'C0016542']

    LocalizationsCUIS: ['C0040578' 'C0037004' 'C0443246']

  3. Report: "marcapas tricameral . cambi pulmonar cronic . no identific imagen sugest neumotorax . "

    Labels: ['pacemaker', 'chronic changes']

    Localizations: []

    LabelsLocalizationsBySentence: [['pacemaker'], ['chronic changes'], ['normal']]

    LabelsCUIS: ['C0030163' 'C0742362']

    LocalizationsCUIS: []

The labels are classified in three different treess: differential diagnosis, radiological findings and anatomical locations. Trees and term counts are available in tree_term_CUI_counts_160K.csv.

Search Instructions for image retrieval by differential diagnosis, Rx findings and anatomical locations:

To retrieve all relevant images that contains the childs of one term of interest, please consult the appropriate tree and include in the search the corresponding child’s labels or CUIs for this term. Please note that LabelsLocalizationsBySentence includes all labels for each sentence, and therefore "Normal" or "Exclude" on this field does not imply that the image is "Normal" or should be Excluded (respectively). Instead the labels on this field are the annotations to each sentence and are not aggregated at report level. Therefore, for retrieval and counts of number of images, studies or reports, use the fields Labels, Locations, LabelsCUIs and/or LocalizationsCUIS.

Ref:

[1] A. Bustos, A. Pertusa, JM. Salinas, M. de la Iglesia. PadChest: A large chest x-ray image dataset with multi-label annotated reports. (Publication Ongoing)

[2] NEMA PS3 / ISO 12052, Digital Imaging and Communications in Medicine (DICOM) Standard, National Electrical Manufacturers Association, Rosslyn, VA, USA

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Downloads last month
2