Datasets:
Upload folder using huggingface_hub
Browse files
README.md
CHANGED
|
@@ -170,17 +170,24 @@ row = test_split[0]
|
|
| 170 |
# Image (PIL.Image)
|
| 171 |
image = row["image"]
|
| 172 |
|
| 173 |
-
#
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 180 |
print(f"{label}: [{x_min:.1f}, {y_min:.1f}, {width:.1f}, {height:.1f}]")
|
| 181 |
```
|
| 182 |
|
| 183 |
-
> **Note on bbox format:** The Parquet files store bboxes in COCO format `[x_min, y_min, width, height]` as float32. `category` is stored as a `ClassLabel` integer index
|
| 184 |
|
| 185 |
## Dataset Statistics
|
| 186 |
|
|
|
|
| 170 |
# Image (PIL.Image)
|
| 171 |
image = row["image"]
|
| 172 |
|
| 173 |
+
# Bounding boxes and category indices
|
| 174 |
+
bboxes = row["objects"]["bbox"] # list of [x_min, y_min, width, height] (float32)
|
| 175 |
+
categories = row["objects"]["category"] # list of int (ClassLabel index)
|
| 176 |
+
|
| 177 |
+
# Class names in ClassLabel index order (alphabetically sorted)
|
| 178 |
+
CLASS_NAMES = [
|
| 179 |
+
"Gametocyte Cells", "Platelets", "Polygonal Cells", "Red Blood Cells",
|
| 180 |
+
"Ring Cells", "Round Cells", "Schizont Cells", "Spindle Cells",
|
| 181 |
+
"Trophozoite Cells", "White Blood Cells",
|
| 182 |
+
]
|
| 183 |
+
|
| 184 |
+
for bbox, cat_idx in zip(bboxes, categories):
|
| 185 |
+
x_min, y_min, width, height = bbox
|
| 186 |
+
label = CLASS_NAMES[cat_idx]
|
| 187 |
print(f"{label}: [{x_min:.1f}, {y_min:.1f}, {width:.1f}, {height:.1f}]")
|
| 188 |
```
|
| 189 |
|
| 190 |
+
> **Note on bbox format:** The Parquet files store bboxes in COCO format `[x_min, y_min, width, height]` as float32. `category` is stored as a `ClassLabel` integer index. The raw `annotation.jsonl` files use `[[x_min, y_min], [x_max, y_max]]` (top-left / bottom-right pixel coordinates) — see [Annotation Format](#annotation-format).
|
| 191 |
|
| 192 |
## Dataset Statistics
|
| 193 |
|