MaziyarPanahi commited on
Commit
4526ee4
·
verified ·
1 Parent(s): d5c544e

Update dataset card: schema, examples, joins

Browse files
Files changed (1) hide show
  1. README.md +58 -67
README.md CHANGED
@@ -1,80 +1,71 @@
1
  ---
2
- pretty_name: MultiCaRe Images (metadata)
3
  license: cc-by-4.0
4
  task_categories:
5
- - image-classification
6
- - image-to-text
7
  language:
8
- - en
9
  size_categories:
10
- - 100K<n<1M
11
- dataset_info:
12
- features:
13
- - name: file_id
14
- dtype: string
15
- - name: file
16
- dtype: string
17
- - name: main_image
18
- dtype: string
19
- - name: image_component
20
- dtype: string
21
- - name: patient_id
22
- dtype: string
23
- - name: license
24
- dtype: string
25
- - name: caption
26
- dtype: string
27
- - name: case_substring
28
- sequence: string
29
- - name: image_type
30
- dtype: string
31
- - name: image_subtype
32
- dtype: string
33
- - name: radiology_region
34
- dtype: string
35
- - name: radiology_region_granular
36
- dtype: string
37
- - name: radiology_view
38
- dtype: string
39
- - name: image
40
- dtype: image
41
- - name: labels
42
- sequence: string
43
- - name: semi_labels
44
- sequence: string
45
- splits:
46
- - name: train
47
- num_bytes: 2956191106.45
48
- num_examples: 161702
49
- download_size: 3238623374
50
- dataset_size: 2956191106.45
51
- configs:
52
- - config_name: default
53
- data_files:
54
- - split: train
55
- path: data/train-*
56
  ---
57
 
58
- # MultiCaRe Images (metadata)
59
 
60
- Per-image metadata, captions, and labels from MultiCaRe (Zenodo 13936721), sourced from `captions_and_labels.csv`.
61
 
62
- Schema highlights:
63
- - file_id: unique image row ID
64
- - file: image filename; archive = `PMC{file[:4][-1]}.zip`; inner path = `f"{file[:4]}/{file[:5]}/{file}"`
65
- - main_image: original figure ID (equals `case_images.image_id`)
66
- - patient_id: equals `cases.case_id`
67
- - caption: image caption (full or segment)
68
- - image_type / image_subtype / radiology_*: multiclass columns
69
- - labels: supervised multilabels (string list)
70
- - semi_labels: semi-supervised multilabels (string list, incomplete by design)
 
 
 
 
 
 
 
71
  - license: per-article OA license
72
 
73
- Join keys to other repos:
74
- - `patient_id``case_id` (cases)
75
- - `main_image` `image_id` (case-images)
76
- - via cases → `article_id` (articles, abstracts)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
 
78
- Note: This repo does not host the actual images. Use your local download (or Zenodo) and map
79
- `file` to the right zip and inner path as described above.
80
 
 
 
 
1
  ---
2
+ pretty_name: MultiCaRe Images
3
  license: cc-by-4.0
4
  task_categories:
5
+ - image-classification
6
+ - image-to-text
7
  language:
8
+ - en
9
  size_categories:
10
+ - 100K<n<1M
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  ---
12
 
13
+ # MultiCaRe Images (with pixels)
14
 
15
+ Per-image dataset with the actual images, captions, labels, and core metadata from MultiCaRe (Zenodo 13936721). Images are stored inside the dataset shards so you can just load and use.
16
 
17
+ Highlights
18
+ - 161k+ images across radiology, pathology, endoscopy, medical photographs, ophthalmic imaging, electrography, and charts.
19
+ - Supervised multilabels (89-class reduced taxonomy) and optional semi-supervised labels.
20
+ - Stable join keys to link with cases and articles datasets.
21
+
22
+ Schema
23
+ - file_id: unique row ID for the processed image file
24
+ - image: datasets.Image (PIL-compatible)
25
+ - file: processed image filename
26
+ - main_image: original figure ID (group identifier for subimages)
27
+ - image_component: subimage reference (e.g. undivided, a, b, …)
28
+ - caption: figure caption (full or segment)
29
+ - labels: list of labels for supervised training (strings)
30
+ - semi_labels: additional labels from the full taxonomy (strings; sparse)
31
+ - image_type, image_subtype, radiology_region, radiology_region_granular, radiology_view: multiclass attributes
32
+ - patient_id: case identifier (join to cases.case_id)
33
  - license: per-article OA license
34
 
35
+ Quick start
36
+ ```python
37
+ from datasets import load_dataset
38
+
39
+ tok = "<your HF token>" # or set HF_TOKEN env var
40
+ ds = load_dataset("MaziyarPanahi/multicare-images", split="train", use_auth_token=tok)
41
+
42
+ img = ds[0]["image"] # PIL.Image.Image
43
+ caption = ds[0]["caption"]
44
+ labels = ds[0]["labels"] # list[str]
45
+ img.show()
46
+ ```
47
+
48
+ Join examples
49
+ ```python
50
+ from datasets import load_dataset
51
+ tok = "<token>"
52
+ img = load_dataset("MaziyarPanahi/multicare-images", split="train", use_auth_token=tok)
53
+ cas = load_dataset("MaziyarPanahi/multicare-cases", split="train", use_auth_token=tok)
54
+ art = load_dataset("MaziyarPanahi/multicare-articles", split="train", use_auth_token=tok)
55
+
56
+ # Example: fetch one case and its first image
57
+ case = cas[0]
58
+ case_id = case["case_id"]
59
+ imgs_for_case = img.filter(lambda e: e["patient_id"] == case_id)
60
+ print(case["case_text"][:400])
61
+ imgs_for_case[0]["image"].show()
62
+ ```
63
+
64
+ Splitting tips
65
+ - Avoid leakage by splitting at patient_id (case) or article_id level.
66
 
67
+ License
68
+ - The dataset is CC-BY-4.0. Each item also retains the per-article OA license string.
69
 
70
+ Cite
71
+ - DOI: 10.5281/zenodo.13936721