saiteja33 commited on
Commit
f2f400d
Β·
verified Β·
1 Parent(s): 9a8a929

Create README_MedThinkSeg_BTXRD.md

Browse files
Files changed (1) hide show
  1. BTXRD/README_MedThinkSeg_BTXRD.md +113 -0
BTXRD/README_MedThinkSeg_BTXRD.md ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # BTXRD (Bone Tumor X-ray Radiograph Dataset) β€” packaged in `saiteja33/MedThink-Seg/BTXRD`
2
+
3
+ This README documents:
4
+ 1) **The original BTXRD dataset** (what it contains, size, and original file structure), and
5
+ 2) **How BTXRD is organized inside this Hugging Face repo** (`saiteja33/MedThink-Seg`, under the `BTXRD/` directory).
6
+
7
+ ---
8
+
9
+ ## 1) Original BTXRD dataset (source)
10
+
11
+ **Primary reference (Data Descriptor paper):**
12
+ *β€œA Radiograph Dataset for the Classification, Localization, and Segmentation of Primary Bone Tumors”* (Scientific Data, 2025).
13
+ DOI: `10.1038/s41597-024-04311-y` (PDF)
14
+
15
+ **Original dataset DOI (Figshare):** `10.6084/m9.figshare.27865398`
16
+
17
+ ### What images are in BTXRD?
18
+ - **Modality:** bone **X-ray radiographs** (**JPEG**)
19
+ - **Body regions covered:** upper limbs, lower limbs, and pelvis
20
+ - **Views/angles:** frontal, lateral, and oblique
21
+ - **Task coverage:** segmentation (tumor masks)
22
+
23
+ ### Dataset size and counts
24
+ - **Total size (original ZIP on Figshare):** **801 MB**
25
+ - **Total images:** **3,746**
26
+ - **Normal:** 1,879
27
+ - **Tumor:** 1,867
28
+ - **Benign:** 1,525
29
+ - **Malignant:** 342
30
+
31
+ ### Labels and annotations
32
+ BTXRD provides:
33
+ - **Local annotations** for each *tumor* image:
34
+ - **bounding boxes** for localization
35
+ - **polygon masks** for segmentation in masks dir
36
+
37
+ **Subtypes (as represented in the paper’s example row):**
38
+ - osteochondroma
39
+ - multiple osteochondromas
40
+ - simple bone cyst
41
+ - giant cell tumor
42
+ - osteofibroma
43
+ - synovial osteochondroma
44
+ - osteosarcoma
45
+ - other bt (other benign tumors)
46
+ - other mt (other malignant tumors)
47
+
48
+ ### BTXRD structure
49
+ The BTXRD download is a **ZIP** that contains:
50
+ ```
51
+ BTXRD.zip
52
+ β”œβ”€ images/ # all radiographs
53
+ β”‚ β”œβ”€ IMG000000.jpeg
54
+ β”‚ β”œβ”€ IMG000001.jpeg
55
+ β”‚ └─ ...
56
+ β”œβ”€ masks/ # masks tumor images (segmentation + bbox)
57
+ β”‚ β”œβ”€ IMG000000.png
58
+ β”‚ β”œβ”€ IMG000001.png
59
+ β”‚ └─ ...
60
+ └─ normal # images without any tumor
61
+ β”œβ”€ images/ # all radiographs
62
+ β”‚ β”œβ”€ IMG000000.jpeg
63
+ β”‚ β”œβ”€ IMG000001.jpeg
64
+ β”‚ └─ ...
65
+ β”œβ”€ masks/ # masks tumor images (segmentation + bbox)
66
+ β”‚ β”œβ”€ IMG000000.png
67
+ β”‚ β”œβ”€ IMG000001.png
68
+ β”‚ └─ ...
69
+ ```
70
+
71
+ **Naming convention:** images start with `IMG`, followed by a **zero‑padded six‑digit** id, and end with `.jpeg`.
72
+
73
+ ---
74
+
75
+ ## How to download / use (recommended)
76
+
77
+ ### A) Download the raw files for BTXRD from this HF repo
78
+ ```python
79
+ from huggingface_hub import snapshot_download
80
+
81
+ local_dir = snapshot_download(
82
+ repo_id="saiteja33/MedThink-Seg",
83
+ repo_type="dataset",
84
+ allow_patterns=["BTXRD/**"], # only pull BTXRD subdir
85
+ )
86
+ print(local_dir)
87
+ ```
88
+
89
+ ### B) Load with πŸ€— Datasets (try these options)
90
+ Depending on how the dataset was uploaded, one of these will work:
91
+
92
+ **Option 1 β€” direct load from the repo (if a dataset script / supported format is present):**
93
+ ```python
94
+ from datasets import load_dataset
95
+ ds = load_dataset("saiteja33/MedThink-Seg", data_dir="BTXRD")
96
+ print(ds)
97
+ ```
98
+
99
+ **Option 2 β€” treat it as an image-folder dataset (if files are organized as train/validation/test directories):**
100
+ ```python
101
+ from datasets import load_dataset
102
+ ds = load_dataset("imagefolder", data_dir="BTXRD")
103
+ print(ds)
104
+ ```
105
+ ---
106
+
107
+ ## Citation
108
+ If you use BTXRD, cite the Scientific Data paper:
109
+
110
+ - Shunhan Yao et al. *A Radiograph Dataset for the Classification, Localization, and Segmentation of Primary Bone Tumors.* Scientific Data (2025). DOI: `10.1038/s41597-024-04311-y`
111
+
112
+ And/or the Figshare dataset record:
113
+ - BTXRD (Figshare). DOI: `10.6084/m9.figshare.27865398`