Dataset Viewer
Duplicate
The dataset viewer is not available for this split.
Cannot extract the features (columns) for the split 'train' of the config 'default' of the dataset.
Error code:   FeaturesError
Exception:    ArrowInvalid
Message:      JSON parse error: Missing a name for object member. in row 0
Traceback:    Traceback (most recent call last):
                File "/usr/local/lib/python3.12/site-packages/datasets/packaged_modules/json/json.py", line 280, in _generate_tables
                  df = pandas_read_json(f)
                       ^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/packaged_modules/json/json.py", line 34, in pandas_read_json
                  return pd.read_json(path_or_buf, **kwargs)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/pandas/io/json/_json.py", line 815, in read_json
                  return json_reader.read()
                         ^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/pandas/io/json/_json.py", line 1014, in read
                  obj = self._get_object_parser(self.data)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/pandas/io/json/_json.py", line 1040, in _get_object_parser
                  obj = FrameParser(json, **kwargs).parse()
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/pandas/io/json/_json.py", line 1176, in parse
                  self._parse()
                File "/usr/local/lib/python3.12/site-packages/pandas/io/json/_json.py", line 1391, in _parse
                  self.obj = DataFrame(
                             ^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/pandas/core/frame.py", line 778, in __init__
                  mgr = dict_to_mgr(data, index, columns, dtype=dtype, copy=copy, typ=manager)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/pandas/core/internals/construction.py", line 503, in dict_to_mgr
                  return arrays_to_mgr(arrays, columns, index, dtype=dtype, typ=typ, consolidate=copy)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/pandas/core/internals/construction.py", line 114, in arrays_to_mgr
                  index = _extract_index(arrays)
                          ^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/pandas/core/internals/construction.py", line 680, in _extract_index
                  raise ValueError(
              ValueError: Mixing dicts with non-Series may lead to ambiguous ordering.
              
              During handling of the above exception, another exception occurred:
              
              Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/split/first_rows.py", line 246, in compute_first_rows_from_streaming_response
                  iterable_dataset = iterable_dataset._resolve_features()
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 4196, in _resolve_features
                  features = _infer_features_from_batch(self.with_format(None)._head())
                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2533, in _head
                  return next(iter(self.iter(batch_size=n)))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2711, in iter
                  for key, pa_table in ex_iterable.iter_arrow():
                                       ^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2249, in _iter_arrow
                  yield from self.ex_iterable._iter_arrow()
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 494, in _iter_arrow
                  for key, pa_table in iterator:
                                       ^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 384, in _iter_arrow
                  for key, pa_table in self.generate_tables_fn(**gen_kwags):
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/packaged_modules/json/json.py", line 283, in _generate_tables
                  raise e
                File "/usr/local/lib/python3.12/site-packages/datasets/packaged_modules/json/json.py", line 246, in _generate_tables
                  pa_table = paj.read_json(
                             ^^^^^^^^^^^^^^
                File "pyarrow/_json.pyx", line 342, in pyarrow._json.read_json
                File "pyarrow/error.pxi", line 155, in pyarrow.lib.pyarrow_internal_check_status
                File "pyarrow/error.pxi", line 92, in pyarrow.lib.check_status
              pyarrow.lib.ArrowInvalid: JSON parse error: Missing a name for object member. in row 0

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.

KidNet Renal Injury Pathology Dataset

KidNet is a curated hematoxylin and eosin (H&E) kidney pathology image dataset for renal injury recognition. Each sample contains one microscopy image and one LabelMe annotation file with polygon-level labels for renal tubules and related pathological structures.

The dataset was built for small-sample renal injury modeling, especially:

  • pixel-level segmentation of injury_tubules
  • tile-level injury classification
  • weakly supervised heatmap localization
  • family-level generalization analysis across whole-slide-image (WSI) groups

Dataset Summary

Item Count
Images 411
Annotation files 411
WSI families 11
Injury-positive images 319
Injury-negative images 92
Total annotated shapes 16,932
injury_tubules annotations 8,996

Directory Structure

Each sample is stored in its own folder:

KidNet/
  WSI1_1/
    WSI1_1.jpg
    WSI1_1.json
  WSI1_2/
    WSI1_2.jpg
    WSI1_2.json
  ...

Each .json file follows the LabelMe format and contains:

  • imagePath: image filename
  • imageHeight, imageWidth: original image size
  • shapes: polygon or circle annotations
  • label: annotation class name
  • points: vertex coordinates in image pixel space
  • shape_type: usually polygon, with occasional circle

Some LabelMe files may contain an imageData field. The paired .jpg file is the authoritative image file; imageData can be removed before upload if a smaller repository size is required.

Label Schema

Label Count Description
injury_tubules 8,996 Tubules annotated as injured; main binary segmentation target
healthy_tubules 3,756 Tubules annotated as morphologically healthy
necrotic_tubules 2,369 Necrotic tubule regions
cast 688 Tubular cast regions
glomerulus 665 Glomerular structures
unknown 458 Ambiguous or uncertain regions

For binary renal injury segmentation, use injury_tubules as the positive class and all other pixels as background. For broader pathology modeling, the remaining labels can be used as auxiliary or multilabel targets.

Family-Level Distribution

The recommended split unit is the WSI family, which is the prefix of each sample ID before the final numeric index. Random image-level splitting is not recommended because images from the same family may share staining, acquisition, tissue-source, and morphology patterns.

Family Images Injury-positive Injury-negative Injury annotations Total shapes
WSI1 20 2 18 5 669
WSI14 10 0 10 0 380
WSI15 10 0 10 0 383
WSI19 103 103 0 2,046 2,766
WSI2 20 5 15 18 720
WSI20 36 36 0 1,242 1,989
WSI3 34 20 14 770 1,658
WSI4 20 19 1 168 946
WSI5 118 115 3 4,587 5,780
WSI6 20 8 12 61 907
WSI7 20 11 9 99 734

Recommended Evaluation Protocol

Use family-level held-out evaluation:

  1. Select one WSI family as the test family.
  2. Select another WSI family as validation.
  3. Train on the remaining families.
  4. Repeat across all 11 held-out families.

This protocol is stricter than random image splitting and better measures generalization to unseen WSI families.

Recommended metrics:

  • Segmentation: Dice, IoU, precision, recall, specificity
  • Tile classification: recall, precision, F1, balanced accuracy, AUROC when applicable
  • Heatmap localization: image-level recall, false-positive area, thresholded heatmap quality

Loading Example

from pathlib import Path
import json
from PIL import Image

root = Path("KidNet")
samples = []

for sample_dir in sorted(p for p in root.iterdir() if p.is_dir()):
    image_path = next(sample_dir.glob("*.jpg"))
    json_path = next(sample_dir.glob("*.json"))
    with json_path.open("r", encoding="utf-8") as f:
        ann = json.load(f)

    labels = [shape["label"] for shape in ann.get("shapes", [])]
    samples.append(
        {
            "sample_id": image_path.stem,
            "family": image_path.stem.split("_")[0],
            "image": Image.open(image_path).convert("RGB"),
            "annotation": ann,
            "has_injury": "injury_tubules" in labels,
        }
    )

print(len(samples))

Converting injury_tubules to a Binary Mask

from PIL import Image, ImageDraw

def injury_mask(annotation):
    width = int(annotation["imageWidth"])
    height = int(annotation["imageHeight"])
    mask = Image.new("L", (width, height), 0)
    draw = ImageDraw.Draw(mask)

    for shape in annotation.get("shapes", []):
        if shape.get("label") != "injury_tubules":
            continue
        points = [tuple(p) for p in shape.get("points", [])]
        if shape.get("shape_type") == "polygon" and len(points) >= 3:
            draw.polygon(points, fill=1)
        elif shape.get("shape_type") == "circle" and len(points) >= 2:
            (cx, cy), (px, py) = points[:2]
            r = ((px - cx) ** 2 + (py - cy) ** 2) ** 0.5
            draw.ellipse((cx - r, cy - r, cx + r, cy + r), fill=1)

    return mask

Intended Use

This dataset is intended for academic research on renal injury recognition from pathology images. Suitable use cases include segmentation baselines, weakly supervised classification, heatmap localization, and small-sample generalization studies.

The dataset is not intended for clinical diagnosis, treatment decisions, or deployment as a medical device.

Limitations

  • The dataset is small and strongly imbalanced across WSI families.
  • Some families are injury-rich, while others are sparse-positive or fully negative.
  • Labels are research annotations and should not be treated as exhaustive clinical ground truth.
  • Pixel-level boundaries can be uncertain for subtle tubular injury patterns.
  • Models evaluated with random image-level splits may report overly optimistic performance.

Ethics And Privacy

The current release contains experimental kidney histopathology images and does not include human-identifiable personal information. Users should still follow institutional, animal research, and data-use requirements applicable to their own setting.

License

License information should be confirmed by the dataset owner before public redistribution. The current metadata uses other as a placeholder. If the dataset is released publicly, replace it with the final approved license.

Citation

If you use this dataset, please cite the project or competition report associated with KidNet. A formal citation can be added here after release.

@dataset{kidnet_renal_injury_pathology,
  title = {KidNet Renal Injury Pathology Dataset},
  year = {2026},
  note = {H&E kidney pathology images with LabelMe annotations for renal injury recognition}
}
Downloads last month
-