LoC-Path-Data / README.md
WinstonHu's picture
Mark WSI-Bench and BCNB release complete after remote verification
14971df verified
|
Raw History Blame Contribute Delete
4.97 kB
metadata
language:
  - en
license: other
license_name: source-data-and-model-terms
license_link: >-
  https://huggingface.co/datasets/WinstonHu/LoC-Path-Data/blob/main/DATA_TERMS.md
tags:
  - pathology
  - whole-slide-imaging
  - visual-question-answering
  - conch
  - loc-path
configs:
  - config_name: stage1_reports
    data_files:
      - split: train
        path: annotations/train/stage1_reports.json
  - config_name: stage2_instructions
    data_files:
      - split: train
        path: annotations/train/stage2_instructions.json

LoC-Path Data

Upload status: complete. All feature files have been checked against the release manifest.

Prepared WSI-Bench and BCNB data for LoC-Path training and evaluation: processed annotation JSON, pre-extracted CONCH-v1 features, and coordinates. Raw whole-slide images, image patches, and original pathology reports are not included. Model weights are not included.

Contents

Component Published size
Stage 1 report-supervision annotations 9,635 records
Stage 2 instruction annotations 175,261 records
WSI-Bench evaluation annotations (16 task files) 4,163 records
BCNB evaluation annotations 7,274 records
TCGA slides with NPY feature/coordinate pairs 9,844
BCNB slides with numeric CONCH feature CSVs 1,058
Numeric feature files 20,746
Numeric feature download 340.62 GB (317.23 GiB)

The WSI-Bench task partitions are inherited from WSI-LLaVA/WSI-Bench through the parent repository's preparation. This release retains those task partitions; it does not create a new partition. Annotation paths are normalized and records without available features are filtered. Published counts therefore describe this prepared snapshot, rather than every upstream annotation version. See metadata/dataset_summary.json for per-file counts and metadata/excluded_records.json for omissions.

Layout

annotations/
  train/stage1_reports.json
  train/stage2_instructions.json
  test/wsi_bench/*_test.json
  test/external/bcnb_choice_test.json
features/conch_v1/
  <cancer>_224x224_b20_t15/npy_files/
    <slide>_features.npy
    <slide>_coords.npy
  bcnb_csv/<patient_id>.csv
metadata/
  dataset_summary.json
  feature_manifest.json
  excluded_records.json
  train_test_overlap.json

Features have shape [N, 512]; coordinates have matching shape [N, 2] in (x, y) order. TCGA NPY arrays retain their existing stored precision without a release-time cast. Model computation follows the training configuration. NPY coordinates use zero-anchored tile-grid indices. BCNB CSVs contain patch_name and 512 numeric feature columns; patch names encode coordinates, not image contents.

JSON image values are feature lookup stubs, not downloadable image paths. For example, ./LUSC/<slide>.h5 resolves to the matching NPY pair in the LoC-Path training loader. BCNB feature_path values are relative to features/conch_v1. Processed report-generation answers are included as supervision; original source report documents are not distributed.

Download and use

from huggingface_hub import snapshot_download

snapshot_download(
    repo_id="WinstonHu/LoC-Path-Data",
    repo_type="dataset",
    local_dir="data/LoC-Path-Data",
)

To download only annotations and documentation initially, pass allow_patterns=["annotations/**", "metadata/**", "README.md", "DATA_TERMS.md"]. Running the full download again fills in the numeric features.

In the LoC-Path training package:

export LOCPATH_DATA_ROOT=$PWD/data/LoC-Path-Data
export LOCPATH_FEATURE_ROOT="$LOCPATH_DATA_ROOT/features/conch_v1"
export LOCPATH_STAGE1_REPORT_JSON="$LOCPATH_DATA_ROOT/annotations/train/stage1_reports.json"
export LOCPATH_STAGE1_DATA_PATH="$LOCPATH_STAGE1_REPORT_JSON"
export LOCPATH_STAGE2_DATA_PATH="$LOCPATH_DATA_ROOT/annotations/train/stage2_instructions.json"

For WSI-Bench inference, set DATA_DIR to $LOCPATH_DATA_ROOT/annotations/test/wsi_bench; for BCNB, use $LOCPATH_DATA_ROOT/annotations/test/external. Set FEATURE_ROOT to $LOCPATH_FEATURE_ROOT and pass --image_feature_suffix .npy to the inference launcher. BCNB CSV features are selected from each record's relative path. No exclusion CSV is needed for this prepared snapshot.

Sources and terms

Annotations are adapted from WSI-LLaVA/WSI-Bench and SlideChat. BCNB numeric features were provided with SlideChat. Features use CONCH v1. Read DATA_TERMS.md for attribution and source-data/model terms. The LoC-Path code license does not relicense these data or the feature extractor.

metadata/feature_manifest.json records each numeric file's size, SHA256, feature shape, stored dtype, and annotation memberships. Local source paths and raw assets are excluded from the release.